Script inquiry (help please :) - Crop PDF and save as JPG

I'm sure this will be an easy one for some of you. I want to have a script that takes a PDF of a cover file (usually very wide since it's printed along the front, spine, and back of the book), crops out the crop marks (I have a little code snippet that I found that can do this), prompts for the width of the front cover size (i.e. 6 inches for a 6" x 9" book), and then sets the crop box from the far right edge to the width that was input. I'm trying to put together a little tool for my company's Art Department to save them time creating jpegs of our books covers (there are a lot of them). Their current process is to place the PDF in Indesign on a 6x9 page and export a JPG from there, seems time consuming.
As an example, a cover file for one of our books, without the trim marks, is 12.625" by 9". The script would prompt a user for the width of the cover, they would input 6" and it would, ideally, set the crop box to be 6" wide and 9" high (not touching the height, since that is already correct), and then save that cropped PDF as a JPG (and not save the cropped PDF so as to leave it untouched after the process is done), preferably with an option to select the output location and even batch run it on a bunch of PDF cover files.
I'm sure this is possible, does anyone think it will be particularly easy? I don't have a lot of experience but I'm not necessarily looking for a handout since I'm not really bringing a whole lot to the table (but will take one!). Any help or pointers appreciated, or maybe someone who already has something like this could provide some help or resources to get started, even If I have to piece it together from a series of helpful URLs.
Thanks in advance for any helpful responses I'm anticipating!
Nick

Take a look at these two Acrobat JavaScript methods:
Doc.setPageBoxes():
http://help.adobe.com/livedocs/acrobat_sdk/11/Acrobat11_HTMLHelp/wwhelp/wwhimpl/common/htm l/wwhelp.htm?context=Acrobat11…
This function allows you to set the crop box. When you combine this with Doc.getPageBox(), you can then adjust the crop box to e.g. the 6" area you want.
Doc.saveAs():
http://help.adobe.com/livedocs/acrobat_sdk/11/Acrobat11_HTMLHelp/wwhelp/wwhimpl/common/htm l/wwhelp.htm?context=Acrobat11_HTMLHelp&file=JS_API_AcroJS.89.530.html
As you can see, the cConvID parameter allows you to specify the output format - and JPEG is an option.

Similar Messages

  • Save as PDF and Save PDF as PostScript options in the Printer dialog are not supported.

    I downloaded Indesign CS3 trial and liked everything about it until I attempted to print to postscript and got that message. Nothing I have tried has helped. I have seen in various forums that others are having the same problem, but haven't found any solution offered. I am running Tiger 10.4.10 on a new Intel Imac with 3G ram. This is a procedure I use very often in my workflow, and have never had this problem with CS2 on my PC or other Macs. Is there a solution? I downloaded the .1 update and installed that and it didn't change anything.

    PLEASE SOMEONE HELP ME.
    Its the first time Im using print booklet option to save my file. I have the same problem when trying to save as pdf and get the
    "The Save as PDF and Save PDF as PostScript options in the Printer dialog are not supported."
    I'm trying to save a .pdf of a booklet of a facing pages document of A4 size each facing page for a whole size A3, then hope to let the pages be correctly arranged by inDesing, then print and staple.
    Meaning pages will be like this - Page #60 left side [of the A3] - page #1 right side [of the A3] , page # 2 right side[of the A3] - page #59 left side[of the A3] etc...
    I CANT DO IT. I tried to follow Melvin Thompson , but when I choose save .ps and open it in preview all I see is independent a4 pages and just the left ones , .. How can I save my file as .pdf ready to be printed in a3 ?
    I really appreciate any help.

  • Load a picture - crop it and save it back as jpg

    Hi,
    I need to build a flash application In which I load a jpg, make a selection of it (a mask or something like crop tool) and save it back. Loading the picture and making the mask are not a problem. What I need is some help with saving the edited picture back.
    So can you help me with this, or can you give me some tips where to look at.
    Thank you in advance!

    Hi CaioToOn!
    First of all thanks a lot for the reply. Sorry for not doing that sooner, but I wanted to explore it a little before.
    My application is almost set, load the image, made the crop, save It to a server with a php and all good until here.
    Now I want to drag the image, make a scale of it and for that I used an Matrix (also done).
    My problem came when I wanted to position the image holder on X and Y, as soon the picture loads . After doing that my new cropped image goes strange.
    I know it seams like a noob question but I'm kinda of stuck.
    Can you please take a look at my code here, because it’s drives me crazy and I can’t figure it out.
    Thanks a lot,
    Andrei

  • Open all pages in a PDF and save them as sequential files

    I'm trying to make a script that will open all pages in a multi-page PDF and save them as sequential files, but I have had no luck with the simple script in the "Adobe Ilustrator CS5 Reference: JavaScript".
    there example to open a PDF to a designated page does not work for me in Illustrator CS 5.
    // Opens a PDF file with specified options
    var pdfOptions = app.preferences.PDFFileOptions;
    pdfOptions.pDFCropToBox = PDFBoxType.PDFBOUNDINGBOX;
    pdfOptions.pageToOpen = 2;
    // Open a file using these preferences
    var fileRef = filePath;
    if (fileRef != null) {
    var docRef = open(fileRef, DocumentColorSpace.RGB);
    if anyone can get me on the right path it would be appreciated.

    Hi DuanesSFK,
    you can open a PDF page on this way (tested with CS3 and 5):
    //OpenPDFpage2.jsx
    var uILevel = userInteractionLevel; 
    app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
    // Opens a PDF file with specified options
    var pdfOptions = app.preferences.PDFFileOptions;
    pdfOptions.pDFCropToBox = PDFBoxType.PDFBOUNDINGBOX;
    pdfOptions.pageToOpen = 2;
    // Open a file using these preferences
    //var fileRef = filePath;
    var fileRef = File("~/Desktop/YourOwn.pdf");
    if (fileRef != null) {
    var docRef = open(fileRef, DocumentColorSpace.RGB);
    app.userInteractionLevel = uILevel;
    To open all pages you have to loop through all pages etc.
    Easier for you:
    Search here in forum for the "open pdf" script  (I don't know the exactly name, it was written by CarlosCanto, ) This should always work for you.
    Have fun

  • Save as Reduced Size PDF and Save as Optimized PDF do not reduce the file size.  What gives?

    Save as Reduced Size PDF and Save as Optimized PDF do not reduce the file size.  What gives?  I used Acrobat 9 to do this for a long time.  I recently received new laptop loaded with with Acrobat 10 and it does not work the same.  I typically scan 8-10 pages of receipts, combine the files in Acrobat, and then optimize to reduce the size so I can upload with my expense report.  Typically, my files were reduced to 200-400 KB.  I have a 2 MB file that will not reduce at all.

    Bernd, thank you for your attempt to help but the option dialog windows do not contain the same options.  There are numerous other posts on this forum about this issue and there is no answer.  Clearly, there is an issue.  I have submitted this issue to our internal help desk.

  • How do i copy text added to a protected pdf and save in word.

    how do I copy text added to a protected pdf and save in word?

    More details would be helpful. What security restrictions are there, exactly? Do you know the password? Do you want to copy all of the text in a document, or just some?

  • I made a dumb decision to 'Erase Free Space' on my drive. I now have no free space, I realize because it wrote 0's over all my free space. Is there a way to undo this??? Help please I can't save any documents now! Thanks in advance all, it is truly apprec

    I made a dumb decision to 'Erase Free Space' on my drive. I now have no free space, I realize because it wrote 0's over all my free space. Is there a way to undo this??? Help please I can't save any documents now! Thanks in advance all, it is truly appreciated. how can find the hidden temporary files using the terminal what do i type in?

    It's more likely a failed Erase Free Space, which creates a huge temporary file; that's why it looks like you have no more available drive space. You can recover from this. See these links
    https://discussions.apple.com/message/10938738#10938738
    http://www.macgeekery.com/tips/quickie/recovering_from_a_failed_secure_erase_fre e_space 
    Post back if you need any help with this.

  • My hard drive died last week, and I needed to install a new one.  Previously, I was able to save a .doc with text and inserted photo to .pdf and then to .jpg.  Now I can get the .pdf but can't determine what to do to convert to .jpg.  Does anyone know ?

    My hard drive died last week, and I needed to install a new one.  Previously, I was able to save a .doc with text and inserted photo to .pdf and then to .jpg.  Now I can get the .pdf but can't determine what to do to convert to .jpg.  Does anyone know ?

    Rather than do that, which means starting over from scratch, losing all your edits, organisation and so on, why not simply use iPhoto Library Manager to revert the Library to the older version? Easier, less destructive.
    The instructions on that are here
    If you really want to start over: you can access the Originals folder simply by going to your Pictures Folder and finding the iPhoto Library there. Right (or Control-) Click on the icon and select 'Show Package Contents'. A finder window will open with the Library exposed.

  • Help please? iTunes and my PC (XP SP3) won't recognize my iPod Touch. I aleady tried the Apple trouble site (recharged iPod; checked USB connections; restarted iPod; restarted PC; reinstalled iTunes; ensured no software conflicts)

    Help please? iTunes and my PC (XP SP3) won't recognize my iPod Touch. I aleady tried the Apple trouble site (recharged iPod; checked USB connections; restarted iPod; restarted PC; reinstalled iTunes; ensured no software conflicts)

    Finally got it working..  Ok so First read this
    http://support.apple.com/kb/TS1538?viewlocale=en_US&locale=en_US
    Just start with verifying the Apple Mobile Device Support is up and working, Just follow the steps here:
    http://support.apple.com/kb/TS1567
    After Stopping it and Restarting and it is still not reconizing your device Then start uninstalling
    Start with: Itunes, Quicktime, Bonjour, Apple Software Update, Apple Mobile Device.
    I had an issue uninstalling Apple Software Update, and was unable to get it off my computer.
    But after all that download and reinstall itunes.
    After doing all that i was able to get mine to show up in itunes
    Hope it helps

  • HI,I AM THE NEW MEMBER OF I PHONE 4  FAMILY.ANY ONE AN GUIDE ME , HOW TO ADD  MY NOKIA PHONE BOOK CONTACTS IN I PHONE 4 . I USES NOKIA E-5 MODEL. KINDLY HELP PLEASE. THANKS AND BEST WISHES . SHRIJI MAHARAJ

    HI,I AM THE NEW MEMBER OF I PHONE 4  FAMILY.ANY ONE AN GUIDE ME , HOW TO ADD  MY NOKIA PHONE BOOK CONTACTS IN I PHONE 4 . I USES NOKIA E-5 MODEL. KINDLY HELP PLEASE. THANKS AND BEST WISHES . SHRIJI MAHARAJ

    Hi, I see I haven't had any responses but these problems haven't been fixed.
    I still haven't been able to transfer purchases from my phone to my comp so consequently have stopped purchasing on my phone.
    I bought a couple of albums recently via itunes on my comp, and tried to tranfer them to my phone via a playlist, but the sync often crashes. One album transferred except for one song, and the other hasn't at all. What happens is that when I autofill from a playlist it often hangs for ages on the first song and then I have to quit the application altogether as nothing happens for ages. Basically, the whole Itunes software freezes. 
    After this I find it hasn't transferred any songs, but they do appear greyed out on my phone, which means it has transferred some basic data such as the titles, but not the song itself. When I try to repeat the process to complete the transfer Itunes tells me that it can't transfer because the songs are already on the phone, but they are not!! I can't click or remove on the greyed out items, so now I have a couple of almost full albums on my computer that I can't tranfer or install on my phone, and a whole bunch of greyed out songs on my phone that I can't play or remove!
    The rest of the problems as above still stand. I downloaded the latest itunes OS updates but nothing's changed. I haven't done the very latest iphone update yet though because it says you need to make sure your stuff is backed up, and I don't want to lose the purchases I made on the phone that I can't transfer to my comp. I'm planning on uninstalling itunes completely and reinstalling but I have little faith that this will fix the issue.
    Can someone please help at all?? I'm so sick of this!

  • Convert  Script output into PDF and save into Unix Directory

    Hi,
      I had Sales Order Acknowledgement Output and wants to converted to PDFs and then these PDFs to be placed in Unix Directory
    on their way to Docs Library.
    I am using the following code
      CALL FUNCTION 'CLOSE_FORM'
        IMPORTING
          RESULT   = itcpp
        TABLES
          otfdata  = lt_otf  " OTF Data
        EXCEPTIONS
          unopened = 1
          OTHERS   = 2.
    After this form ,  table ltf_otf is empty, So i am not converting into PDF .
    So i need the logic to convert to PDF , and most importantly logic to save into UNIX Directory.
    Thanks

    Hi,
    If you are using the Function Module "OPEN_FORM" to open the form for printing then in this function module there is an IMPORTING parameter OPTIONS which is of type ITCPO to this parameter "OPTIONS-TDGETOTF" needs to be passed as 'X' which will give you the OTF output in the FM "CLOSE_FORM".
    After this call the FM "CONVERT_OTF" and pass the FORMAT as "PDF" which will give you the PDF output in LINES table Parameter. Most important please pass some dummy variable to BIN_FILESIZE variable.
    Now by using OPEN DATASET file name FOR OUTPUT IN BINARY MODE and the LOOP the PDF table and use the TRANSFER statement to place the data in the UNIX File and then Finally use the CLOSE DATASET file name.
    Hope will help to address your issue.
    Regards,
    SRinivas

  • Creating an action to crop straighten and save

    I have scanned in a hundred or so pages from old photo albums, and have a thousand or so more to save.
    I am hoping to use a batch process or script to automate the cropping/straightening & saving, but I can't work out how to get the files saved.
    The album pages do not have a fixed number of images, so the crop/straighten is creating a variable number of images  from 1 to 8 or 9 (maybe more - they are really old photos some of which which are very small).
    So I need to find a way to create an action to crop and straighten (the easy bit), and then to automate the saving without asking for a file name and path for each image - the names created in the crop process are fine.
    Can anyone help please.
    Many thanks

    There is free script which works just fine. Here is entire discussion http://forums.adobe.com/thread/290194. I tested script with Photoshop CC on WIndows and everything works perfect. Download, actually select all and copy from this page http://www.tranberry.com/photoshop/photoshop_scripting/PS4GeeksOrlando/IntroScripts/cropAn dStraightenBatch.jsx. Open text editor and paste then save as cropAndStraightenBatch.jsx file in Presets > Scripts folder or save on Desktop then copy and paste in mentioned folder. Run script from File > Scripts menu without any image open. In the first dialog navigate to folder with scanned photos then in second window navigate to folder where you want to save.

  • Scripting challenge - help please

    Hi All, I hope someone out there can help me with this. I want to run a batch of photographs through PS(CS4) using the process described below. If anyone knows how I might automate this, or if there's such a  script already knocking about, please let me know - doing it manually  would take an age!
    1. Open file (which would be less than 300dpi).
    2. Convert to 300dpi.
    3. Capture the image dimensions for print at  300dpi (wd x ht in cm)
    4. Save off the file and include the image dimensions in the filename.
    By way of example:
    The original file is 72dpi and named:
    photofile01.jpg
    The output file is converted up to 300dpi and is saved with the dimensions in the filename, something like:
    photofile01_40x30cm.jpg
    (wash, rinse, repeat...)
    I am not familiar with scripting in PS and cannot see how to get around the bit about capturing the dimensions and  renaming the file.
    Any solutions greatly appreciated
    Paul

    Please give this a try...
    main();
    function main(){
    var inputFolder = Folder.selectDialog ("Please select folder to process");
    if(inputFolder == null) return;
    var outputFolder = Folder.selectDialog ("Select ouput folder");
    if(outputFolder == null) return;
    var fileList = inputFolder.getFiles("*.jpg");
    for (var a in fileList){
        open(fileList[a]);
    var doc = activeDocument;
    if (activeDocument.resolution != 300){
        doc.resizeImage(undefined, undefined, 300, ResampleMethod.NONE);
    var Width = doc.width.as('cm').toFixed(2).toString().replace(/\./g,'-');
    var Height = doc.height.as('cm').toFixed(2).toString().replace(/\./g,'-');
    var suffix = Width +"x"+Height+"cm";
    var Name = app.activeDocument.name.replace(/\.[^\.]+$/, '');
    var saveFile = File(outputFolder +"/"+Name+"_"+suffix+".jpg");
    SaveJPEG(saveFile,8);
    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
    function SaveJPEG(saveFile, jpegQuality){
    jpgSaveOptions = new JPEGSaveOptions();
    jpgSaveOptions.embedColorProfile = true;
    jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
    jpgSaveOptions.matte = MatteType.NONE;
    jpgSaveOptions.quality = jpegQuality;
    activeDocument.saveAs(saveFile, jpgSaveOptions, true,Extension.LOWERCASE);

  • Export pdf and save as using digits.pdf eliminating all the text characters from the source file.

    Hi all,
    Usually when we export pdf from indesign or whatever software,,, the pdf file naming will be as per source file...
    eg.,  123456_dfdfjljf_ULCC.indd will be exported and saved as 123456_dfdfjljf_ULCC.pdf.
    my request is "the pdf should be saved as 12345.pdf avoiding all the characters following first digits.
    hint: first digists may be more or less than 4 digits....
    My request is any number of digits should be saved as 23232.......pdf and avoding the following characters.
    please help me... i have hell lot of pdf to export from indesign.......
    thanks
    bobylon.

    There is no "whatever" here - when you export from InDesign or other software each piece of software makes its own naming decisions. It isn't an Acrobat or JavaScript thing at all.

  • InDesign server export .pdf, AND save .indd

    Hey all,
    Just a quick question. Is it possible to script InDesign server to export a .pdf to a certain folder location AND save the original .indd file to another folder location all automatically?
    Cheers,
    Steve.

    Sure. I suppose the typical way to tell it where to put the files would be to pass the paths as parameters to the script and retrieve them with app.scriptArgs.get(). See the SDK for more info.
    Jeff

Maybe you are looking for

  • IPad not showing up in Configurator

    I have an iPad 2 that shows up in iTunes but not Configurator. I've tried it in Recovery Mode, I've reset it to factory defaults, I had iTunes restore it to a previous backup...  no matter what, Configurator will not see this iPad. It never shows up

  • Release PO value not updated to GOA

    Hi Gurus, when I create a PO on ECC releted to an SRM GOA, the release value is not update to SRM. When I creat a PO, the outbound idoc form ECC is created correctly but the inbound idoc on SRM show an error like "object linkage not found" Pls help.

  • ITunes Error 0xE8000003 - Win7 x64, iOS 7.0.4, iPhone 4S, iTunes 11.1.3.8

    So, I've already tried everything on the 0xE8 Apple Support page. I've tried restarting services, reinstalling itunes, reboting my computer, different cables, I've tried everything except restoring. And I'd really rather not. Any ideas?

  • Crystal Reports Save As shows only a max of 100 sufolders in the Enterprise

    Hi, We are having an issue with Crystal Reports 2008, when we try to save reports to the Enterprise repository (Business Objects XI R2). We have a huge list of customers in one of the top folders in the repository structure, but in crystal, when you

  • Cant get back to OSX

    I tried to run ubuntu from a disk to try it out (no install).  Now I cant boot into OSX anymore, even when i hold down the option key, Windows 7 automatically starts.  How do i get back into OSX?