• 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
Re: Print to PDF
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Print to PDF


  • Subject: Re: Print to PDF
  • From: Luther Fuller <email@hidden>
  • Date: Tue, 10 Jan 2012 08:39:44 -0600

On Jan 10, 2012, at 8:12 AM, theDaniel wrote:
Really, I like Joe's solution better - less clicking, but here's another option:
http://pdfwriterformac.sourceforge.net/
Works for me.

I just took a look at the PDFwriter doc where I noticed ...

History
PDFwriter is heavily based on CUPS-PDF. ( http://www.physik.uni-wuerzburg.de/~vrbehr/ cups-pdf/ )
Unlike CUPS-PDF, PDFwriter doesnʻt use ghostscript to generate PDF files. PDFwriter uses the Mac OS X
internal pdf capabilities. This will result in small files sizes, whereas CUPS-PDF generated files are really huge.

I may want to re-write my script to use either of these PDF printers. Whatever the user has installed.

Also, this discussion caused me to take a new look at old code.

tell application "System Events"
tell process "Mail"
--
--
--
keystroke "p" using {command down}
--
--
--
keystroke return -- click button "Print" of sheet 1 of window 1 -- start printing with process "CUPS-PDF"
end tell

Notice that I've changed the last line. Would 'click button "Print" ...' work in French? German?
But 'keystroke return' is internationalized.

Use of both "CUPS-PDF" and "PDFwriter" require a minimal use of UI scripting. It doesn't matter if "Save as PDF..." is used from the File menu or the Print dialog, it still requires UI scripting. The only way to avoid UI scripting (and I really, really want to avoid it) is to have a 'printToPDF' AppleScript command as standard in the dictionary of every application that prints. I'm not holding my breath.

 _______________________________________________
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: Print to PDF
      • From: KOENIG Yvan <email@hidden>
References: 
 >Print to PDF (From: "R. Nelson Byrne" <email@hidden>)
 >Re: Print to PDF (From: email@hidden)
 >Re: Print to PDF (From: Alex Zavatone <email@hidden>)
 >Re: Print to PDF (From: Rick Gordon <email@hidden>)
 >Re: Print to PDF (From: Luther Fuller <email@hidden>)
 >Re: Print to PDF (From: theDaniel <email@hidden>)

  • Prev by Date: Re: Print to PDF
  • Next by Date: Re: Print to PDF
  • Previous by thread: Re: Print to PDF
  • Next by thread: Re: Print to PDF
  • Index(es):
    • Date
    • Thread