PlaceMultipagePDF...

Hi guys, just a question regarding modification of the above standard scripts that come with Indesign.
I noticed that the page it creates is A4 size, all of the time, regardless of what the page size of the PDF you are placing is.
I know the simple stuff - how to change the place properties such as trim box/bleed box etc. but I would like to be able to change the page size it creates for each placement, and also the points at which it places each page in the workspace.
At the moment when I use the script for, say a PDF sized 130mm x 190mm or something like that, I have to then change the document size, and then move each page so that it fits within the page. A way around this would be great.
Any help?
Cheers

I think this will help you
A Free script
http://www.indesignsecrets.com/downloads/PDFplacer.zip
a r u l

Similar Messages

  • Wanted: a modified version of PlaceMultipagePDF -- to impose

    SCRIPT TO IMPOSE AN INCOMING PDF
    I need a script that uses a modified version of the sample script supplied with CS4 (called PlaceMultiPagePDF.jsx, or the Applescript equivalent). Instead of placing the pages sequentially:
    1 –> 1
    2 –> 2
    3 –> 3...
    the script would place the PDF pages in 2-Up Perfect Bound imposition order. The arrangement is outlined in the attached document. It would be very flexible to allow for any combination of signature lengths. As a simple example, for a 8-page booklet, the script would place the pages from the PDF in this order in InDesign:
    1 –> 2
    2 –> 3
    3 –> 6
    4 –> 7
    5 –> 6
    6 –> 5
    7 –> 4
    8 –> 1
    I have written a Pidgin BASIC code that handles the page sequencing (see attached document), but I have to steer clear of actually scripting it -- my programming skills end at MS BASIC ca 1986 (which I still use occasionally on my 512k Fat Mac as I can't get anything out of modern BASIC). Why did they ever complicate things with Java and the like?
    Anyway, I have manually stepped through my flowchart several times and haven't come across an error, so all that is required ("all" he says, in hope) is to interrupt the pages coming from the PDF, and instead of 1 -> 1, 2->2... the script steps in and says "Whoa there... you're not going to page 315, you're going to page 297. Would it be that simple? As simple as inserting a bit of renumbering code as per my flowchart?
    I hope so.
    If anyone is interested, please let me know.

    Thanks for the script, Jongware, but it is not quite what I need.I think yours generates one huge saddle-stitch arrangement, whereas I want the ability to generate a group of smaller ones (effectively a variable-length perfect-bound arrangement), thus my listing of "numbers of sheets" in each signature as the input.
    Someone has been kind enough to write an Applescript that does the job. I haven't fully tested it, but really, what is there to test? It seems to work for me. One problem: it can't handle InDesign page numbers other than plain numbers, but I can work around that if I need to. Imposition from InDesign here I come -- run the script, paste the output into Page Range of the Export dialog box, and stand back while the bytes fly.
    If a script could be run from the open Export window (to allow setting up of the various options), this script (or a JS version) could be carried one step further, not that I'm wanting to at this stage. The start page and the various signature lengths could be entered; options set up in the Export window; then the script could:
    1. Generate the imposed number sequence and place them into the Page Range field of the active document;
    2. Export the PDF;
    3. Call on PlaceMultipagePDF, set to automatically create a new InDesign document and place the PDF pages.
    It would be a very flexible, simple way of obtaining variable-length, 2-Up imposition from InDesign.
    SCRIPT TO IMPOSE VARIABLE-LENGTH 2-UP SIGNATURES
    set start to 1 -- overwrite with your starting page number
    set s to {8, 1, 0} -- overwrite with the number of pages in each signature; any number of signatures allowed; must have 0 at end to stop.
    set n to 1
    set begin to start
    set _end to start - 1 + 4 * (item n of s)
    set outputStr to ""
    repeat
    set a to _end
    set b to begin
    set c to begin + 1
    set d to _end - 1
    set halfway to (begin + _end) / 2
    repeat while b < halfway
    set outputStr to outputStr & a & ","
    set outputStr to outputStr & b & ","
    set outputStr to outputStr & c & ","
    set outputStr to outputStr & d & ","
    set a to a - 2
    set b to b + 2
    set c to c + 2
    set d to d - 2
    end repeat
    set n to n + 1
    if item n of s = 0 then exit repeat
    set begin to _end + 1
    set _end to _end + 4 * (item n of s)
    end repeat
    set the clipboard to outputStr
    return outputStr

  • PlaceMultipagePDF script - another page size

    I'm trying to use the PlaceMultipagePDF.jsx script to place a pdf into InDesign CS4. It always places using standard letter size with the upper left corner of the frame at zero zero on the ruler.
    But the PDF I'm placing, and the InDesign document I need to place it into is 4.92 inches by 4.93 inches.
    Is there a way to alter the script so that the frame is the same size as the pdf page and the pages are centered?

    You can open a 4.92 by 4.93 size document and run the script: you can then tell the script to use that document. Alternatively, create a document preset, then look for this line in the script:
    myDocument = app.documents.add();
    and add the preset:
    app.documents.add (undefined, app.documentPresets.item (myPreset));
    >Is there a way to alter the script so that the frame is the same size as the pdf page and the pages are centered?
    If the PDF pages and the ID document pages are the same size, placing at [0,0] is correct, is it not? What's going wrong?
    Peter

  • How to use the script placemultipagePDF with reduction?

    In need to use the script placemultipagePDF, but in need this have a reduction 77%

    try below code, i modifide sample cone provide adobe as per ur requirement.
    main();
    function main(){
        //var myCounter = 1;   
        var myDocument = app.documents.item(0);
        var myPage = myDocument.pages;
        var myPDFFile = new File("E:\\Work\\Scripting InDesign CS3-4 with JavaScript April 2009.pdf");
            if((myPDFFile != null)){
                for (var p=0; myPage.length>p; p++){
            myPlacePDF(myDocument, myPage[p], myPDFFile);
    function myPlacePDF(myDocument, myPage, myPDFFile){
        var myPDFPage;
        app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;
        var myCounter = 1;
        var myBreak = false;
        while(myBreak == false){
            if(myCounter > 1){
                myPage = myDocument.pages.add(LocationOptions.after, myPage);
            app.pdfPlacePreferences.pageNumber = myCounter;
            myPDFPage = myPage.place(File(myPDFFile), [0,0])[0];
            myPDFPage.verticalScale =77;
            myPDFPage.horizontalScale = 77;
            if(myCounter == 1){
                var myFirstPage = myPDFPage.pdfAttributes.pageNumber;
            else{
                if(myPDFPage.pdfAttributes.pageNumber == myFirstPage){
                    myPage.remove();
                    myBreak = true;
            myCounter = myCounter + 1;

  • How to amend PlaceMultipagePDF.jsx?

    Hi all
    I've found this script very useful, but there is one thing that is causing me an issue.
    I'm generally placing A4 pdfs into an A4 sheet. The script automatically places the pdf on the page with x, y axis of 0. I've been able to amend this measurement to allow placing of pdfs with varying degrees of bleed/trim, however (it seems to me) the script won't run if the bleed dimensions of the placed pdf are larger than around 25mm causing the automatic image box to fall outside the visual area of the desktop (eg if the pdf is 297x210mm but has bleed surrounding it requiring x,y co-ordinates of -31.0). However it is possible to create an image box manually to these co-ordinates.
    I assume that the following line of text from the could be changed to crop the placed pdf to the trim and I can then run with the [0,0] co-ordinates - I've tried but sadly I don't know the correct terminology is it 'object model'?
    app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;
    MTIA
    Steve

    Hi Shonklyn
    Thanks for the link.
    I have tried to use your script before but had forgotten about it - I've been concentrating on using javascript.
    I can't get it to run very sucessfully though. If I choose either the crop trim or crop bleed I get an Applescript error:
    Adobe InDesign CS4 got an error: A resource wasn’t found. (-192)
    I can get the pdf to place (the first page) using crop media, but is there a way to place 'all' pages of the pdf without opening up the pdf to see how many pages there are and entering that number into the 'To:' field?
    If I try to load 10 pages from a 64 page pdf I get the following error:
    'There are missing any pages in your document'
    Steve

  • PlaceMultipagePDF Modified Problem

    InDesign CS2
    Hi i try to place multiplepagePDF File into Indesign document where each PDF page placed 3 times on different places in one Indesign document. this work but only on the first page the following pages of indesign get the first pages of the pdf.
    please help
    code
    var myPDFFile = File.openDialog("Choose a PDF File");
    if((myPDFFile != "")&&(myPDFFile != null)){
    var myDocument, myPage;
    if(app.documents.length != 0){
    myDocument, myNewDocument = myChooseDocument();
    else{
    myDocument = app.documents.add();
    myNewDocument = false;
    if(myNewDocument == false){
    myPage = myChoosePage(myDocument);
    else{
    myPage = myDocument.pages.item(0);
    myPlacePDF(myDocument, myPage, myPDFFile);
    function myChooseDocument(){
    var myDocumentNames = new Array;
    myDocumentNames.push("New Document");
    //Get the names of the documents
    for(var myDocumentCounter = 0;myDocumentCounter < app.documents.length; myDocumentCounter++){
    myDocumentNames.push(app.documents.item(myDocumentCounter).name);
    var myChooseDocumentDialog = app.dialogs.add({name:"Choose a Document", canCancel:false});
    with(myChooseDocumentDialog.dialogColumns.add()){
    with(dialogRows.add()){
    with(dialogColumns.add()){
    staticTexts.add({staticLabel:"Place PDF in:"});
    with(dialogColumns.add()){
    var myChooseDocumentDropdown = dropdowns.add({stringList:myDocumentNames, selectedIndex:0});
    myChooseDocumentDialog.show();
    if(myChooseDocumentDropdown.selectedIndex == 0){
    myDocument = app.documents.add();
    myNewDocument = true;
    else{
    myDocument = app.documents.item(myChooseDocumentDropdown.selectedIndex-1);
    myNewDocument = false;
    myChooseDocumentDialog.destroy();
    return myDocument, myNewDocument;
    function myChoosePage(myDocument){
    var myPageNames = new Array;
    //Get the names of the pages in the document
    for(var myCounter = 0; myCounter < myDocument.pages.length;myCounter++)
    myPageNames.push(myDocument.pages.item(myCounter).name);
    var myChoosePageDialog = app.dialogs.add({name:"Choose a Page", canCancel:false});
    with(myChoosePageDialog.dialogColumns.add()){
    with(dialogRows.add()){
    with(dialogColumns.add()){
    staticTexts.add({staticLabel:"Place PDF on:"});
    with(dialogColumns.add()){
    var myChoosePageDropdown = dropdowns.add
    ({stringList:myPageNames, selectedIndex:0});
    myChoosePageDialog.show();
    var myPage = myDocument.pages.item(myChoosePageDropdown.selectedIndex);
    myChoosePageDialog.destroy();
    return myPage;
    function myPlacePDF(myDocument, myPage, myPDFFile){
    var myPDFPage;
    app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;
    var myCounter = 1;
    var myBreak = false;
    while(myBreak == false){
    if(myCounter > 1){
    myPage = myDocument.pages.add(LocationOptions.after, myPage);
    app.pdfPlacePreferences.pageNumber = myCounter;
    myPDFPage = myPage.place(File(myPDFFile), [0,0]);
    b myPage.rectangles.add({geometricBounds:[5,0,290, 210]}).place(File(myPDFFile));
    b myPage.rectangles.add({geometricBounds:[4,'-6',235, 210]}).place(File(myPDFFile));
    if(myCounter == 1){
    var myFirstPage = myPDFPage.pdfAttributes.pageNumber;
    else
    if(myPDFPage.pdfAttributes.pageNumber == myFirstPage){
    myPage.remove();
    myBreak = true;
    myCounter = myCounter + 1;

    This only happens when you view locally right?
    If so, look at adding 'Mark of the Web' on the page and that will stop that popup from happening when you view locally.
    From the top menu go to:   Commands>Insert Mark of the Web
    I checked the page in Firefox and IE7 and no problems with the flash loading on my end.

  • 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

  • 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

  • Converting .pdf into InDesign CS6 editable doc.

    I have a 103 page .pdf document that I need to edit the contents of (change fonts, type sizes, colors, insert revised logos, and place a few style elements). I have the latest version of acrobat pro. that enables you to edit text, but its not entirely efficient. I wanted to load it into ID so that I could create paragraph styles and effectively manipulate the contents of the .pdf. As far as I can tell the only way to do this is to purchase a third party plug in (such as pdf2id)-right? However, the agency who gave me the job, set up a file that looks as though they were able to accomplish my same goal of linking the pdf direclty into ID without the use of the plug-in.
    Any suggestions?

    Given the extent of your changes, I think you're in a tough spot.
    Even with PDF2ID, there will be a lot of rework to get the file back to where it started, but it may be an option if you can't get the source (InDesign?) file. In my experience with PDF2ID and a 15 page graphics/text document, I ended up with around 100 para styles, 50 character styles, many bulleted sentences missing, images chopped into multiple pieces etc. It took a day to fully clean up, but still better than starting from scratch.
    Only other option I can think of is to use the pdf import script 'PlaceMultipagePDF.jsx' to make a 103 page InD document with the placed pdfs as a background, then overlay new content and put images behind transparent areas. Maybe combine this with some pdf edits in Acrobat to remove elements.

  • Import multiple pdf into indesign file

    Hi ALL,
    Trying Script:
    By using inbuilt script "PlaceMultipagePDF.jsx" import all the pdf in the selected folder (i.e., 111.pdf, 222.pdf, 333.pdf) in the "test.indt"
    But my requirement:
    1. open test.indt file and import 111.pdf alone after that close with any file naming.
    2. open test.indt file and import 222.pdf after that close with any file naming.
    3. open test.indt file and import 333.pdf after that close with any file naming.
    Trying Script Code:
    var myFolder = Folder.selectDialog("Select the folder containing the Indesign Files", "");
    var myIFiles = myFolder.getFiles("*.indt")
    for(j=0; j<myIFiles.length; j++)
        var myIndesignFile = myIFiles[j]
        app.open(myIndesignFile)
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
    var myFolder = Folder.selectDialog("Select the folder containing the PDF Files", "");   //Please check this line
    var myFiles = myFolder.getFiles("*.pdf")
    for(i=0; i<myFiles.length-1; i++)
        var myPDFFile= myFiles[i]
        var myDocument = app.documents[0];
            if(myDocument == true){
                var myPage = myChoosePage(myDocument);
            else{
                myPage = myDocument.pages.item(0);
            myPlacePDF(myDocument, myPage, myPDFFile);
    function myChoosePage(myDocument){
        var myPageNames = new Array;
        //Get the names of the pages in the document
        for(var myCounter = 0; myCounter < myDocument.pages.length;myCounter++){
            myPageNames.push(myDocument.pages.item(myCounter).name);
        return myPage;
    function myPlacePDF(myDocument, myPage, myPDFFile){
        var myPDFPage;
        app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;
        var myCounter = 1;
        var myBreak = false;
        while(myBreak == false){
            if(myCounter > 1){
                myPage = myDocument.pages.add(LocationOptions.after, myPage);
            app.pdfPlacePreferences.pageNumber = myCounter;
            myPDFPage = myPage.place(File(myPDFFile), [0,0])[0];         //check this line
            if(myCounter == 1){
                var myFirstPage = myPDFPage.pdfAttributes.pageNumber;
            else{
                if(myPDFPage.pdfAttributes.pageNumber == myFirstPage){
                    myPage.remove();
                    myBreak = true;
            myCounter = myCounter + 1;
    Can anyone give solution for my question.
    Thanks
    BEGINNER

    Hi,
    Try b/m code
    var myFolder = Folder.selectDialog("Select the folder containing the Indesign Files", "");
    var myIFiles = myFolder.getFiles("*.indt")
    for(j=0; j<myIFiles.length; j++)
        var myIndesignFile = myIFiles[j];
        app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
        var myFolder = Folder.selectDialog("Select the folder containing the PDF Files", "");   //Please check this line
        var myFiles = myFolder.getFiles("*.pdf")
        for(i=0; i <= myFiles.length-1; i++)
            app.open(myIndesignFile);
            var myPDFFile= myFiles[i];
            var myDocument = app.documents[0];       
            if(myDocument == true){
                var myPage = myChoosePage(myDocument);
            else{
                myPage = myDocument.pages.item(0);
            myPlacePDF(myDocument, myPage, myPDFFile);
            if(app.activeDocument.modified == true){           
                app.activeDocument.save(new File(String(myFiles[i]).replace('.pdf','') + ".indd"));
                app.activeDocument.save();
                app.activeDocument.close()
    Thanks
    Bala...

  • Scaling in Indesign

    Why does my peace of script doesn't work as it should be?
    Like it is now, the scale syntax doesn't understand the returned scalefactor. If I replace VWidthscale by {50} then indd scales the selected items to 25%.
    This is a small peace of a bigger script, so normally "tell application ..." sentence isn't in.
    --Put in the scale factor
    set VWidthscale to (text returned of (display dialog "Scalefactor widt" default answer "100")) as string
    set VHeightscale to (text returned of (display dialog "Scalefactor height" default answer "100")) as string
    tell application "Adobe InDesign CS4"
    select all
    set horizontal scale of selection to VWidthscale
    set vertical scale of selection to VHeightscale
    select nothing
    end tell

    Hello
    I downloaded sample scripts and looked into the PlaceMultipagePDF.applescript :
    indesigncs4_samplescripts.zip
    It seems that you have inserted some code into the myPlacePDF() handler and have not adjusted its flow control accordingly. (You need to break the loop promptly when the vDone is set to true)
    Try something like the codes below :
    --CODE1
    --Place pdf
    on vPlacePDF(vDocument, vPage, VPDF)
    tell application "Adobe InDesign CS4"
    set vDone to false
    set PDF crop of PDF place preferences to crop media
    set vCounter to 1
    repeat until vDone is true
    repeat 1 times -- # added
    tell vDocument
    if vCounter > 1 then
    set vPage to make page at after vPage
    end if
    end tell
    set page number of PDF place preferences to vCounter
    get page number of PDF place preferences
    tell vPage
    set vPDFPage to place VPDF
    set vPDFPage to item 1 of vPDFPage
    end tell
    get properties of PDF attributes of vPDFPage
    if vCounter = 1 then
    set vFirstPage to page number of PDF attributes of vPDFPage
    else
    if page number of PDF attributes of vPDFPage = vFirstPage then
    tell vPage to delete
    set vDone to true
    exit repeat -- # added (exit inner one time loop; skip the rest of this iteration of inner loop)
    end if
    end if
    --Put in the scale factor
    set mydoc to active document
    tell mydoc
    select all
    set absolute horizontal scale of selection to 50
    set absolute vertical scale of selection to 50
    select nothing
    end tell
    --Center
    -- page size: top, left, bottom, right.
    set {b, a, d, c} to bounds of page 1 of document 1
    set mySelection to selection
    set mydoc to active document
    tell mydoc
    select all
    -- size of the item
    set {y1, x1, y2, x2} to geometric bounds of selection
    --center
    move selection to {(c - x2 + x1) / 2, (d - y2 + y1) / 2}
    select nothing
    end tell
    -- end Center
    end repeat -- # added (end of inner one time loop)
    set vCounter to vCounter + 1
    end repeat
    -- end place pdf
    display alert "finished!"
    end tell
    end vPlacePDF
    --END OF CODE1
    Or more simply :
    --CODE2
    --Place pdf
    on vPlacePDF(vDocument, vPage, VPDF)
    tell application "Adobe InDesign CS4"
    set PDF crop of PDF place preferences to crop media
    set vCounter to 1
    --set vDone to false -- # commented out (not used)
    --repeat until vDone is true -- # replaced with the below
    repeat -- # modified
    tell vDocument
    if vCounter > 1 then
    set vPage to make page at after vPage
    end if
    end tell
    set page number of PDF place preferences to vCounter
    get page number of PDF place preferences
    tell vPage
    set vPDFPage to place VPDF
    set vPDFPage to item 1 of vPDFPage
    end tell
    get properties of PDF attributes of vPDFPage
    if vCounter = 1 then
    set vFirstPage to page number of PDF attributes of vPDFPage
    else
    if page number of PDF attributes of vPDFPage = vFirstPage then
    tell vPage to delete
    --set vDone to true - # commented out (not used)
    exit repeat -- # added
    end if
    end if
    --Put in the scale factor
    set mydoc to active document
    tell mydoc
    select all
    set absolute horizontal scale of selection to 50
    set absolute vertical scale of selection to 50
    select nothing
    end tell
    --Center
    -- page size: top, left, bottom, right.
    set {b, a, d, c} to bounds of page 1 of document 1
    set mySelection to selection
    set mydoc to active document
    tell mydoc
    select all
    -- size of the item
    set {y1, x1, y2, x2} to geometric bounds of selection
    --center
    move selection to {(c - x2 + x1) / 2, (d - y2 + y1) / 2}
    select nothing
    end tell
    -- end Center
    set vCounter to vCounter + 1
    end repeat
    -- end place pdf
    display alert "finished!"
    end tell
    end vPlacePDF
    --END OF CODE2
    Hope this may help,
    H
    Message was edited by: Hiroto (oops, fixed a typo in the first code)

  • I need a script for importing a PDF into IDCS3

    I used the script that came with InDesign... specifically PlaceMultipagePDF.jsx...
    And that worked well.. except for the fact that we just found out that this large PDF has oversize pages (larger than 8.5 x 11) and that plugin is not shrinking to fit. I had a plugin for IDCS2 that would give me import options.. but this PlaceMultipagePDF.jsx doesnt seem to have any options...

    There's a script in the InDesign Interchange site called PDF Multipage Import MAC that will do it, if you know the percentage that you want the PDF scaled to.
    It's my Martin Sretr. It's written for CS, but I think you know how to deal with that, Chris.

  • Mapping InDesign style names to PDF tags

    I've mapped style sheet names to tags in InDesign, and they display correctly in the InDesign structure panel, but when I export a PDF, it is my style sheet names that persist in the PDF tag window. Any ideas how to fix this?

    Hi Jongware
    Many thanks once again for your help. I have one more tweek to make to this code and that is to define which page I want to start loading pdfs from. The original script this is based on does ask me, but the code below does not and I am not sure which line of code I need to do this.
    //DESCRIPTION:Place PDF pages 2-up
    // Jongware, 22-Sep-2009
    // (based on PlaceMultipagePDF.jsx)
    //Make certain that user interaction (display of dialogs, etc.) is turned on.
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
    //Display a standard Open File dialog box.
    var myPDFFile = File.openDialog("Choose a PDF File", "PDF files:*.PDF");
    if(myPDFFile == "" || myPDFFile == null)
      exit(0);
    myDocument = app.activeDocument;
    myPage = myDocument.pages.item(0);
    myPlacePDF(myDocument, myPage, myPDFFile);
    function myPlacePDF(myDocument, myPage, myPDFFile){
    var myPDFPage;
    app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;
    var myCounter = 1;
    var myBreak = false;
    while(myBreak == false){
      if(myCounter > 2 && (myCounter & 1)){
       myPage = myDocument.pages.add(LocationOptions.after, myPage);
      app.pdfPlacePreferences.pageNumber = myCounter;
      if (myCounter & 1)
       myPDFPage = myPage.place(File(myPDFFile), )[0];
      else
       myPDFPage = myPage.place(File(myPDFFile), )[0];
      myPDFPage.horizontalScale = 90;
      myPDFPage.verticalScale = 90;
      if(myCounter == 1){
       var myFirstPage = myPDFPage.pdfAttributes.pageNumber;
      else{
       if(myPDFPage.pdfAttributes.pageNumber == myFirstPage){
        myPage.remove();
        myBreak = true;
      myCounter = myCounter + 1;
    I need to import more than one document into my A3 document, so I need to be able to determine where to start placing.
    Then the script will be perfect - many thanks - hope you can help.
    Regards
    G

  • How can we place the MultipagesPDF, with spceify the position through InDesign CS6?

    when we import pdf file through script of placemultipagepdf in InDesign CS6, we are unable to specify the position, and percentage of document. Pl

    In case you mean the sample script in Applications/Samples/[Insert Programming Language]/PlaceMultipagePDF: What is your question?
    1. "The script does not ask for these values". That seems to be correct. It does not, and never did. So it is working as intended.
    or
    2. "We want to enhance the script and add this functionality but we are unable to do so ..."
       2a. ".. because we cannot find the proper commands to insert." Placing PDFs has been asked before (many times), search this forum for tips.
       2b. ".. because we cannot write scripts, plz do the useful". That is not what this forum is for.
    Way more likely is that you are confusing Adobe's example script with the much more powerful MultiPageImporter by Scott Zanelli (http://indesignsecrets.com/zanelli-releases-multipageimporter-for-importing-both-pdf-and-i ndd-files.php).

  • Importer un PDF avec création automatique des pages

    Bonjour,
    Je pars d'un fichier PDF de 600 pages et je voudrais l'importer dans Indesign mais en me créant automatiquement les 599 pages qui manquent. (Je créé obligatoirement la première).
    J'y arrivais parfaitement sur CS5 grâce à la touche Shift. Mais je viens de passer sur CC et le raccourci clavier ne marche plus.
    Est-ce que quelqu'un connait la solution ?
    Merci

    Salut,
    Tu utilises PlaceMultipagePDF.jsx ?

Maybe you are looking for

  • Live! Cam Voice causing XP to crash

    I have been using the Live! Cam Voice with no problems for about two months. However, now all of a sudden it is causing XP to crash and reboot, sometimes after an hour or so, and sometimes all it takes is having WebCam Center opened without uploading

  • Can't see the sales area in XD01( in all sales area) even  OVXG has defined.

    Hi, In XD01 while creating cusotmer master in all sales area system is not showing  7800-90-01( sales area)even though it is defined in OVXG. This is the  reason why may be am not able to create customer in 7800-90-01sales area. here is the screen sh

  • Acrobat Pro X 10.1.10 Does Not Start Windows 8.1

    I have Create Suite CS6 which apparently bundles Adobe Acrobat Pro X.   I have upgraded to 10.1.10.    Under Window 8.1, this version simply does not start.   There is no startup screen.  There is no error in EventViewer of Windows.   It simply does

  • Smart sync error detection

    Hi, I am developing a Smart Sync application and I am trying to read the ErrorConflict inbox. There is a special class for it called surprisingly ErrorConflictInbox. I have at the backend a call transaction logic, and I am simulating an error in this

  • IWeb Making my photos too dark! What the heck?!

    Im using iWeb 08 for the first time on a new site. I've processed all my shots in Adobe Lightroom and exported them as Jpegs in sRGB color space. The jpegs look fine and are retaining the levels adjustments I've made on the original RAW files. Then I