Pagenumbering in Indesign

Pagenumbering in Indesign: I know how to set the numbering in a document but I dont know how to do it if I want the document to start with f.ex. page 35 instead of page 1. Is there an easy way to do it?
Goran W

Go to Layout>Numberin and Section Options
Start Numbering at 35
Section Marker f.ex.
On your Master page, before the page number go to Type>Insert Special Character>Markers>Section Marker
View your page to make sure it looks ok.
You can apply a different style to the f.ex. if you want to make it italic or bold or something, if you like.

Similar Messages

  • Finding folios in the indesign document

    i want to find the folios in the indesign document and i want to write in csv file. filename.foliosexistpage.
    could anyone tell me

    Hi,
    There is no folio in InDesign, You can get a pagenumber with section prefix. by using the following code:
    app.activeDocument.pages.everyItem().name;
    Regards,
    Ramkumar .P

  • Placed in an InDesign document other InDesign attached file on a specific page

    (inserted into another file indesign indesign on a specific page)
    Hey all !
    I'm trying using Script:
    1. in a document already open indesign:
    var myDoc = app.activeDocument;
    2. place another file. indd 
    app.open(File("/c/myTestDocument.indd")); ----> code and not well
    3. also be inserted in a specific page, (eg on page 12 of my active.Document or any other page)
    var addPages = 2;
    // Page number 2 is item(1), since page number 1 is item(0):
    var addAfter = app.activeDocument.pages.item(2);
    to see if I can give Script code to get the result.
    thank you very much hope to answer please.
    Raul.

    answer is correct but also we're add that the pages one attribute more as masterSpreads.
    For e.g.
    var myDoc = app.activeDocument;
    app.importedPageAttributes.pageNumber = 1;
    var myPage = myDoc.pages.item(0).appliedMaster = app.activeDocument.masterSpreads.item("B-Master"); -> Not right ¿ How would it be right?
    myPage.place(File("/c/myTestDocument.indd"));
    app.importedPageAttributes.pageNumber = 2;
    var myPage = myDoc.pages.item(1);
    myPage.place(File("/c/myTestDocument.indd"));
    What would SCRIPT code right?
    Thanks! and Cheers

  • Return PDF page number from the name of the link in InDesign CS4 JS

    Hi, I need to return pdf page number of the linked file in InDesign.Here what I have so far, but my FilePath comes back undefined, and I am not sure if pageNmuber line would work:
        var myArtBack = app.activeDocument.pages[1].rectangles[0].graphics[0];
        var myArtBackName = myArtBack.itemLink.name;
        var myBackFilePath = myArtBackName.filePath;
        var myPageNumber  = myBackFilePath.PDFAttribute.pageNumber;
    Your help is highly appreciated.
    Yulia

    Your first problem is:
    var myBackFilePath = myArtBackName.filePath;
    That should be:
    var myBackFilePath = myArtBack.itemLink.filePath;
    What you should have done is something like:
    var myLink = myArtBack.itemLink;
    var myPageNumber = myLink.parent.pdfAttributes.pageNumber;
    Maybe you need the file path for some other purpose, but that's not the route to information about the PDF graphic (the parent of the link) which has the pdfAttributes property -- property names always start with a lowercase letter.
    Dave

  • How to insert documents first pagenumber on any page?

    Does anyone know how to insert the pagenumber from the first page in a indesign-document, on a page of choosing? I can only find how to add a document last-page as a number.
    Example:
    A document with page 10-20.
    On page 3, 4 or 13 I would like to have a footer that says "Document XYZ - Pages: 10-20".
    Any ideas?

    This is not intuitive,, but should work...
    On the first page add a small text frame anywhere and insert a fame break character. Now thread that frame to the one where you want to have your start page number, wherever that happens to be in the document. In this new frame enter a Special Character > Markers > Previous Page Marker.
    The down-side here is this is not a variable, so if you want to have more than one frame like this you need to set up each one the same way with its own linked frame on the first page. In sush a case I thnk it would be more practical to just enter the start page number manually, perhaps as a custom text variable that you can edit in one place if the start number needs to change.

  • Place multiple InDesign document pages (ImportedPages)

    Hello,
    I need a way to place multiple pages from an InDesign document in much the same way as the sample PlaceMulitpagePDF.jsx does but with InDesign documents rather than PDFs.
    The following is the critical line where the PDF page number to import is set:
    app.pdfPlacePreferences.pageNumber = myCounter;
    What is the equivalent command for setting the InDesign document page number when choosing a page to import?
    I have tried using:
    Application.ImportedPageAttribute.pageNumber
    but without result.
    TIA

    Why, thank you Mr. Schneider!
    I am embarassed to say that my problem was a couple of typos, (reading the Zanelli script made that obvious to me). The command should have been:
    app.importedPageAttributes.pageNumber
    Note the lowercase "i" on "imported" and the "s" after "Attribute."
    Your help is very much appreciated!

  • Place pdf into InDesign CS4 js

    Hi, I have those lines of script that place the pdf into InDesign, but in the process new frame gets created in which the pdf is placed, and I need it to be placed into my existing frame. How could I do it:
        var myRectangle = myDoc.pages[0].rectangles[0];   
        myPage = myDoc.pages[0];
        myPDFPage = myPage.place(File(myFile), [0,0])[0];
    Thank you very much for your help.
    Yulia

    Yes, you are right, I am stuck for a different reason, it does places the second page.
    What I think is going on,  and maybe there is a better approach to it than the one I am going about it: when I have single page pdf for the 1st page and single page pdf for the 2nd page, my script first tries to upload 1st pdf as multi-page just in case there is only one pdf with both files. And for some reason it uploads single page pdf twice (into the second InDesign page as well when there is no second page in the 1st pdf [If I could avoid that all together would be great]). So my script verifies if the pdf uploaded into the 2nd page is 1st page of 1st pdf then it deletes it. And then it looks if there is a file for the second page, and uploads it. So my new challenge is that when it verifies what page of the pdf is uploaded into the 2nd page of InDesign after the 1st pdf upload, it just crashes, and it worked with the previous way of placing pdfs (the green line of the script).
    The second my issue is that, as it places the files, it dis-attaches the frames from the master page, and I need them to be still half attached. For the same reason new frames created by place command - is a problem for me. Maybe easier way, if it's possible at all, half-attach those new frames to the Master page afterwords. (This is the main goal for me).
    Here are both functions: to upload first pdf and second pdf:
    function myPlacePDF(myDoc, myFile){
        app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;
        // page 1
        myPage = myDoc.pages[0];
        var myRectangle = myDoc.pages[0].rectangles[0];   
        app.pdfPlacePreferences.pageNumber = 1;
        myRectangle.place(myFile);
        //PDF.place (myFile);
        //myPDFPage = myPage.place(File(myFile), [0,0])[0];
        myRectangle.geometricBounds = [0, 0, myGB_Y2, myGB_X2];
        // page 2
        myPage = myDoc.pages[1];
        var myRectangle = myDoc.pages[1].rectangles[0];
        app.pdfPlacePreferences.pageNumber = 2;
        myPDFPage = myRectangle.place(myFile);
        //PDF.place (myFile);
        //myPDFPage = myPage.place(File(myFile), [0,0])[0];
        myRectangle.geometricBounds = [0, 0, myGB_Y2, myGB_X2];
        if (myPDFPage.pdfAttributes.pageNumber != 2){
            myPDFPage.parent.remove();
        try{
            var myFrame = myDoc.pages[0].rectangles[1];
            if (myFrame.isValid == true){
                myFrame.remove();
        catch (e){}
        try{
            var myFrame = myDoc.pages[1].rectangles[1];
            if (myFrame.isValid == true){
                myFrame.remove();
        catch (e){}
        app.pdfPlacePreferences.pageNumber = 1;
    function myPlacePDFback(myDoc, myFile){
        var myFrame= myDoc.pages[1].rectangles.[0];
        if (myFrame.isValid == false){
            myDoc.pages[1].rectangles.add();
            myFrame.strokeWeight = 0;
            myFrame.geometricBounds = [0, 0, myGB_Y2, myGB_X2];
        app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;
        myPage = myDoc.pages[1];
        var myRectangle = myDoc.pages[1].rectangles[0];
        app.pdfPlacePreferences.pageNumber = 2;
        myRectangle.place(myFile);
        //myPDFPage = myPage.place(File(myFile), [0,0])[0];
        app.pdfPlacePreferences.pageNumber = 1;
    Kasyan, your script might be helpful, and I would like to look into it.
    Thank you very much for your help.
    Yulia

  • Script for Place PDF file into a InDesign file

    Hi everyone, i need to import a PDF file into a InDesign document and in order to do this i used scripts found over  the net (e.g. Zanelli's script ecc.) but i tried this solution:
    function(){
        app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
        var myDocument, myPage;
        if(app.documents.length != 0){
            myDocument = app.activeDocument;
        else{
            alert("No document opened");
            exit();
         if (app.selection[0] == undefined) {
            alert("Select box");
            exit();
         } else {
                var myPDFFile = File.openDialog("Select PDF:");
                if((myPDFFile != "")&&(myPDFFile != null)){
                    myDocument.viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN;
                    myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.MILLIMETERS;
                    myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.MILLIMETERS;   
                    var myData = new Array;
                    myData[0] = app.selection[0].parentPage;
                    myData[1] = app.selection[0].geometricBounds;
                    myData[2] = app.selection[0];
                    myPlacePDF(myDocument, myData, myPDFFile);
        //FUNCTIONS
        function myPlacePDF(myDocument, myData, myPDFFile){
            var myPDFPage;
            var myPage = myData[0];
            var myGeometricBounds = myData[1].toString().split(",");
            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;
                 myRectangle = myPage.rectangles.add(undefined, undefined, undefined, {geometricBounds:[myGeometricBounds[0],myGeometricBounds[1],myGeometricBounds[2],myGeometricBounds[3]]});
                 myRectangle.clearFrameFittingOptions();  
                 myRectangle.frameFittingOptions.fittingOnEmptyFrame = EmptyFrameFittingOptions.PROPORTIONALLY;
                 myRectangle.frameFittingOptions.autoFit = true;
                 myRectangle.frameFittingOptions.fittingAlignment = AnchorPoint.CENTER_ANCHOR;
                 myPDFPage = myRectangle.place(File(myPDFFile), false)[0];           
                 if(myCounter == 1){
                    var myFirstPage = myPDFPage.pdfAttributes.pageNumber;
                else{
                    if(myPDFPage.pdfAttributes.pageNumber == myFirstPage){
                        myPage.remove();
                        myBreak = true;
                myCounter = myCounter + 1;
             myData[2].remove();  
    what i would is, before the script place every single page of PDF file in the document, determine if the same page of the Pdf file is vertical or horizontal, to make the right section for the page.
    Is it possible?
    Thank you

    Moved to scripting forum...

  • 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...

  • Finding then combining content from several indesign documents in one document

    Hi everyone,
    I wonder if someone can help...
    I'm trying to write scripts for indesign server which I want to:
    a) search for,
    b) pick out, then
    c) put together content from one or many indesign documents into a template on the server starting at a pre-defined point in the template. 
    After that we produce a pdf of the document to pass on / do whatever. I've got so far with the scripting documentation but I'm stuck!  This is what I've done so far:
    1/ create a document template with a script
    2/ add text elements to the document template (header and footnote, title,       body text i.e. intro and data, and the contact details)
    3/ add text / content from another indesign file into this       document (so far only done it with a .txt file) ...
    ... I'm stuck on the indesign documents at the moment.  I have       looked at various options, the most appropriate way I can see in       the manuals to get content from one document to another is by       duplicating.  My understanding is to do this you have to target the text in the source       document, duplicate it and then add it into a text frame on the       target document.  It's the targettting of the text and surrounding       elements in the source document I'm battling with. 
    any ideas on how I go about this effectively? 
    Any help and advice appreciated!

    The story so far...
    I've added the code kindly provided by getZinger (thanks again!) and am now stuck on the next stage, .  I've commented the code where I'm having problems, and essentially have two key issues to resolve:
    1/ how I get the documents to be placed one after the other, avoiding the overlay I get on the first insertion page.
       (I am using a fixed value as an insert point as the template I'm using will always have inserts starting on page 3).
    2/ how I access the pdf's I want to insert from a location other than C:\Users\Whoever\Documents\
    try{
    for(myCounter = app.documents.length; myCounter > 0; myCounter--){
    app.documents.item(myCounter-1).close (SaveOptions.no);
      myDocument = app.open(File("C:/.../template.indd"));
      myPDFFiles = ["pdf1.pdf","pdf2.pdf","pdf3.pdf"];
    insertPdf();
    function insertPdf(){
    //I've gone for a static number here as the datapage in the skeleton doc  is page 3.
    //This seems to result in some of the pages being placed on top of each  other :-(
        var myPage = myDocument.pages.item(2);
        /*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 myPDFSet = File("C:/Users/Simon/Desktop/Mexico.pdf");
        for(myIndex=0;myIndex<myPDFFiles.length;myIndex++){
        myPDFSet = File(myPDFFiles[myIndex])
        myPlacePDF(myDocument, myPage, myPDFSet);
        myDocument.exportFile(ExportFormat.pdfType, new File("C:/.../test_insert.pdf"), false);
        myDocument.close(SaveOptions.no);
    }catch(e) { myDocument.close(SaveOptions.no); }
    function myPlacePDF(myDocument, myPage, myPDFSet){
    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;
    //the files seem to be automatically placed from C:\Users\Whoever\Documents
    //I need to change this to accept a different file path somehow but I  don't know how
    //this is why the myPDFFiles array only has filenames at the moment
    myPDFPage = myPage.place(File(myPDFSet), [0,0])[0];
    if(myCounter == 1){
    var myFirstPage = myPDFPage.pdfAttributes.pageNumber;
    else{
    if(myPDFPage.pdfAttributes.pageNumber == myFirstPage){
    myPage.remove();
    myBreak = true;
    myCounter = myCounter + 1;
    once again, thanks for taking the time to read this, any help greatly appreciated :-)

  • 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

  • Modify width of rectangle based on page number in InDesign via Javascript

    I have a rectangle called `pageBar` on my master page !
    I would like to create a script that will automatically resize the width of the rectangle based on the page number.
    Something like : `width = 1280 * (pageNumber / pageTotal)`
    Any help would be much appreciated.
    Thanks in advance,
    J.

    Here's the script I ended up with. I'm a bit unhappy that I ended up having the literal string "pageBar" in it twice. The second instance is there to allow the script to be run on the same document twice -- that's one of the prices you pay for using master page items in a script rather than creating objects on the fly and applying an object style to them (better than setting selected properties):
    //DESCRIPTION: Size PageBar on each page
    (function() {
              if (app.documents.length > 0) {
                        sizePageBars(app.documents[0]);
              return;
    function sizePageBars(aDoc) {
              var pageBar = getMasterItem(aDoc, "pageBar");
              if (pageBar == null) return;
              // walk through the document's pages and deal with each page
              var theMaster = pageBar.parent;
              var numPages = aDoc.pages.length;
              for (var j = numPages - 1; j >= 0; j--) {
                        if (theMaster == aDoc.pages[j].appliedMaster) { // ignore pages with other masters
                                  processPage(aDoc.pages[j]);
              function processPage(page) {
                        // numPages, pageBar and j are visible as global variables in this function
                        // caculate desired width
                        var desiredHalfWidth = 1280 * (j + 1)/(numPages * 2); // j starts at zero;
                        // could be running script for a second time, so check to see if page already has pageBar on it
                        var bar = page.rectangles.item("pageBar");
                        if (bar == null) {
                                  var bar = pageBar.override(page);
                        var pBounds = bar.geometricBounds;
                        var xCenter = (pBounds[3] + pBounds[1])/2;
                        pBounds[1] = xCenter - desiredHalfWidth;
                        pBounds[3] = xCenter + desiredHalfWidth;
                        bar.geometricBounds = pBounds;
              function getMasterItem(aDoc, name) {
                        var appliedMaster = aDoc.pages[0].appliedMaster;
                        var anItem = appliedMaster.rectangles.item(name);
                        if (anItem == null) {
                                  alert("Couldn't locate 'pageBar' rectangle.");
                        return anItem;
    I was going to introduce to the resize method, but that would have first meant understanding it myself. The description in the object model viewer is a masterful demonstration of how not to communicate complicated information.
    So I did a web search and found myself on this page by Marc Autret: http://www.indiscripts.com/post/2013/05/indesign-scripting-forum-roundup-4
    Search that page for resize and you'll see what I mean. Compared to the simple manipulation of geometric bounds, using resize is a nightmare of complexity. Marc has simplified it by providing a function you can call, but I decided to just go with using the bounds.
    I hope this proves helpful to you.
    Dave

  • COMBINE 3 INDESIGN PAGES INTO I

    Hi, I'm looking to resize and place 2 indesign CS3 pages (front and back of post cards-can be sized at 5.625" x 3.625" or 6.125" x 4.375") onto a 3rd 8.5" x 11" indesign page that contains the front and the back of the cards with additional copy. It is the way we currently submit proofs to our clients for approval as a single page that they in turn fax back to us. Thanks for any help on this.

    Hi I tried something. Let me know if it helped.
    Loic
    if(app.documents.length!=0)
    try
    //Get Postcard doc attributes
    var doc= app.documents[0].getElements()[0];
    var docFile = File(doc.fullName);
    var docName = doc.name.split(".indd")[0];
    var docFolder = Folder(docFile.parent);
    //Add a temporary document & set dimensions
    var tempdoc = app.documents.add();
    with(tempdoc)
    documentPreferences.pageWidth="8.5";
    documentPreferences.pageHeight="11";
    //Create the imported document first's recipient & place the page 1 of the postcard document
    var r1 = tempdoc.rectangles.add({geometricBounds:[0.75,1.1875,5.125,7.3125]});
    app.importedPageAttributes.pageNumber = 1;
    r1.place(docFile,false);
    fitMe(r1);
    //Create the imported document second's recipient & place the page 2 of the postcard document
    var r2 = tempdoc.rectangles.add({geometricBounds:[5.2525,1.1875,9.6345,7.3125]});
    app.importedPageAttributes.pageNumber = 2;
    r2.place(docFile,false);
    fitMe(r2);
    //Create a text frame for other infos
    var r3 = tempdoc.textFrames.add({contents:"Please Fax us back your approval as soon as possible at 555-8000-210",geometricBounds:[9.8325,1.1875,10.5,7.3125]});
    //Export to PDF and display the created file
    var myPDFfile = docFolder+"/"+docName+".pdf";
    app.pdfExportPreferences.viewPDF = true;
    exportPDF(myPDFfile,"[PDF/X-1a:2001]",tempdoc);
    //Close the temporary document without saving it.
    tempdoc.close (SaveOptions.NO, undefined, undefined, false);
    catch(e)
    //In case of a error...
    alert(e);
    else
    alert("You don't have any Indesign documents open !");
    //Quite obvious function
    function exportPDF(myPdfFile,myPdfPreset,doc)
    doc.exportFile (ExportFormat.PDF_TYPE, myPdfFile, false, myPdfPreset, undefined, undefined, false);
    //Fit placed documents into the recipients
    function fitMe(monObjet)
    monObjet.fit(FitOptions.PROPORTIONALLY);
    monObjet.fit(FitOptions.CENTER_CONTENT);
    monObjet.fit(FitOptions.FRAME_TO_CONTENT);

  • Indexing a book using Indesign CS 6

    Hello,
    Did not use Indesign for 10 years ... and - when starting it up again with a newer version - I was surprised in an unpleasant way that it is still not possible to create footnotes inside tables in a normal way without creepy workarounds. And a lot of other wacky stuff which prooves to me that Adobe uses this programm as their ever-living milky-cow without much thoughts about making its stable a little more confortable. But enough about it and sorry for my interruption.
    So I want to create an index in my book ...
    3 questions please ... and thanks for your help!
    1) Is there a maximum of entries for the index?
    2) Is there a way to have a better oversight when having hundreds of entries? Now topics, sub-topics and pagenumbers take 3 lines of space in my index-panel. So one has to scroll a lot when having many entries. Is it possible to have topics, sub-topics and pagenumber(s) on ONE line?
    3) I started my book with 2 unnumbered pages. But the index-numbering uses the page-numbering as found in the pages-panel. I can start a new section but then my footnumbering also starts again ... (I will not repeat my grudges here about this EVERLASTING problem).
    Is there a solution without manually correct all pagenumbers after generating a new index?
    Thanks again for your appreciated help!
    Sincerely yours, Peter.
    Message was edited by: mummiepoep-2

    Dear Mr. Spier (Beste Peter), thanks for your help.
    But I still do not understand how this index-panel works.
    Let us take as a start a book with two non-numbered pages followed by automatically numbered pages.
    So ...
    An "indesign"-page 10 (just an example) is MY page 8.
    Indesign page 10 is mentioned in the pages-menu and when adding topics in the index-panel of the SAME page, they ALL have a number 10.
    But the strange thing is, that when I generate a new index and paste it somewhere in my book, the above mentioned topics do CORRECTLY refer to MY page 8.
    So I'm happy with that but I seem have to missed something. For instance (looking around on internet) most people prefer to adjust page-numbering optins to their master-pages what I did not.
    And (to Peter or someone else)
    does anybody know the answers on my two other questions ...
    1) Is there a maximum of entries for the index?
    2) Is there a way to have a better oversight when having hundreds of entries? Now topics, sub-topics and pagenumbers take 3 lines of space in my index-panel. So one has to scroll a lot when having many entries. Is it possible to have topics, sub-topics and pagenumber(s) on ONE line?
    Thanks.

  • CS3 and Delphi: Place pdf into indesign

    Hello,
    I am developing a script with Deplhi  that automates the creation of documents.
    I would like to be able to place pdf documents in an InDesign document. I adapted a script that I found in this thread: http://forums.adobe.com/message/3013174
    I only had to define the proper types for the variables, cause Delphi doesn't allow untyped variables. There was one line in particular that I had to modify thoroughly:
    myPDFPage = myPage.place(File(myPDFFile), [0,0])[0];
    The PlacePoint parameter had to be an array of double, and the missing parameters had to be set. Eventually, the following code worked:
    var
      APoint:      array of double;
    begin
      SetLength(APoint, 2);
      APoint[0] := 0;
      APoint[1] := 0;
      myPage.place(Filename, APoint, ActiveDocument.Layers[1], false, false);
    In the original script, the result of the place function is assigned to the variable myPDFPage, and I am having troubles to get this assigment working. Often the TypeLib uses OleVariants and you have to figure out by ourself which type(s) are allowed and have to be used, and which type cast(s).
    In the original script this code follows:
    myFirstPage = myPDFPage.pdfAttributes.pageNumber;
    The only interfaces in the TypeLib that have a property called pdfAttributes are PDF and ImportedPage. But neither of those types work if I define pdfAttributes to be of that type. I am not sure whether the fact that place seems to return an array adds additional problems. Most of the times, arrays from in TypeLib are based in the index 1, not zero.
    But I tried
    var
      APoint:      array of double;
      myPDFPage:   PDF;
    begin
      myPDFPage := PDF(myPage.place(Filename, APoint, ActiveDocument.Layers[1], false, false)[0]);
    and
    var
      APoint:      array of double;
      myPDFPage:   ImportedPage;
    begin
      myPDFPage := ImportedPage(myPage.place(Filename, APoint, ActiveDocument.Layers[1], false, false)[0]);
    and the same with and array index of 1 instead of 0, and without any index. But none of it would be compiled without an error.
    Doies anybody know how that command line has to be or which type myPDFPage has to have?
    And more generally: How could I determine the possibla types of a parameter, variable or return type that is an OleVariant in the TypeLib?
    I found some InDesign CS3 scripting specific pdfs here: http://www.adobe.com/products/indesign/scripting/, but no complete reference of all functions and types.
    Best regards,
    Christian Kirchhoff

    In order to make the code compilable, I had to do a double typecast. The result of the place function - in the Typelib - is OleVariant, and I couldn't use the snytax place(...)[0]; directly.
    So I declared a variable myPDFPages as an array of PDF, and assigned the entiry result of the place function to that.
    The new code is:
    var
      APoint:      array of double;
      myPDFPages:  array of PDF;
      myPDFPage:   PDF;
    begin
      myPDFPages := myPage.place(Filename, APoint, ActiveDocument.Layers[1], false, false);
      myPDFPage := PDF(myPDFPages[0]);
    But: allthough the code compiles, the line myPDFPages :=... throws an error (after the pdf is inserted in InDesign).
    If I just use execute the place command without assingning the result to anything, it works without an error. But the code I copied from the aforementioned forum thread uses the result, and so want I.
    I'll do some further testing on this.
    Best regards
    Christian

Maybe you are looking for

  • Jfreechart line chart mouse click problem

    i need to implement a line chart where users can click on an area of the chart and highlight it, i have serveral questions regarding how to do this: i added a mouselistener to the chartpanel, i can get the points with e.getTrigger().getPoint(), but I

  • How do I make and keep a copy of a photo in iPhoto so that I can edit the copy and keep the unedited original?

    How do I make and keep a copy of a photo in iPhoto (version 9.5.1) so that I can edit the copy and keep the unedited original?

  • Help in Debugging

    Hi All,            I have one variable in one loop.Now i want to go to that variable everytime it's value is negative.Now with breakpoint and watchpoints i can go to that place in code when it is becoming negative first time. Any way in debugging whe

  • Zoom problems in ios8

    it's a neat feature to have the keyboard not zoomed. However, i want my default to be a full screen zoom. I find it easier for navigating. Every time I do typing, any time the keyboard pops up, the next time I zoom there's a window as if the keyboard

  • SCRIPT PC editor

    in scripts : when i wrie a stmt in editor, eg: /: IF <> OR <> /: OR <>          ( IF STMT EXTENDING TO NEXT LINE, WHAT IS COMMAND IS IT /: OR SPACE OR =) HELP ME OUT PLS