• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Requesting advice with TextEdit & Acrobat printing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Requesting advice with TextEdit & Acrobat printing


  • Subject: Requesting advice with TextEdit & Acrobat printing
  • From: Brian Christmas <email@hidden>
  • Date: Wed, 19 Aug 2015 12:52:43 +1000

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

Acrobat Handler

try
tell application "Adobe Acrobat Pro"
activate
do shell script ("sleep 0.1")
set CountOfPages to count of pages of active doc
do script "var pp = this.getPrintParams();
pp.numCopies = 1;
pp.shrinkToFit = false;
pp.firstPage = 1;
pp.lastpage = " & CountOfPages & ";
pp.tileOverlap = 36;
pp.tileLarge = true;
pp.tileMark = pp.constants.tileMarks.west;
pp.setPageSize =  '" & largePaperSize & “'; —< ‘A3'
pp.printerName =  '" & theLargePagePrinter & “'; —< ‘Large Page Printer'
pp.interactive = pp.constants.interactionLevel.silent;
this.print(pp);"
end tell
on error errmsg number errnum
set my didItPrint to false
tell application "System Events" to display dialog " printAdobeAcrobat 2 " & errmsg & return & "error number " & errnum giving up after 40
end try



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Requesting advice with TextEdit & Acrobat printing
      • From: Yvan KOENIG <email@hidden>
  • Prev by Date: Re: date syntax not working on 10.10.5?
  • Next by Date: Re: How do we Convert PICT to JPEG
  • Previous by thread: Re: working with find command
  • Next by thread: Re: Requesting advice with TextEdit & Acrobat printing
  • Index(es):
    • Date
    • Thread