Dennis
Full Member
Old but still active
Posts: 147
|
Post by Dennis on Aug 14, 2021 3:13:09 GMT -5
Has anybody played around with printer control codes? I want to be able to change the orientaion of a printer from portrait to landscape from WITHIN a LB program. I know that some control codes are specific to printers but portrait/landscape could possibly be generic. Any help or suggestions will be appreciated. Thanks
|
|
|
Post by Rod on Aug 14, 2021 6:52:25 GMT -5
|
|
|
Post by metro on Aug 14, 2021 7:50:28 GMT -5
I found this some time back.
maybe of use..... (does use a dll though)
|
|
ntech
New Member
Posts: 49
|
Post by ntech on Aug 14, 2021 8:03:27 GMT -5
Hmm I would approach it by generating a PostScript script, and running it with GhostScript. LibreOffice uses this approach to interact with printers, and it allows you to interact with printers in an easy manner without digging into the specifics too much, so you can offload it to a different utility but retain low level control.
For example, here is a postscript you could make to print out "Hello World":
%! /Helvetica findfont 72 scalefont setfont 72 72 moveto (Hello, world!) show showpage
You could programatically generate these, then pass them to ghostscript for execution.
|
|
Dennis
Full Member
Old but still active
Posts: 147
|
Post by Dennis on Aug 14, 2021 9:27:22 GMT -5
Thanks everybody - I will try the suggestions although I think Rod is correct. I will try the DLL and Postscript approach. I will also research PCL further... Thanks
|
|
Dennis
Full Member
Old but still active
Posts: 147
|
Post by Dennis on Aug 14, 2021 9:42:36 GMT -5
The DLL approach given by Rod an Metro worked! I intend to use the code on Windows machines only so will go with the .DLL approach Thanks!!
|
|