• 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 work flow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Print to PDF work flow


  • Subject: Re: Print to PDF work flow
  • From: Axel Luttgens <email@hidden>
  • Date: Mon, 3 Nov 2008 22:46:53 +0100

Le 3 nov. 08 à 17:34, Joe a écrit :

At 9:32 AM +0100 11/2/08, Axel Luttgens wrote:
I couldn't find the sample workflow you are speaking about; could you provide us with a pointer to it?
I ask because it seems that you've just reproduced an excerpt of the original one, and the basic cause of your problem (the file names) may be somewhere else.
Moreover, which version of Mail.app are you running?

Hi Axel,

The script example is on page 12

http://developer.apple.com/documentation/Printing/Conceptual/PDF_Workflow/PDF_Workflow.pdf

I'm using Mail 3.5, OSX 10.5.5

Hello Joe,

Thanks for the info, as I now grasp the context (I was wondering where the argument of the on open handler was supposed to come from).

In my case, the spool file always seems to be named accordingly to the file being printed; for example, when printing the first page of "PDF_Workflow.pdf", the spool file is named "PDF_Workflow.pdf.pdf" as expected.
I'm thus not encountering such a generic name ("Print Job.PDF").


Anyway, your attempt should have been working, once a slight typo corrected:
set name of aFile to x & ".pdf"
instead of:
set name of aFile to y & ".pdf"


On the other hand, perhaps could you let the user choose a file name, instead of using the frontmost process' name (unless I'm wrong, a print job may sometimes end with multiple files), for example:

on open these_items
tell application "Mail"
activate
tell (make new outgoing message)
set visible to true
repeat with aFile in these_items
tell application "Finder" to get name of aFile
display dialog "If needed, enter a new name for file " & result & ":" default answer result buttons {"OK"} default button {"OK"}
tell application "Finder" to set name of aFile to text returned of result
make new attachment with properties {file name:aFile} at end of content
end repeat
end tell
end tell
end open


HTH,
Axel _______________________________________________
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
References: 
 >Print to PDF work flow (From: Joe <email@hidden>)
 >Re: Print to PDF work flow (From: Axel Luttgens <email@hidden>)
 >Re: Print to PDF work flow (From: Joe <email@hidden>)

  • Prev by Date: Re: Unable to deal with audio file
  • Next by Date: Re: Re. Print to PDF work flow
  • Previous by thread: Re: Print to PDF work flow
  • Next by thread: VERY NOOB help!
  • Index(es):
    • Date
    • Thread