Access for PDF Print Setting through Progress 4gl program

Posted by ankitshukla on 12-Apr-2016 11:32

Hi,

I wanted to print my pdf file (which actually a label in pdf format) into a "4x6" inch label print. When I go manually I can open the file through adobe reader and change the print settings to 4x6 size and print to my zebra 203 dpi printer. It print well to zebra printer.

But I wanted to handle this process through Progress Code. Any idea how can I do that?

Any help will be highly appreciated.

-
Thanks,

Ankit

All Replies

Posted by Eduardo Silva on 12-Apr-2016 16:49

Hi Ankit,

you can print directly to Zebra without generating the PDF. To do this, follow the following format:

/* direct to printer name found at windows\start\printers */

DEFINE STREAM s-saida.

OUTPUT STREAM s-saida TO printer value("ZDesigner S4M-203dpi ZPL (1)").

put stream s-saida CONTROL

"^XA^LH0,0^CI0^XZ" +

/* ^FO command sets a field origin x,y and ^FS command denotes the end of the field definition*/

"^FO45,42^FS"      +

/* command sets the field position x,y */

"^FT81,118"        +

/* command allows you to print text into a defined block type format. */

"^FB648,3,0,C,0"   +

/* command specifies the font to use in a text field */

"^A0N,78,90"       +

/* command defines the data string for a field. */

"^FD"              + "TEXT TO PRINT"  +

/* command denotes the end of the field definition */

"^FS"              +

/* command is the ending (closing) bracket. It indicates the end of a label format. */

"^XZ".

OUTPUT STREAM s-saida CLOSE.

To format label length and width, use instruction ^LL to length and ^PW to width. To use ^LL you need to set ^JM (dots per millimeter) first then calculate label length and set ^LL and ^PW. See more at manual (zpl-zbi2-pm-en.pdf) search at google:

www.google.com.br/url

Posted by ankitshukla on 13-Apr-2016 03:50

Hi Eduardo Silva,

Thanks!!...But this not what I need here. I got your point what you illustrate above is a fresh label printing.

I have received the complete label with text and bar code etc well in place in pdf file format from our client. So when I am opening that pdf label in adobe reader and change the print setting making print size 4x6 inch and put it to zebra printer it prints well. I wanted to handle this thing programmatically changing the print setting for that pdf file and put it to my zebra printer. So is there any approach available which will allow me to do so.

So I think for this I need to get the access to adobe reader internal structure through program.

Thanks,

Ankit

Posted by ezequielmontoya on 14-Apr-2016 08:54

Just a guess: Maybe you can try with some pdf reader with online parameters for indicate file to open, and if you want to directly print it.

There are many of them but I haven't tried.


Posted by ankitshukla on 19-Apr-2016 00:49

Any one have any idea about this topic.

Posted by Gunnar.Vogt on 06-May-2016 08:42

Hi,

I think you can setup a copy of your Zebra printer with the correct paper size. This way your print program does not need to change the print settings during run time.

Gunnar

Posted by ankitshukla on 16-May-2016 05:26

Hi Gunnar,

My zebra printer setup is correct for .ZPL file and its working correct for that. But my requirement here is to print the .PDF (A4 size) to Label size (4'X6') to my Zebra Printer. So I am in search for changing this printer settings at run time.

Thanks,

Ankit

This thread is closed