Create a single tall image from a multi-page pdf file

I would like to take a multi-pake pdf file, and have all of the pages "appended" from top to bottom edge to create a single tall image. I am a teacher, and I currently do this by hand, I am then able to annotate the entire page and croll down an entire document inside of Photoshop.
Here is an example: I have a pdf with 4 pages. Currently I open the pdf in PS, I end up with 4 images; I adjust the vertical canvas size of one of the images to be 4 times it's original size, then one-by-one I copy the contents of each image to that new tall image and move that layer vertically below the previous one. So the result is say a 1024x6400 pixel image.
I would like to be able to just open the pdf with a script and get this all done in one step.
Any help is appreciated.

Thanks again c.pfaffenbichler. I had most of it worked out in my own way before you got back to me, but I wasn't able to get the final naming part down.
Like I said, I am a math teacher, and I use photoshop as my whiteboard, and draw with a graphics tablet. So I can print to pdf from any program, now I can import any document into photoshop basically to write on it. So this is wonderful. I have never seen another teacher use PS as a whiteboard in class in this way, so I am most likely the only person in my county or state that would need such a script.
After I got everything worked out, I added some things to the script. Some of my colleagues will use my files as a whiteboard if I send it to them as a tall single page pdf that they can scroll down and write over; so they don't need photoshop. So I have scripted in the saving of that pdf as well. Here are my changes; most of what I changed is in the section commented MY WORK.
// opens all pages of pdfs cropped to trimbox with set settings and arranges them;
// 2011, use it at your own risk;
#target photoshop
// dialog for pdf-selection;
var theFiles = app.openDialog();
if (theFiles) {
     for (var m = 0; m < theFiles.length; m++) {
          var theFile = theFiles[m];
          if (theFile.name.slice(-4) == ".pdf") {
               var thePdf = openMultipagePDF(theFile);
          else {alert (theFile.name + " is not a pdf-file")}
////// function to open all pages of a pdf //////
////// influenced by PlaceMultipagePDF.jsx //////
function openMultipagePDF(myPDFFile) {
// pdf open options;
     var pdfOpenOpts = new PDFOpenOptions;
     pdfOpenOpts.antiAlias = true;
     pdfOpenOpts.bitsPerChannel = BitsPerChannelType.EIGHT;
     pdfOpenOpts.cropPage = CropToType.MEDIABOX;
     pdfOpenOpts.mode = OpenDocumentMode.RGB;
     pdfOpenOpts.resolution = 247.8;
     pdfOpenOpts.suppressWarnings = true;
     pdfOpenOpts.usePageNumber  = true;
// change pref;
     var originalRulerUnits = app.preferences.rulerUnits;
     app.preferences.rulerUnits = Units.PIXELS;
// suppress dialogs;
     var theDialogSettings = app.displayDialogs;
     app.displayDialogs = DialogModes.NO;
// iterate through pages until fail;
          var myCounter = 1;
          var myBreak = false;
          var theWidth = 0;
          var theHeight = 0;
          while(myBreak == false){
               pdfOpenOpts.page = myCounter;
               try {
                    var thePdf = app.open(myPDFFile, pdfOpenOpts);
                    if (thePdf.width > theWidth) {theWidth = thePdf.width};
                    var offset = thePdf.height;
                    thePdf.layers[0].name = myPDFFile.name+"_"+myCounter;
                    if (myCounter == 1) {
                         var theFile = thePdf
                    else {
                         thePdf.layers[0].duplicate(theFile, ElementPlacement.PLACEATBEGINNING);
                         thePdf.close(SaveOptions.DONOTSAVECHANGES)
                    myCounter = myCounter + 1;
                    var theLayer = app.activeDocument.activeLayer;
                    theLayer.translate(0, theHeight);
                    theHeight = theHeight + offset;
            catch (e) {myBreak = true};
// reset dialogmodes;
app.displayDialogs = DialogModes.ERROR;
app.preferences.rulerUnits = originalRulerUnits;
// resize canvas;
    theFile.resizeCanvas(theWidth, theHeight, AnchorPosition.TOPLEFT);
//MY WORK
// merge visible layers (even if there is only one layer)
     try     {
          theFile.mergeVisibleLayers();
          }catch(e) {}
// create layer, rename, movetobottom, fill white
     theFile.artLayers.add();
     theFile.layers[0].name = "Background";
     theFile.layers[0].move(theFile.layers[1], ElementPlacement.PLACEAFTER);
     var white = new SolidColor();
     white.rgb["hexValue"] = "ffffff";
     theFile.selection.selectAll();
     theFile.selection.fill(white);
//rename contents layer, add "work" layer for teacher to write on
     theFile.layers[0].name = "Problems";
     theFile.artLayers.add();
     theFile.layers[0].name = "Work";
//force 2107 width
//     if(theFile.width != 2107) theFile.resizeImage(UnitValue(2107, "px"), undefined, undefined, ResampleMethod.BICUBIC);
// force 2048 width
     if(theFile.width != 2048) theFile.resizeImage(UnitValue(2048, "px"), undefined, undefined, ResampleMethod.BICUBIC);
// save psd;
    psdOpts = new PhotoshopSaveOptions();
    psdOpts.embedColorProfile = true;
    psdOpts.alphaChannels = false;
    psdOpts.layers = true;
    psdOpts.maximizeCompatibility = true;
    var filePathPsd = myPDFFile.path+"/"+myPDFFile.name.slice(0, -4)+".psd";
    if (filePathPsd.exists) filePathPsd.remove();
    theFile.saveAs(File(filePathPsd), psdOpts, false)
// save pdf whiteboard
    var pdfOpts = new PDFSaveOptions;
    pdfOpts.downSample = PDFResample.NONE;
    pdfOpts.optimizeForWeb = true;
    pdfOpts.PDFCompatibility = PDFCompatibility.PDF15;
    pdfOpts.preserveEditing = false;
    pdfOpts.encoding = PDFEncoding.PDFZIP;
    var filePathPdf = myPDFFile.path+"/"+myPDFFile.name.slice(0, -4)+" Whiteboard.pdf";
    if (filePathPdf.exists) filePathPdf.remove();
    theFile.saveAs(File(filePathPdf), pdfOpts, false)
    theFile.close(SaveOptions.DONOTSAVECHANGES)
//MY WORK
     return theFile

Similar Messages

  • Getting Page Count for a Multi-Page PDF file using Illustrator script?

    Does anyone know how to get the page count of a multi page PDF file?  I know you can then open each page using the PDFFileOptions (pagetoopen).  But I need to know up front how many pages there are to loop thru to open each page and process each page.
    Any Ideas?

    This script i did for photoshop:
    OK so lets do it working on WIN and MAC without any shell script.
    This solution is not the best but its working.
    I used Try catch to solve it.
    Only issue is that you should at least somehow know how many pages you expect in pdf.. this mean if you are working with books or flyers...
    Then set the maxPagesCount to that number.
    I am working with pdfs with max 20pages.. so i start open the 20 then 19 then 18 and when i am success i know the amount of pages.
    Its not the quicker way but its usable.
    var maxPagesCount = 20;
    var actPagesCount = maxPagesCount;
    var opts1 = new PDFOpenOptions();
    opts1.usePageNumber = true;
    opts1.antiAlias = true;
    opts1.bitsPerChannel = BitsPerChannelType.EIGHT;
    opts1.resolution = 10; //it will load faster the test page
    opts1.suppressWarnings = true;
    opts1.cropPage = CropToType.MEDIABOX;
    myFunction = function () {
      try { 
          app.displayDialogs = DialogModes.NO;
          var fileList = openDialog();
          for (i = 0; i < fileList.length; i++) {
            actPagesCount = maxPagesCount;
            getPagesCount(fileList[i],maxPagesCount);
            alert(actPagesCount);
      } catch (exception) { 
        alert(exception);
    getPagesCount = function (checkFile, lastPageID) {
      try {          
        for (var checkPage = lastPageID; checkPage > 0; checkPage--) {
          opts1.page = checkPage;                    
          var docRef = open(checkFile, opts1, false);                  
          docRef.close(SaveOptions.DONOTSAVECHANGES);                  
          actPagesCount = lastPageID;                  
          return;                  
          checkPage=0;                              
      } catch (exception) {
        // Look for next page        
        checkPage--;        
        getPagesCount(checkFile,checkPage);

  • How do I save one page from a multi-page pdf document?

    Can I take a 65 page pdf file and save it as 65 individual pages?

    I know if you are using Adobe Acrobat X, you can go to the "Tools" section and then under "Pages" you will see "Extract". If you click on that while your document is open it will show you your options for extracting the pages and saving them as individual PDF files. Be sure to check the box "Extract Pages As Seperate Files" and this should help get you on your way. I hope this helps answer your question on extracting pages from a multiple page PDF.

  • Mail will NOT display a multi-page pdf file in the body.

    I want to send an email with a multi-page PDF attached that is displayed in the email- so that readers don't even have to click on the pdf to open it. Can I do that? I can do a single page, and I did determine that if I save all the pages of the document as single pds and then attach those, that works, but is there a way to display a multi-page pdf? Any help would be greatly appreciated!

    I do not use pages - there are several possible solutions to your situation - in pages you should be able to do a send pdf to iPhoto and then in iPhoto you can create an e-mail with smaller (and harder to read) images- you may be able to produce smaller (lower quality) PDFs in pages (don't know), you can change e-mail servers - use a different one it you have multiple accounts or get a free gmail account or other new account that will handle your needs
    LN

  • Inserting multi-page PDF file in Appleworks text document.

    When inserting a multi-page PDF document in an Appleworks text file, it only inserts the first page.
    How do I insert all the pages at once?
    Ron

    As far as I know you must break you PDF in single pages documents.
    Then you will be able to drag and drop all of them in a single process but it will be time consuming to move them so that they are correctly located in the layout;
    Inserting them one by one will be more efficient.
    Yvan KOENIG (from FRANCE mardi 21 juillet 2009 18:33:29)

  • I can't edit multi page PDF file in Illustrator at once.

    I made 30-page PDF file in Illustrator last week.
    Yesterday my co-woker eited and sent to me.
    but i can't open 30-pages all in once
    instead of this window pops up and only 1 page of all open it.
    How do I open all the page and edit it once without any script?
    Last week I Could open it without asking.

    Keep a backup of the .ai file. Your coworker should not be making edits to pdfs, only commenting tools. Tell your coworker not to do that again, unless they know what they are doing (eg: are creating from scripts). If they persist, or this is your boss, lock the PDF with security protection.
    This script may help you. Keep in mind the popular pdf preset smallest file size converts to RGB, so your color will change and l;ayers possibly flattentin if Illustrator editing capabilites is lost.
    https://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&extid=1698047

  • How to show a multi-page PDF file on iweb?

    Hi everyone,
    I'm building a website where I am showing a catalog design I did for my previous company. It was designed using Indesign and exported into PDF file. Then I saved the first page as JPEG file, inserted the JPEG file into iweb, and then enabled the JPEG image as a link to the PDF file of the catalog. I thought by this way I can let future employers to download the PDF file and view my design work. However I figured if I put my website link on places like Monster.com, anybody can see it, download it, and just steal or print out my work. I realized this is not a right way to do since my previous company should have the right of the design work. Any suggestions? Is there anyway I can let viewers only view the PDF file on the web browser without being able to download it? How should I do to display the whole catalog in a neat wey using iweb? Thank you very much in advance!!

    James I know you meant no harm, and I have to say if
    it wasn't for you I wouldn't be this far in the game.
    So if I have javascript on my website and your
    company has javascript disabled, my site wouldn't be
    very interesting to you on your work computer? What
    is the benefit of disabling javascript?
    Thanks. I'm glad I didn't cause any bad feelings.
    My company is very paranoid when it comes to IT. I guess it's the common PC world where you are once bitten, twice shy. We just upgraded all of computers to Windows 2000 !!! haha.
    I think there must be (or must have been at one time) some vulnerability associated with javascripts on websites and that's why it's disabled. Crazy, isn't it?

  • From a multi page file is there a way to extract a single page?

    Hello,  I'm trying to extract a single page from a multi page PDF file.  Is there a way to do this with Adobe Reader?  Thanks

    Hi utah33,
    In Acrobat you can do the following to extract pages from the pdf:
    Open the PDF in Acrobat and choose Tools > Pages > Extract.
    Specify the range of pages to extract.
    In the Extract Pages dialog box, do one or more of the following before you click OK:
    To remove the extracted pages from the original document, select Delete Pages After Extracting.
    To create a single-page PDF for each extracted page, select Extract Pages As Separate Files.
    To leave the original pages in the document and create a single PDF that includes all of the extracted pages, leave both check boxes deselected.
    Regards,
    Rave

  • Unable to mark the box 'create Multi-page PDF from page tiles' when saving to pdf-file

    I am running Illustrator CS3 on a Mac OSX 10.5.8
    I want to print a very large illustrator-file (1000 mm x 900 mm) across mutliple pages of A4-paper (5 x 5 sheets of A4-paper) by saving the file as a multi-page pdf file.
    I first followed the instructions provided here:
    http://helpx.adobe.com/illustrator/kb/create-mutli-page-pdf-illustrator.html
    When I then tried to save the file: -> File -> Save as -> 'choose .pdf from drop-down menu'
    I get to this menu:
    I am unable to mark the box that says: 'Create multi-page pdf from page tiles'. I have made a red arrow pointing to the box I want to mark.
    I have tried changing the other drop-down menus inside this menu, to see if the box I want to mark could become available, but without any luck.
    I am not sure what I am doing wrong. I would be grateful if anyone could help me set my settings right to allow me to create such a multi-page pdf-file.
    Thanks in advance for your help

    Your ps file should be good, the problem likely resides elswehere. Maybe in your acrobat install, distillers settings. what error did distiller give?
    Mine ran good and got a multi page document, here is a screenshot to help you troubleshoot.
    On mac go to system preferences / print and fax / and change your default printer if you have another option. I know sounds like this should not help, but there are problems like Illustrator for example not making .pdfs if you do not have a printer chosen or an old or corrupt .ppd assigned.

  • How can you create a multi-page pdf document in photoshop elements 13?

    I previously had pse 11 and was able to create multi-page documents as pse files. However, pse 13 does not allow. How can I create multi-page pdf files from pse 13?

    Alas, for one of those mysterious adobe reasons, it's gone in recent versions. Only multipage file you can make is a photobook.

  • Is it possible to automatically convert a website into a multi-page pdf?

    I have a weblog that has reached the end of it's life, so the site is coming down. Before I do, however, I need to create a permanent record and a single multi-page pdf file would be perfect.
    I know I can do this with Acrobat Professional, but I am hoping there is an automatic way to export the html pages into a single pdf file without doing each page one-by-one manually.
    If anyone knows how to perform this task, please let me know.
    Thanks!

    What version of Acrobat do you have? In Acrobat 9 you'd select:
    File > Create PDF > From Web Page
    or
    Advanced > Web Capture > Create PDF From/Append Web Page
    There are various options that affect the result, including the number of levels to capture, page layout, how multimedia is handled, etc. Acrobat 11 is more advanced and will likely give the best results.
    For a tutorial, see: http://acrobatusers.com/tutorials/how-to-turn-a-website-into-a-pdf-file

  • Placing multi-page PDF's

    Maybe this question has already been posted but I could,t find it, so:
    You can place a pdf in keynote, but is possible to select another page than the first one from a multi-page pdf.
    That would really simplify the proces of putting together a presentation...

    Yes, I can imagine that some interface that would allow you to set different pages WITHIN the app would be cool. To place an image that you can change without changing it's connected attributes,
    1) Drag in an image
    2) Mask the image
    3) Do Format -> Advanced -> Define Media Placeholder
    Then, you can copy/paste the action from one slide to another and replace the image as you need to without having to re-set all the animation.
    Finally, feedback for Keynote is here. http://www.apple.com/feedback/keynote.html

  • Place multi-page pdf and resize pages automatically

    Hi everyone,
    I have an A4 sized multi-page pdf file and I wanted to place the pages of the pdf into a US letter sized Indesign document. I planned to use the placemultipagepdf.jsx script that comes with indesign, to do this. When I place the pages though, they come in as A4 and I have to adjust the size manually within each image box. Is there a way to have them place but then resize automatically to the US letter sized height?
    Appreciate any help.

    Use this one: InDesignSecrets » Blog Archive » Zanelli Releases MultiPageImporter for Importing both PDF and INDD Files

  • Can I use Automator to create a multi-page PDF from a selection of images?

    Well can I? I have looked at Preview extensively but found no option to create a multi-page document from all open images. I can create single-page PDF's easily, but that's not what I want.
    Does it make a difference if they are TIFF, JPEG, etc?

    Take a look at
    PDFLab
    It will create a multi – page .pdf from a folder of .jpgs. I am ** guessing ** it will work with .tiffs.
    No Alibi.
     Back up what you can't afford to lose.   Mac OS X (10.4.10)  

  • How can I create a java.awt.Image from ...

    Hi all,
    How can I create a java.awt.Image from a drawing on a JPanel?
    Thanks.

    JPanel p;
    BufferedImage image =
        new BufferedImage(p.getWidth(), p.getHeight, BufferedImage.TYPE_INT_RGB);
    Graphics2D g = image.createGraphics();
    p.paint(g);
    g.dispose();

Maybe you are looking for