G’day scripters
Problem…
I’m trying to direct print with textEdit, and Acrobat Pro .
The handlers I’m using seem to work fine on my iMac, but not on my Clients 2012 Mac Pro, both running Yosemite.
If they set the paper size of the TextEdit Print dialog to A4 (which it’s supposed to be), then Acrobat prints on A4 instead of A3 (TextEdit first prints what we call a ‘cover sheet’ on A4 first, with barcode and email details).
TextEdit’s Print dialog has a target printer set to the name of the Small Page Printer, and Acrobat uses (supposedly), the Large Page Printer. These names are set in a set-up window which allows direct selection from the ‘Printer & Scanner’ preferences list.
Is anyone able to tell me what I might be doing wrong in the code please? For instance, should I be using the CUPS printer names instead of the spaces-included-instead-of-underscores Printer names?
Regards
Santa
on printTextEdit()
try
set TempAttachmentName to my ResetAttachmentName()
tell application "TextEdit"
try
activate
open file (my theItem) as alias
print document 1 with properties {target printer:TheCoverPagePrinter} without print dialog —< ‘Small Page Printer'
end try
end tell
on error errmsg
set my didItPrint to false
tell application "System Events" to display dialog "printTextEdit " & return & return & errmsg giving up after 40
end try
end printTextEdit