Setting Printer Options etc. 
Author Message
 Setting Printer Options etc.

Pdox5 Win95

I am trying to program a button so that it will change to a different
printer and then print a batch of labels. I haven't tried it before so
familiarize myself by with the methods by trying them one at a time.

Unfortunately the manual and online help/examples aren't very clear.
Right now I'm trying to figure out printerSet Current. This is what I
have got:

method pushButton(var eventInfo Event)
 var
    labelPrinter string
 endVar

labelPrinter = "Panasonic KX-P1180"
printerSetCurrent(labelPrinter)

endMethod

I've also tried just putting the printer name straight into the method:

method pushButton(var eventInfo Event)

 var
 endVar

printerSetCurrent("Panasonic KX-P1180")

endMethod

Either way it gives me an error message:
The parameter is not formatted correctly: Panasonic KX-P1180

What is the right format? What am I missing? After this I need to change
the paper size to a custom size (tractor fed label).

Thanks for your help.

Magnus
CFUV FM102



Tue, 24 Oct 2000 03:00:00 GMT
 Setting Printer Options etc.

1.

To use  printerSetCurrent  you have to supply thres values to the method

printer name, driver name, and printer port (separated by commas)

To get the information necesary run this code from a script or button

 var
      arPrinters  Array[] String
 endVar

   enumPrinters(arPrinters) ; Get a list of installed printers.

   arPrinters.view()    ; View the list of installed printers.

endMethod

2.
Use  printerSetUptions

method pushButton(var eventInfo Event)
   var
      siNCopies   SmallInt
      stPrompt    String
      prnOptions  PrinterOptionInfo
      reOrders    Report
   endVar

;printerSetCurrent(printer name, driver name, and printer port)
;printerSetCurrent("PostScript Printer,pscript,LPT1")

   siNCopies = 0
   stPrompt  = "Print how many copies?"

   siNCopies.view(stPrompt)
   if siNCopies > 0 then
      prnOptions.Copies = siNCopies
   else
      return
   endIf

; Use constant to specify lower paper tray.
   prnOptions.DefaultSource = prnLower

; Use constant to specify landscape (long) orientation.
   prnOptions.Orientation = prnLandscape

; Use constant to specify high quality print.
   prnOptions.PrintQuality = prnHigh

;Use  PaperSizes  constant to specify paper-size
prnOptions.PaperSize = prnA5

   if printerSetOptions(prnOptions) then
      reOrders.print("orders")
   else
      errorShow("Could not set printer options.")
   endIf

endMethod

CFUV FM102 skrev:

Quote:
> Pdox5 Win95

> I am trying to program a button so that it will change to a different
> printer and then print a batch of labels. I haven't tried it before so
> familiarize myself by with the methods by trying them one at a time.

> Unfortunately the manual and online help/examples aren't very clear.
> Right now I'm trying to figure out printerSet Current. This is what I
> have got:

> method pushButton(var eventInfo Event)
>  var
>     labelPrinter string
>  endVar

> labelPrinter = "Panasonic KX-P1180"
> printerSetCurrent(labelPrinter)

> endMethod

> I've also tried just putting the printer name straight into the method:

> method pushButton(var eventInfo Event)

>  var
>  endVar

> printerSetCurrent("Panasonic KX-P1180")

> endMethod

> Either way it gives me an error message:
> The parameter is not formatted correctly: Panasonic KX-P1180

> What is the right format? What am I missing? After this I need to change
> the paper size to a custom size (tractor fed label).

> Thanks for your help.

> Magnus
> CFUV FM102

--
Michael

I do not want junk-mail. Hate direct marketing



Wed, 25 Oct 2000 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. How to set printer orientation,copies etc

2. Setting Printer Options Through ObjectPal

3. Setting Printer Options

4. Setting printer options in a script

5. Q: how to change printer settings/options

6. How do you set printer to a network printer

7. FPW2.6 printing to network printer w/SET DEVICE TO PRINTER

8. set printer to \\machine name\printer

9. DBCC failed SET options have incorrect settings

10. ObjectPAL printer options?

11. ObjectPal Printer options

12. - Printer Option problem


 
Powered by phpBB® Forum Software