"PDF Open Options" in Applescript

So I am trying to batch convert a bunch of PDFs to JPEG files as part of a larger Applescript, and I'm finding that some of the parameters in "PDF Open Options" are ignored. Namely, the "height", "width" and "constrain proportions" parameters.
This code is lifted directly from the Photoshop CS3 Scripting Guide (with filename changed, of course):
tell application "Adobe Photoshop CS3"
set myFilePath to alias "WABEL0457937:Users:Charles:Desktop:8925.pdf"
with timeout of 10000 seconds
open myFilePath as PDF with options {class:PDF open options, height:pixels 100, width:pixels 200, mode:RGB, resolution:72, use antialias:true, page:1, constrain proportions:false}
end timeout
end tell
In the resulting file, the "resolution" is correct, but the height and width are calculated using the PDF's original height and width multiplied by the resolution, and the image is constrained to the original proportions.
I thought it might be a collision with specifying the resolution and the height/width in pixels, so I tried omitting the resolution, but then it just defaults to 300.
Anyone else create a script that opens PDFs and run into this?

Thanks for that!
(If those parameters are deprecated since CS2, it's probably bad form for Adobe to use them in their documentation for CS3. Just sayin'!)
Anyway, it looks like the shell script you quoted gives the page height in points with an assumed resolution of 72 DPI. I can use that with my target dimension to calculate what to set the resolution to.
In case it helps anyone else, here's the working code I came up with:
-- ("str_replace" is a custom function to find and replace text in a string, it's not built-in to Applescript)
set pageHeight to do shell script "/usr/bin/mdls -name kMDItemPageHeight " & quoted form of (POSIX path of this_item as string)
set pageHeight to my str_replace("kMDItemPageHeight = ", "", pageHeight)
set pageWidth to do shell script "/usr/bin/mdls -name kMDItemPageWidth " & quoted form of (POSIX path of this_item as string)
set pageWidth to my str_replace("kMDItemPageWidth = ", "", pageWidth)
if (pageHeight as number) is greater than (pageWidth as number) then
set pdf_resolution to round (1000 / (pageHeight as number) * 72) rounding up
else
set pdf_resolution to round (1000 / (pageWidth as number) * 72) rounding up
end if
try
with timeout of 5 seconds
open alias ("WABEL0457937:Users:Charles:Desktop:Test:image_prep:" & image_id & ".pdf") as PDF with options {class:PDF open options, resolution:pdf_resolution, mode:RGB, use antialias:true, suppress warnings:false, use page number:true, page:1, crop page:media box}
end timeout
on error
-- I have some sections here that check for and handle progress windows, password prompts, and such
-- so the script can either continue or fail gracefully
end try
All of the images coming out of this script are just over 1000 pixels at their widest dimension. Since it's not critical that they be exactly 1000 (just very close), I was able to completely eliminate the resizing portion of the script to save even more processing time.
Thanks for the pointers, everyone!

Similar Messages

  • Open file in Photoshop CS4 with PDF open options

    Hi, I need to open Illustrator file in Photoshop with PDF open options and set the crop page options to media box. I am not sure how to do it. Here what I have that doesn't work:
    *open file "SPACE:Marketing:webTemplatesCreation:working:die_front.ai" with PDF open options media box crop page*
    Thank you for your help.
    Yulia

    Open options are a list… So you supply like so…
    open theFile as PDF with options ¬
    {class:PDF open options, bits per channel:eight, constrain proportions:true, crop page:media box, mode:CMYK, page:i, resolution:300, suppress warnings:true, use antialias:true, use page number:true}
    Where 'theFile' is an alias of your PDF file and 'i' is your page to open (if in a loop) else use an integer…

  • On downloading pdf, "open" option is not available in IE10

    When i attempt to download pdf file, a pop up opens and the option shown it are "save" and "cancel" only. There is no such option called "Open" in that pop up. I use Adobe reader version 10.1.3. Kindly provide me what settings i need to change in IE10 browser, so that i get "open", "save" and "cancel" button in the popup, when i download pdf file. The browser which i use is IE10.

    I don't get any pop-up when clicking on a PDF link in IE10 / IE11; it just opens in the browser.
    What options do you get when you right-click on a PDF link, e.g. on http://helpx.adobe.com/pdf/adobe_reader_reference.pdf ?
    P.S. are you running IE10 in 64-bit mode, by any chance?

  • PDF Open Options

    Hi,
    Is it possible to open a PDF file starting on a particular page?
    Are there more commandline options?
    Thanks
    Robert

    Thanks for the fast reply.
    Robert

  • How can I make my PDF open to "Fit One Full Page to Window" by default regardless of who is opening it?

    Hi, everyone. I am currently creating PDFs that have different page sizes (2 pages at 8.5" x 11" and other pages that range from 40"w x 80"h to 150"w x 150"h). I'm trying to package some artwork templates and artwork guidelines together for my clients to make it easier for them to access this information.
    The current issue I am running into is that I cannot figure out how to make these PDFs open with a default view of "Fit One Full Page to Window". I know how to set the default on my Acrobat Reader but I need it to default to this view when someone else opens it on their computer to view. (PDF currently opens the first page correctly but the rest of the pages are not previewing to fit page based on their page size. The only thing that reacts the way I want these documents to be viewed is the "Fit One Full Page In Window" option but I need to know how to default the PDF to view this way every time.)
    Any help is appreciated! I'm under a deadline so the sooner I can resolve this the better!
    Thanks in advance!
    Jenny

    There is an option for the Initial View that is "Magnification:" "Fit Page".  And this works for the initial page when the PDF is opened and it does not matter what the page size it, Acrobat/Reader will automatically fill the screen with the page. If you want the zoom type to change with each page then you need  add a page open script to each page to set the pages zoom type to "zoomtype.fitP"
    this.zoomType = zoomtype.fitP;

  • How to view adobe flash? how to save pdf opened in safari?

    I am new user on vista.
    Safari is cool. got addicted but have toughtime getting used to it.
    1. Flash files won't run. Adobe do not have flash plugin for safari
    http://www.flickr.com/photos/8869854@N04/545930914/ for reference
    2. PDFs open in Safari with no option to save the downloaded files
    I am sure mac pros would have found a way. Let me know
    Dell Inspiron 6400   Windows Vista   Ultimate Edition

    1. Flash plugin can be downloaded from apple at <http://www.apple.com/safari/download/plugins.html>
    2. There's also a Acrobat Reader plugin at the page mentioned above. With this, a 'Save a copy' button is displayed in the acrobat toolbar. On osx with builtin pdfviewer, a right-click on the pdf will show a menu with the option to save it.
    Don't forget to restart after installing the plugins

  • Interactive PDF, open file in new window.

    Hello everyone,
    I was unable to find this on the net or I could be using the wrong typed search. Created a successful interactive document. I attached a portfolio to this interactive document. I have 3 images. Two are hyperlinked to specific urls which work just fine. I have a sample button which opens the pdf. The only problem I have is that the pdf open in the current pdf window of the past file, so one has to reopen the original file again to access it. I could create a button on the portfolio webpage to go back to the original document, but that would be 20 buttons.
    Is there a way for someone to click on the sample button, but open up a new window like you would for a webpage?
    Right now the setup in the Buttons and Forms window:
    Sample button
    Type: button
    Name: Sample
    Event: On Release or Tap
    Open File - Checked
    Select File: current path
    PDF Options
    Description: Portfolio Samples
    Printable - Checked.
    That is pretty much it.

    Not everything can be done in InDesign when it comes to interactivity and forms. I believe you have to use a JavaScript in Acrobat to get the file to open in a new window. I can't provide you a specific reference. Ask on the Acrobat forums.

  • PDFs open with reader instead of Acrobat Pro

    OS: WinXP
    A/Reader version: 9.3.4
    A/Acrobat Pro version: 7
    Issue:
    PDFs open in the Reader and not in Acrobat Pro.  I changed the File Association to open them with Acrobat Pro and it works fine for the rest of the day, but when I log in the next day it reverts back to opening in A/Reader again.  This is an issue because of the way we have to access the PDFs at work, from within IE on a server.
    Someone at work thought there might be a registry hack needed to fix this.  I have looked at the registry entries for Reader and Pro, but there's nothing obvious to me.
    One other thing that I have not tried as yet is to log in as Administrator and select (tick) the "Always use the selected program to open this kind of file" option.  Maybe it might seem obvious that this is what's needed, but it was working fine prior to last week.  The tick is greyed out when logged in as a 'normal' user, but the tick is on too.
    I guess someone will suggest I do this anyway and see if it resolves the problem, before looking at the registry.  :-)
    Many thanks in advance for all suggestions.
    Paul

    PaulrKiwipn wrote:
    I guess someone will suggest I do this anyway and see if it resolves the problem, before looking at the registry.  :-)
    Mostly you will get the suggestion to remove one or the other from your system and repair or reinstall the remaining application. It is not a recommended or supported configuration having both.
    Another suggestion is to reinstall Acrobat Pro. That works for about 4 out of 10 people.

  • PDF opens in Reader but Reader is not my default viewer

    I have doPDF as one of my printers so I can create a PDF file. In Control Panel Folder Options, my default PDF viewer is set to Foxit. That is what I want. I have Acrobate Reader on my PC for the rare instances I NEED Acrobate Reader. When I select doPDF to create a PDF file, the generated PDF file is opened but it opens in Acrobate Reader instead of Foxit (doPDF opens the newly created file apparently for verification that the PDF was created). Since Foxit is my default viewer, why does the PDF open in Acrobate Reader instead of Foxit? (Neither the Foxit people nor the doPDF people know why).
    BTW... When I select a PDF file in Windows Explorer, it opens in Foxit.
    In advance, Thanks

    In Run type regedit and open following registry path(Second part may differ from machine to machine):
    HKEY_USERS\S-1-5-21-762979615-2031575299-929701000-XXXXXX\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.pdf
    On the Right panel ,right click and Add "String Value" by the name "Application" and then Modify(Right Click) this "Application" and add Value data as the name of application by which you want open pdf file.Eg. If you want to make Acrobat as your default application ,put Acrobat.exe or put  AcroRd32.exe if you want Reader as your default app. Similarly put the name of corresponding .exe for other pdf Readers you have and you want to make a particular as your default app.For knowing the name of  exe of other Readers, just check in “OpenWithList” just below .pdf(on left).
    I hope it can solve your problem

  • Acrobat print window crashed when try to a print the PDF opened through browser

    Hi,
    I have Acobat pro and reader installed on my machine.
    I have set the properties - Open pdf in browser. So, all the PDFs are opening in browser uses Acrobat not the reader.
    And this is way I want. It was woking fine on Windows XP.
    After Windows 7 upgrade, Print option on acrobat (pdf opened in browser), makes browser crashed. Printing window (pop up) appears but looks it is hanged. No OK, cancel buttons appears.
    If I uncheck the acrobat properties - Open pdf in browser, then it works fine. But my other applications which need acrobat in the browser start crashing.
    Is there any property/setting which is restricting print dialog box/ making browser not to respond?
    Please advise.

    Yes, I updated Acrobat through update option last week.
    Acrobat 9.5.2
    Windows 7 64 bit OS
    Adobe Reader XI
    Browser IE 10
    In print window couple of fields which get drop down automatically have blank values.
    Please let me know if you need more information. 
    Arcobat shows proper print window (pop up) if I uncheck the checkbox - Open pdf in browser. And then I open pdf in acrobat and try to print it.

  • Acrobat crashed when try to a print the PDF opened through browser

    Hi,
    I have Acobat pro and reader installed on my machine.
    I have set the properties - Open pdf in browser. So, all the PDFs are opening in browser uses Acrobat not the reader.
    And this is way I want. It was woking fine on Windows XP.
    After Windows 7 upgrade, Print option on acrobat (pdf opened in browser), makes browser crashed. Printing window (pop up) appears but looks it is hanged. No OK, cancel buttons appears.
    If I uncheck the acrobat properties - Open pdf in browser, then it works fine. But my other applications which need acrobat in the browser start crashing.
    Is there any property/setting which is restricting print dialog box/ making browser not to respond?
    Please advise.

    Yes, I updated Acrobat through update option last week.
    Acrobat 9.5.2
    Windows 7 64 bit OS
    Adobe Reader XI
    Browser IE 10
    In print window couple of fields which get drop down automatically have blank values.
    Please let me know if you need more information. 
    Arcobat shows proper print window (pop up) if I uncheck the checkbox - Open pdf in browser. And then I open pdf in acrobat and try to print it.

  • Default initial view that applies to all PDFs opened

    Is it possible to set a default PDF initial view that applies to every pdf opened, regardless of the source of the pdf?  Simply put, I want to have the initial view of EVERY pdf I open to be at 100% zoom and no bookmark panel.  Obviously this can be done manually every time I open a pdf, which will then reopen with those settings.  It seems logical that I should be able to set a default initial view that will apply to any pdf I open and not require me to manually set every one. I've tried every option noted in all the forums I have found, using prologue and epilogue, file>properties, edit>preferences, action wizard.  It all boils down to this...I don't want to manually set anything.  I want to open pdf documents in the initial view I prefer.

    I have spend a great deal of time researching this exact question.  What I have found is that essentially the answer is "no".  I have come up with a workaround that isn't painless, but it gets the results I want without having to touch every pdf after it is opened. 
    I set up an Action in Acrobat that has the options I want (page and 100% with no bookmark panel open) and run it against pdfs in a specified directory.  It sets all initial views for any pdf in the directory to what I want.  The action can also be run against any directory or file, but for my purposes I find doing it in a sort of "batch" mode works best.  To set the Action:
         1.     Open Acrobat (with no other pdfs open)
         2.     File >Action Wizard>Create New Action
         3.     On right panel set
                             Start with:     "Ask When Action is Started"
                             Save to:          "The Same Folder Selected at Start", check "Overwrite existing Files"
                                                 (if you plan to run this action against a directory as I am)
         4.     From left panel
                             Select Document Processing>Set Open Options
         5.     In right panel click on "Options" for the step you just created and set the initial view you desire    
         6.     Save
    When you want to use the action you can access it from Acrobat opening window or any pdf file you currently have open.
    Another alternative is to use Distiller with epilogue.ps or prologue.ps to append this initial view to any document created.  As I don't create many pdfs, it didn't really help with what I wanted to do. .

  • PDF download option to be enabled

    Hello All,
    I am new to ISA development, and need your detailed help and advice on the requirement. Please note that I am working on ISA R3.
    The requirement is to have a pdf download option on the orderstatusdetail.jsp . From backend, I am being given a RFC with binary format output in a table to accomplish this.
    Please tell me how to proceed ahead.
    Thanks & Regards,
    Vibha

    Not sure if you are still waiting for an answer. Below details:
    1. Add a link on your jsp to call an action
    2. Implement action, bo, bo implementation, backend classes with corresponding methods and parameters
    3. In your backend class call the fm to get the xstring data, convert to byte array and pass it all the way back to your action
    4. Now with the byte array open a pdf file using mime type application/pdf
    5. reply back if you get stuck
    pradeep

  • I do not have the Print To PDF Setup option

    the instructions to intall the Adobe CreatePDF printer are below. I do not have the "Print to PDF Setup option on my Adobe site. Can someone help me with this?
    Install Adobe CreatePDF Desktop Printer 
        In Adobe PDF Pack, click Print To PDF Setup.
      Click Download Installer.
      Double-click the AdobeCreatePDFDesktopPrinterSetup.exe file you downloaded and follow the prompts to install Adobe CreatePDF Desktop Printer.
    Note: You need administrator rights to install the Adobe CreatePDF Desktop Printer.

    To install Adobe CreatePDF Desktop Printer:
    1. Log into https://createpdf.acrobat.com/signin.html with your Adobe ID and password
    2. Select “Convert to PDF” tool from right pane
    3. Click “Download CreatePDF Desktop Tool” link
    4. Click “Download Installer” button
    5. Click “AdobeCreatePDFDesktopPrinterSetup.exe” file
    6. During the installation , you need to enter your Adobe ID and password
    If your system is Win 7 SP1 please install a hot fix to update inetpp.dll file from http://helpx.adobe.com/acrobat-com/kb/createpdf-desktop-printer-windows-7.html
    If you have not installed Adobe Postscript(PS) printer driver please install it:
    How to Install PS printer:
    1. Open Start menu > Devices and Printer ( or from control panel) and select "Add a printer"
    2. Select "Add a local printer"
    3. Select "Use an existing port: LPT1: (Printer port)
    4. Select any company and any PS printer with Adobe PS printer driver(not clone) such as Xerox and Xerox Phaser 6120PS
    thank you.
    Hisami

  • "photoshop open options are incorrect"

    I have just downloaded photoshop to my Windows 7 computer and I am unable to open any photos at all.
    Every time I try there's an error message: "photoshop open options are incorrect"
    I have tried opening photos from the Internet, from my digital camera, sample photos everything but nothing will work.
    I've tried JPEGS, tiffs, pdfs etc. with no luck and have made sure to include the file type in the photo name.
    This is so frustrating as I am unable to work on any photo whatsoever.
    Any help would be grately appreciated

    If Photoshop starts use menu Help>system info... then copy and past the info here.
    Supply pertinent information for quicker answers
    The more information you supply about your situation, the better equipped other community members will be to answer. Consider including the following in your question:
    Adobe product and version number
    Operating system and version number
    The full text of any error message(s)
    What you were doing when the problem occurred
    Screenshots of the problem
    Computer hardware, such as CPU; GPU; amount of RAM; etc.

Maybe you are looking for

  • Windows 7 64bit error message during system backup

    As part of a backup routine, I have a scheduled disk image backup to an external hard drive. This worked happily for some months - until now! I now get an error message - " The operation failed due to a device errror encountered with either the sourc

  • Optical drive is not being recognized by OS

    Can anyone help me? When I insert a disk the drive spools up and then stops. The disk is not recognized and then the disk will not eject. When I open DVD player it says that there is an initilization error and that there is no drive recognized. Can a

  • Using an ASA 5505 as a Certificate Authority and Distribution Point?

    I had a question about the limitations of an ASA 5505 and using it as CA. The setup would be as follows: 2 ASA 5520's in set up for high availability failover. 1 ASA set up with a local CA server. If I had to set up VPN to connect to an interface on

  • Can't Install Updates Acrobat X Pro

    Hello.  I am trying to install updates to Acrobat X Pro.  Every time I try to install from the Help - Check for Updates menu, I get the error: Error 1321. Installer has insufficient privilages to modify the C:Program Files..... with some folder and f

  • Streaming result of cfpdf merge to browser, NOT file on server

    Hi guys, as my title suggests...I have a PDF document that was created with cfdocument...I then have used cfpdf to merge the results of that PDF with 2 other PDF's to make a final document...my question is, how to do get this resulting PDF to open in