Export PDF Workflow with Applescript and CS3

Hello,
I am setting up some PDF workflow with Applescript.
On a given moment, as my script runs and after getting some user-input answers to questions in some dialogs, my script tells InDesign CS3 to open the Export Adobe PDF window for the current document. I copied and pasted that small part of the script:
tell application "Adobe InDesign CS3"
tell document 1
export format PDF type to "Macintosh_HD:Test01.pdf" using "somePreset" with showing options
end tell
end tell
When you run this small part of my Applescript, InDesign opens the Export Adobe PDF window (as expected) waiting for me to click on "Export". That is exactly what I want, since the user is given here a last opportunity to change some values (for example page range, or spreads). When all is set, the user can click on Export to close the dialog and finish the script.
Problem: I was hoping that the Adobe PDF Preset "somePreset" would be selected in the first pull-down menu of the Export Adobe PDF window when this window is opened by the script. Unfortunately the last used preset is always selected by default. Anyone suggestions or help?
Kind regards,
Bertus Bolknak.

My operators enter the page range and filename into a dialog box. Then I set those in the script. I use the Press Quality preset to start with and then set the changes I want into a export variable. I set things like bleed, marks, page range, etc.
Here is an example:
set theProps to properties of PDF export preset "[Press Quality]"
try
delete PDF export preset "Schmidt PDF"
end try
set theStyle to {name:"Schmidt PDF", acrobat compatibility:acrobat 7, bleed top:"0.125i", bleed bottom:"0.125i", bleed inside:"0.125i", bleed outside:"0.125i", page marks offset:"0.125i", include ICC profiles:Include None, effective PDF destination profile:use no profile, effective PDF X profile:"No Color Conversion"} & theProps
make PDF export preset with properties theStyle
set properties of PDF export preferences to theStyle
set color bitmap sampling of PDF export preferences to none
set grayscale bitmap sampling of PDF export preferences to none
set page range of PDF export preferences to (item i of myPageList) as string
export document 1 format PDF type to (PrinergyFolder & myJobNumFinal & "_" & VerCode & ".pdf") as Unicode text without showing options
I am also doing this in Quark.

Similar Messages

  • Does anyone know how to use pages so you can export pdfs from the internet and automatically drag words from the document into the file name of the pdf (i.e., author, title of a scientific paper)

    Does anyone know how to use pages so you can export pdfs from the internet and automatically drag words from the document into the file name of the pdf (i.e., author, title of a scientific paper). For example, if I am downloading a paper by smith called "Surgery" that was published in 2002, it will automatically set the file name in the download to smith- surgery 2002. I have heard pages is smart enough to do this.
    thank you

    Pages can export only its own documents. They may be exported as PDF, MS Word, RTF or Text files.
    Pages can import (ie. Open a file as, or Insert a file into, a Pages document) documents in several formats, but won't rename the document as you describe. Documents that can be Opened (eg. Text, AppleWorks 6 WP, MS Word files) are converted to Pages documents, and retain their original names, with .pages replacing the original file extension. Files that can be Inserted (generally .jpg, .pdf and other image files) become part of the existing Pages file and lose their names.
    It may be possible, using AppleScript, to extract the text you want and to Save a Pages file using that text as the filename, but that would depend in part on being able to identify which text is wanted and which is not.
    How will the script determine where the author's name begins and where it ends?
    How will the script recognize the beginning and of the title, an decide how much of the title to use in the filename?
    How will the script recognize the year of publication?
    For papers published in a specific journal, with a strict format for placing each of these pieces on information, or containing the needed information as searchable meta data in the file, this might be possible. But it would require knowledge of the structure of these files, and would probably handle only papers published in a specific journal or set of journals.
    Outside my field of knowledge, but there are some talented scripters around here who might want to take a closer look.
    Best of luck.
    Regards,
    Barry

  • How is the best way to export my project with clips and videos?

    I would like to save my project and export the project with clips and videos included. What is the best way to do it?

    Can you clarify:
    clips and video
    Seems as though you want to retain the original media?
    Export as a Master File to get a good quality export file of your Timeline.
    Al

  • I'm so confused!! I just want to create interactive pdf files (with video and flash files), but this free trial version is confusing!! help!?!

    i'm so confused!! I just want to create interactive pdf files (with video and flash files), but this free trial version is confusing!! help!?!

    Thanks for your suggestions. I checked to see if the options you suggested were set incorrectly but they were set to sync all. This led me to think the problem was actually in the iphone. I re-initialized the iphone and did not allow the system to restore any of the previous settings. In essence, I forced the phone to reset to factory settings. Then my video podcasts started syncing. All is well now. I did notice that I had seven podcasts selected that were "HD" presentations, and as such, are not compatible with the iphone. I don't know if this had anything to do with my earlier situation, but now I'm getting the video podcasts automatically. I'm happy. It wasn't much fun forcing the iphone to forget all of my preferences and I'm still customizing the phone now several days later. I think I have everything working and back to normal except I haven't identified any of my email accounts as of yet. Thanks for your help.

  • I purchased the Adobe Export pdf 10 hours ago and have not received the e-mail to confirm my address and password, then I can't use it!

    I purchased the Adobe Export pdf 10 hours ago and have not received the e-mail to confirm my address and password, then I can't use it!
    The e-mail address is correct and I've consulted the inbox and the  trashbox without result. And I don't know how to contact the seller Adobe...

    Hi Jose,
    After checking your account, I see that you purchased an ExportPDF subscription back in June (under the same email address that you use here in the forums). There are no other subscriptions under that email address.
    But, you should be able to log in to https://cloud.acrobat.com using this email address and your password. If not, please let us know.
    Best,
    Sara

  • ACR 4.4.1 not Compatible with CS and CS3

    ACR 4.4.1 (and beta4.5) does not work properly on a Windows XP Pro (SP2) computer with both CS and CS3 installed. A Raw file from Pentax 1stDS (.PEF) opened in CS3 through ACR 4.4.1 shows a black thumbnail in the History palette beside the file name. Conversion of the file to Lab Color shows a black image. ACR beta 4.5 shows the same behavior. No version of ACR subsequent to 4.3.1 have worked properly on the Windows computer with CS and CS3 installed. Versions of ACR subsequent to 4.3.1 and prior to 4.4.1 had other idiosyncrasies.

    Pierre,
    A lot of users prefer to print from CS (Photoshop 8 ) because for many users printing is broken in CS2 and in CS3.
    I have Photoshop 7.0.1, 8, 9.0.2 and 10.0.1 installed on my Mac without any problems whatsoever. The ACR plug-in is installed in the appropriate location for each version of Photoshop.
    To launch multiple versions of Photoshop, simply launch the older version first.
    But, and this is a very big but,
    this may not work in Windows. I don't know.

  • I have subscribed to Adobe Export PDF for one year and paid the fee per my credit card.  I just received an sms to inform me of the amount of R230.61 was deducted today by Adobe Systems Software. I did not request to renew for another year.

    I have subscribed to Adobe Export PDF for one year and paid the fee per my credit card.  I just received an sms to inform me of the amount of R230.61 was deducted today by Adobe Systems Software.  If you have charged for another year, please cancel that service and refund me as I did not request renewal for another year.  I don't find this service very useful as documents converted to Word is not really usable when trying to do changes and amendments to the document. 
    Please confirm.
    Regards
    Esther Grove
    082-334-6786
    Email: [email protected]@

    Hi,
    I have cancelled your Export PDF subscription for the order no.AD001162465AP..
    Your refund no.is 66181102.
    You will get the refund in 7 business days.
    Regards,
    Florence

  • How to determine the page count of the front document (pdf-Preview) with applescript?

    Hello, I'm a beinnger apple scripter, and I have 2 questions. First, im trying to find the code to generate a page count for the front document of preview. I tried something like this:
    choose file with prompt "Count the number of pages in this PDF file:" without invisibles
    do shell script "/usr/bin/mdls -name kMDItemNumberOfPages " & quoted form of POSIX path of result & " | /usr/bin/grep -o '[0-9]\\+$'"
    But I dont want to have to choose a file with the prompt, and Im not sure how to get the path or POSIX path of an open pdf that is the front document in prievew to then use that directory to select the file to run the shell script on. This is one step in a much larger sequence of automator/apple script commands for large print jobs.
    The large scale view is:
    1. seleting a group .musx Finale 2014 files and creating pdfs of all the documents
         -Achieved with Automator stuff: [Get selected finder items] [open finder items with Finale 2014] [run applescript to convert to pdf all the open files] (which I have working but without a proper repeat condition)
    2. sorting those those exports into even/odd groups
    3. making the even pages 2 up with a create booklet plugin
    3. combinging even/odd group pdfs in their respective folders
    4. sending the 2 up evens to 1 printer, and the singes to another printer.
    but at this stage in the code/automator this is what i'll need to be doing:
    1. Several pdf documents will be open and I need to determine the page count of the front document.
    2. With that result I need to determine if the pagecount is even or odd.
    3. If its even, I need to save as pdf in a file folder /desktop/PDF Export/Doubles
         - if its odd, I need to save as pdf pages from 1 to (pageCount -1) to /desktop/PDF Export/Doubles, and pages (pageCount) to (pageCount) to desktop/PDF Export/Singles. (example: A 5 page pdf will send pages 1-4 to folder "Doubles", and pages from 5 to 5 to Singles, A 1 page pdf will only send a copy to the folder "Singles." A 2 page pdf will send both pages to "doubles"
    4. once the even/odd pages have had pdfs made in the either or both of the folders, Im going to close the document and repeat for all other open pdfs.
    Which also brings me to my 2nd repeat condition question: how can I repeat (print, save as pdf, close) commands for open files and end the script once all files are closed? This can help me both at this stage, as well the coding stage before in creating the pdfs from open Finale/sibelius .sib/.musx files
    would it be something like this?:
    If front document exists
    try
    tell application "preview"
    <bla bla>
    end try
    end tell
    At stage 1 of the large scale i've gotten the files to export pdfs and close multiple files, but if i say "repeat 4 times" and i have 3 files it can do those commands but it gets stuck trying to repeat the code one more time. I need the repeat amount x to be the # of items in selection from the the original finder window.
    Thanks for the help!

    The following AppleScript will get the POSIX path and filename of the current PDF file. It will just return the integer value for page count. Note: The path retrieved is the actual path to the PDF file, unless it is on the Desktop. In the latter case, the path will be ~/Library/Containers/com.apple.Preview/Data/Desktop/filename.pdf.
    The script assumes that the following folders exist, otherwise you will need a try block to test for their presence.
    The AppleScript dictionary for Preview does not provide a page dictionary entry, that would make a repeat loop and page range possible for saving individual page ranges.
    set pdfDoubles to POSIX path of ((path to desktop) & "PDF Export" & Doubles)
    set pdfSingles to POSIX path of ((path to desktop) & "PDF Export" & Singles)
    tell application "Preview"
      -- gets quoted POSIX path and filename
              set pdfFile to (get path of front document)
              set pdfName to (get name of front document)
      log pdfName
              set cmdArg to "/usr/bin/mdls -name kMDItemNumberOfPages " & pdfFile ¬
                        & " | egrep -o \"(\\d+)\""
              set pageCnt to do shell script cmdArg
      display dialog pageCnt
              if pageCnt mod 2 is 0 then
      -- even
      -- save pdfName in pdfDoubles
              else
      -- save pdfName in pdfDoubles
      -- save individual pages in pdfSingles
              end if
    end tell

  • Automated report/ PDF conversion with AppleScript

    Hello-
    I am attempting to PDF a spreadsheet from Dropbox, and email it to a set list of recipients with AppleScript.  Much of this I have been able to figure out, but I am having some issues with the PDF conversion.  As you can see below, I am still working on sending the xls file, and have not yet been able to get AppleScript to convert a specific tab of the file to aPDF.  I expect scheduling to be handled theough crontab.
    Current script is as follows:
    tell application "Finder"
              set folderPath to folder "Macintosh HD:Users:user:Dropbox:folder:Calculated PO Sheet"
              set theFile to first file in folderPath as alias
              set fileName to name of theFile
    end tell
    set theSubject to "Current PO Report" date
    set theBody to "See attached."
    set theAddress to "recipient email"
    set theAttachment to "CALCULATED PO SHEET.xlsx"
    set theSender to "sender email"
    tell application "Mail"
              set theNewMessage to make new outgoing message with properties{subject:theSubject, content:theBody & return & return, visible:true}
              tell theNewMessage
                        set visibile to true
                        set sender to theSender
      make new to recipient at end of to recipients with properties {address:theAddress}
                        try
      make new attachment with properties {file name:theAttachment} at after the last word ofthe last paragraph
                                  set message_attachment to 0
                        on error errmess -- oops
      log errmess -- log the error
                                  set message_attachment to 1
                        end try
                        log "message_attachment = " & message_attachment
      #send
              end tell
    end tell

    Hi,
    there is a special setup for this requirement. Please see the following support note
    Reference
    Oracle Reports Output For Indian Languages Like Gujarati, Marathi [ID 980554.1]
    Roberto

  • Exporting h.264 with CS4 vs CS3

    Maybe I'm just dumb and this is an easy question....I'm not sure, but here goes:
    I had a project in Premiere Pro CS3, a music video. I'm used to exporting videos as quicktime with an h.264 codec for online streaming from CS3, and they always looked great. A lot of websites cap video uploads to 500MB or a gig, so it was a perfect way to get a high quality video on the net. The 3 minute music video I was working on became a great looking 450MB h.264 movie.
    With CS4 and the adobe media encoder, things are a bit different. I export as a quicktime movie with the h.264 codec, at the same settings (100% quality) but it looks awful. The same music video was around 80MB and didn't look anywhere near the quality of same video exported from CS3. I've tried a number of options and presets, and havn't been able to get the same quality or size file.
    I even checked both files in G-Spot codec reader (great tool) and they were the exact same AVC1-h.264 codec.
    What is happening here? Is the codec somehow used differently in CS4 than in CS3? Is there something I'm not doing to get a high quality h.264 movie out of CS4?
    Thanks,
    Peter

    The bitrate of your output movie depends on your Export Settings. At the bottom of the Preset list is "Edit Export Settings". There you can adjust all the settings just like CS3.

  • Export PDF in Captivate 5 and Publishing CP4 project in CP5

    When I publish flash (swf) videos in CP4, I always tick the "Export PDF" option to also get the PDF version - and then offer the PDFs for download as an alternative to watching online (or send them via e-mail).
    I have learned to live with the fact that the PDF version  - sadly - becomes somewhat blurred. But now, as I am trial testing CP5, I see that besides blurring, the video in PDF gets also distorted - if this is a good word for it: As the software screens change in the video (I record software demonstrations), the new screens show some left over graphics (mainly lines or points - as if remnants of borders of objects, lines, shadows, etc.) from the previous screen.
    The similar thing happens when I publish CP4 projects with CP5 (which I want to do as the Neospeech voices sound much better in CP5) - I see the same leftover graphics, mainly in the full-motion segments.
    Any suggestions on avoiding these issues?

    Hello and welcome to the forum,
    For this purpose you need Acrobat Pro, could you let me know if you have this app? It is coming with the eLearning suite. To export a Captivate file to pdf you do not need it.
    Lilybiri

  • ID CS 4 exporting PDF books with low-res graphics

    I've been exporting ID CS 4 documents to PDF with absolutely no problems, but today I created a book containing multiple documents, and I'm running into a snag when exporting.
    If I open a single document and export as PDF, everything is fine. All the images in the document are rendered in high resolution.
    If I open a book containing that very same document as well as another document, then I export the book as PDF, many, but not all, of the graphics in the original document are rendered in very low resolution. See image below.
    Why? I didn't change a single thing in the dialog box for exporting to PDF.
    I did several tests and it appears that if I open all the documents which comprise the book, all the images in the exported PDF are high resolution as desired. However, ultimately I want to create a book with 120+ documents, and there's no way I can keep them all open in memory without ID crashing. Yes, I suppose I can open a subset of the documents, export them, then combine the PDFs in Acrobat, but that's a cludge workaround.
    Surely ID CS4 should be able to properly export as PDF a book containing a lot of documents with images, but damned if I can figure out what's causing these low-res images to appear.
    If anyone has a solution, I would be very grateful if you'd share it with me.

    I don't have a lot of files to test with, but I have one book that has about a dozen component files and around 200 images that's still in CS4. I just tried and export withthe docs closed here, and ID opened them all, as expected, exported, and reclosed them. I see no signs of image degradation, but these are not scaled images -- they were all converted to the correct profiles and scaled in Photoshop and then re-linked during the editing process, and I run Windows, and I'm only at 6.0.5 because this book has a number of Illustrator charts that I spent hours getting right in the first edition and I didn't want to risk them changing, so it may be an apples to oranges comparison.
    The last thing I have for a suggestion to try would be a manual prefs replacement (so you can put your current set back when it turns out to be irrelevant). See Replace Your Preferences
    Other than that, I'd say you may have found yourself a bug, and there's not a chance in the world that it will ever be fixed for CS4.

  • Exporting Reference Movies with Lion and QT X

    Has anybody else had issues exporting Reference Movies from FCP7 under Lion?
    When we open a Reference Movie created with FCP7/Lion in QT X 10.1 (the version that ships with Lion), we're only able to see the first frame of the movie, followed by black/blank video, and audio only.
    Curiously, QT7 (on Lion) and QT X 10.0 (on Snow Leopard) are able to play these movies without a problem.  However, a number of 3rd-party applications and devices that we use in our facility (most notably an Omneon Spectrum) choke on the reference movies in a similar manner to QT X 10.1.
    We've got a support ticket open with Omneon, although they claim to have never heard of the problem, and are currently picking their way through the issue as well.  However, there are scattered reports of others who are having similar problems.
    For the sake of thoroughness, it's worth mentioning that this is a brand-new Mac Pro with Lion 10.7.2, and FCP 7.0.0; both fresh installs (apparently downgrading to SL is unsupported on this machine).  We tried patching FCP to 7.0.3 with Pro Application Update 2010-02, which did not resolve the problem.  We've since reverted to 7.0.0, to rule out the patch as the culprit. The reference movies in question do not contain any edits that would require a render, and everything's stored on a NAS that's accessible to the whole office (hence the fact that we're able to view the files on our Snow Leopard machines.
    Picking apart the reference movie using Apple's Atom Inspector shows one curious detail in the alias data inside 'dref' atom inside of the reference movie (which is how QT figures out where the original media is).  Rather than being a simple file pointer, the alias actually contains a whole bunch of information, including the "relative" path to the video data, relative to the original location of the reference movie, as well as the absolute path of that file, starting from the root of the filesystem.  Both of these paths are presented in "Mac" and "Unix" formats, ie:
    Mac:   volume:folder1:folder2:filename
    Unix: /volume/folder1/folder2/filename
    Key difference is the use of colons, rather than slashes to separate folders in the path.  At least, that was the key difference prior to Lion.  We've noticed that, while the SL machines export reference movies with paths that resemble the above, our Lion machine generates:
    Mac:   volume:folder1: folder2: filename
    Unix: /volume/folder1/folder2/filename
    (Notice the spaces)
    When we attempt to play the movies with our Omneon applications or in QT X 10.1, our NAS throws a whole bunch of 'File not Found' errors.  Presumably, those spaces are the culprit.  Removing the spaces with a hex editor completely mangles the QT movie, and renders it compltetely unplayable.
    Unfortunately, the alias data inside the dref atom doesn't appear to be a standard Mac OS alias, and the only documentation of the alias file format (linked above) is hilariously out of date.  Presently, the format is undocumented, and it appears that developers are discouraged from interacting with the files directly.  In other words, I have no way of knowing whether or not the spaces are actually significant, or are a completely innocuous and documented part of the file format.
    Has anybody encountered anything similar, or found a solution?  I'm at a bit of a dead-end here, and would welcome any advice.

    I totally understand where you're coming from; Apple's support of some of QuickTime's more advanced features has unfortunately been waning for some time now. 
    Avoiding the buggy parts of the program is always a good strategy, although the ability to quickly export reference movies is something that is absolutely vital to our workflow.  Simply put, losing these files is an absolute dealbreaker.
    Two things seem to be going on... FCP on Lion appears to be generating slightly malformed reference movies, and QT X 10.2 seems to be freaking out when it tries to play back those movies (while prior versions are seemingly able to work around the problem).  I suppose this could have something to do with the introduction/evolution of QTKit and AV Foundation on Lion, although I'm surprised that this would be affecting FCP7, which was built around older APIs.

  • Problems with AppleScript and MS Office 2011

    The script below used to work great for converting MS Word files to PDF files.  However, sometime during the last few months it has stopped working and will no longer compile without error.  Possibly after upgrading to Mavericks but I'm not exactly sure when it stopped working, could have been an update to Office.  Anyway, the error I'm getting when I compile is a Syntax Error, "Expected end of line but found class name".  The editor highlights "document" in the line "set the_doc to active document".  I'm not very familiar with Applescript but I have opened the scripting dictionary for Microsoft Word in the Applescript editor and I do see "active document" as a property of the "document" object.  So why doesn't the compiler recognize it?  Am I missing something obvious or was there some sort of change in Mavericks that broke this functionality?
    I've been pulling my hair out trying to get this script working again  but I have not had any luck.  I've tried uninstalling and reinstalling Microsoft Office per instructions from Microsoft.  I have all the latest updates and patches. Any help would be greatly appreciated.
    Here is the original code which used to work just fine.
    -- Stephen Norum
    -- [email protected]
    property pdf_ext : ".pdf"
    on remove_extension(file_path)
        -- remove the extension if it exists
        set stripped to do shell script ("F=" & quoted form of file_path & " ; echo ${F%.*}")
        return stripped
    end remove_extension
    on get_pdf_path(doc_path)
        set doc_path to remove_extension(doc_path)
        -- Try the simple name first
        set pdf_path to (doc_path & pdf_ext)
        -- Otherwise, number the pdfs
        set counter to 1
        tell application "Finder"
            repeat while (exists pdf_path)
                set pdf_path to (doc_path & " " & counter & pdf_ext)
                set counter to counter + 1
            end repeat
        end tell
        return pdf_path
    end get_pdf_path
    on run {input, parameters}
        repeat with file_name in input
            tell application "Microsoft Word"
                open file_name
                set the_doc to active document
                set doc_path to path of the_doc
            end tell
            set pdf_path to get_pdf_path(doc_path)
            tell application "Microsoft Word"
                save as active document file name pdf_path file format format PDF
                close active document
            end tell
        end repeat
        tell application "Finder"
            activate
        end tell
        return input
    end run

    try this syntax:
                        tell application "Microsoft Word"
      save as (active document) file name pdf_path file format PDF
                        end tell
    Apparently they changed the enumeration label from format PDF to just plain old PDF without bothering to update the scripting dictionary or ensure backward compatibility. If you want to know how they managed to do that, they are still not using sdef or even scriptSuite xml files, but are loading the scripting information from old-school (i.e. os 8 or os 9 style) resource files.
    I've occasionally considered writing Microsoft a proposal to redo the Office scripting dictionaries so they are less crazy-making, but I'm not sure I'd survive the attempt.

  • Need help with applescript and Xcode 4.3.2

    I'm trying to write my first application that will involve a GUI. I can code applescript using script editor with a bit of effort, but I'm want to have users input more than one piece of information in the pop up. So, I download xcode, create my first applescript cocoa project go to MainMenu.xib and add a bunch of labels, text fields and buttons. Looks fairly nice... Go to start it and... nothing (well the window pops up, but it doesn't do anything). Unfortunately, I haven't figured out how to link the window to the applescript... So, how do I...
    * Have the applescript prepopulate data in the text fields and pulldowns
    * Once the user changes the data in the fields tell the applescript
    * Tell the window to close and pass the control back to the applescript once either the cancel or submit button is pressed.
    More detailed...
    * What's an outlet and how do I use it here? Which of the 18 outlet(s) do i use for this?
    * What's a property (referenced on one of the web pages I saw around applescript and cocoa) and do I need them here?
    Looking at the documentation with xcode, there isn't a lot about xcode and applescipt. Looking at the web, the top links are a few years old. So, links to good relevent documentation would be very nice as well as direct answers to the questions
    Thanks,
    Scott

    I'm not sure why you are closing it, but the NSApplication class is what keeps track of the windows.  If you don't want to connect the window to an outlet from the interface editor, you can use something like
    set theWindow to current application's NSApplication's sharedApplication's mainWindow()
    ...and from there you can use whatever NSWindow methods, for example
    theWindow's performClose_(me)

Maybe you are looking for