Previous Thread
Next Thread
Print Thread
GDI quick question (or 2) #1119 15 May 15 10:31 AM
Joined: Sep 2002
Posts: 5,471
F
Frank Online Content OP
Member
OP Online Content
Member
F
Joined: Sep 2002
Posts: 5,471
Happy Friday,

When setting up //GDI commands inside the document, what is the correct syntax for setting passthrough off?

//PASSTHROUGH=OFF
//PASSTHROUGH OFF
//PASSTHROUGH,OFF

Or any of the above? Seems the syntax is different for the .ini and document. Also mode commands are followed by ,


2) Orientation

Is it possible to set the printer orientation in the document itself by using:

//ORIENTATION=PORTRAIT

I have a renegade HP that keeps going to landscape even though the windows printer driver says portrait and i have this embedded in the document.

Any ideas as to reasons or causes or fixes are greatly appreciated!

Re: GDI quick question (or 2) #1120 15 May 15 11:29 AM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
1. In principle, all of the //GDI directives use a single comma (with no spaces) to separate the directive name from the argument list, i.e.

//PASSTHROUGH,OFF

However, as a practical matter, in most, if not all cases, the delimiter character is ignored and the argument(s) assumed to start two positions after the last character of the argument name. (In other words, any single character delimiter works.) So all three of your examples above would work. But neither of these would work:

//PASSTHROUGH, OFF ; invalid (extra space)
//PASSTHROUGH = OFF ; invalid (extra spaces)

The syntax rules for the //GDI directives may be similar, but are definitely different from those for the printer init files, which follow the typical standard for such init files:

{whitespace}={whitespace}

where the command name is separated from the argument values by an equal sign, with any amount of whitespace on either side, e.g.

PASSTHROUGH=OFF
PASSTHROUGH = OFF

Note that the command or directive names are case insensitive in both printer init files and print files, but I recommend standardizing on upper.

2. Yes, as noted in the Print Directive Table , you may insert either of the directives:

//ORIENTATION,PORTRAIT
//ORIENTATION,LANDSCAPE

into the top of the document to force that orientation. (As noted above, "=" would be acceptable in place of ",").

Note that any directive that affects the entire mode of the printout must appear near the top of the document, before any plain text or other directive that generates output. This includes PASSTHROUGH, ORIENTATION, PAPERSIZE, BIN, DUPLEX, XORIGIN, YORIGIN, XOFFSET, YOFFSET.

---
Notes to Ty:

1) The popup def for "Printer Init Equivalent" is nearly correct except for the claim that such commands must appear in the top 9 lines. The only real requirement is that they appear before anything that generates output.

2) We probably should note, in that popup, or elsewhere, the difference in the syntax requirements between the //GDI directives and the printer init commands.

3) We should probably add a sub-topic in the GDI Directives section to clarify the syntax rules for GDI directives, based on my answer above.

4) Please seek out any examples of //GDI directives that use something other than comma as the delimiter, and adjust them to be comma, with no spaces on either side. For example: PASSTHROUGH should look more like PAPERSIZE.

Re: GDI quick question (or 2) #1121 15 May 15 11:32 AM
Joined: Jun 2001
Posts: 3,406
J
Jorge Tavares - UmZero Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 3,406
Hi Frank,
It's the second option //PASSTHROUGH OFF and you can define LANDSCAPE adding 32768 to the switches argument of xcall spool.

Have a nice weekend


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: GDI quick question (or 2) #1122 15 May 15 12:16 PM
Joined: Sep 2002
Posts: 5,471
F
Frank Online Content OP
Member
OP Online Content
Member
F
Joined: Sep 2002
Posts: 5,471
Thanks Gentlemen cool


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3