Printing options from answer printer
Ken Ray
kray at sonsothunder.com
Sun Nov 9 23:33:23 EST 2008
> If I know the user selected scale... then I can use the print card
> into x,x,x,x statement.
>
> Is this a missing feature of Rev or is there some other way to get it?
Well, when *I* print to my printer (an HP OfficeJet 7780), if I ask for "the
printerSettings" right after "answer printer", I get (mostly) XML that I can
parse, in a pList fashion (on OS X). In my case, I've determined that when
the " com.apple.print.PageToPaperMappingType" is 1, the "Scale to fit Paper
Size" is turned off, and it is 2, then it's turned on.
The relevant XML code follows. Look at the indicated lines; this is when
it's turned OFF:
<key>com.apple.print.PageToPaperMappingType</key>
<dict>
<key>com.apple.print.ticket.creator</key>
<string>com.apple.jobticket</string>
<key>com.apple.print.ticket.itemArray</key>
<array>
<dict>
<key>com.apple.print.PageToPaperMappingType</key>
--> <integer>1</integer>
<key>com.apple.print.ticket.stateFlag</key>
<integer>0</integer>
</dict>
</array>
</dict>
and this is when it's turned ON:
<key>com.apple.print.PageToPaperMappingType</key>
<dict>
<key>com.apple.print.ticket.creator</key>
<string>com.apple.jobticket</string>
<key>com.apple.print.ticket.itemArray</key>
<array>
<dict>
<key>com.apple.print.PageToPaperMappingType</key>
--> <integer>2</integer>
<key>com.apple.print.ticket.stateFlag</key>
<integer>0</integer>
</dict>
</array>
</dict>
Don't know how it works on your printer, though...
Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
More information about the use-livecode
mailing list