Adding pages to a document

I have been using the following code to add a page to the document.
Utils<ILayoutUIUtils>()->AddNewPage();
It has been working fine in CS3 and CS4. However in CS5 (mac), it is inserting pages. So in a 2-page document, any objects that were on the 2nd page, are now on the 4th page in the document. And the newly added pages become the 2nd and 3rd page.
In previous versions, all the new pages were added at the end of the existing pages, so any objects that were on the 2nd page, stay there, and the new pages are the 3rd and 4th page.
Any ideas?

Dux,
Insert a Section Break at the beginning of the first line of the document to insert a new page at the top of a document without upsetting the alignment of text and graphics below. The Page numbers will update below, but the design will be intact. Be aware though that this may result in your needing to copy Header and Footer details to the new first Section. If you build a document in the normal order, Section details are inherited by succeeding Sections, but when you work backwards this doesn't happen automaticallly.
Jerry

Similar Messages

  • I added content to a document in Pages on my Mac last night, which was saved to icloud and this morning it was gone. Can I get my precious work back? Thanks

    Hello
    I added content to a document in Pages on my Mac last night, which was saved to icloud and this morning the additions were gone. Can I get my precious work back? Thanks

    Just thought I'd add my solution, I decided to go with WebDAV and I think it actually works better than the iTunes way, the steps are pretty much the same but avoiding the iTunes interface just makes things easier and faster.
    I followed this guide but it does have a small mistake in the httpd-dav.conf file, on line 2, where it's WebServer/WebDAV">, it should be <Directory "/Library/WebServer/WebDAV">.
    The tricky part is setting permissions which if wrong will give you errors when connecting with the iPad, I opted to set all to Read&Write since my home network has a hardware firewall. Another convenience was to add an alias to the webdav share on the Desktop.
    I'm still expecting the call from Apple but even if they fix the iTunes I'm sticking with WebDAV, atleast until I see what's new with iOS5 and iCloud this fall which should bring true sync for documents (I'm hoping that they will offer encryption with my own keys, if not, then I'll probably keep using WebDAV).

  • InDesign CC 2014 version adding pages to an existing document keeps crashing, why?

    InDesign CC 2014 version adding pages to an existing document keeps crashing, why?

    Because there's a problem in the file. See Remove minor corruption by exporting

  • How to setup a link that is of the type "Go to a page in another document"?

    Is there a direct way for a javascript to setup a link that is equivalent to the acrobat link type  you get when you add a link of the type “Go to a page in another document”?
    Tools-Advanced Editing-Link tool, make a box
    Check: Go to page view, Next (Create go to view dialog opens)
    Open second document and go to page
    Click “Create go to view dialog” to set up link
    Result is a link, when view by link properties, with an action of
    Go to a page in another document
    File: C:\My Documents\File2.pdf
    Page: 43
    Zoom level: Custom
    I have a java script in a setAction of a link that I think does the job:
    l.setAction("var otherDoc = app.openDoc('../Folder2/File2.pdf', this);otherDoc.pageNum = 1 - 1;");
    But is there a more direct way that actual sets up a “a link of the type Go to a page in another document” so if it's "advanced edited" its the same as the manual set links?
    I would like to setup a set of pdf documents, on the hard disk of a PC or Mac, that can be open with acrobat pro running on the same computer and have the link jump to, and open in a new window, in acrobat pro, to a given page of a second document in the set.
    John
    Code example in more detail:
    /* Insert document level JavaScript to set disclosed = true.
       This will run when the document is opened.*/
    this.addScript("setDisclosed", "this.disclosed = true;");
    // Search through the document for the word “Acrobat” and create a link around that word.
    for (var p = 0; p < this.numPages; p++)
        var numWords = this.getPageNumWords(p);
        for (var i=0; i<numWords; i++)
            var ckWord = this.getPageNthWord(p, i, true);
            if ( ckWord == "Acrobat")
                var q = this.getPageNthWordQuads(p, i);
                // Convert quads in default user space to rotated
                // User space used by Links.
                m = (new Matrix2D).fromRotated(this,p);
                mInv = m.invert()
                r = mInv.transform(q)
                r=r.toString()
                r = r.split(",");
                l = addLink(p, [r[4], r[5], r[2], r[3]]);
                l.borderColor = color.blue
                l.borderWidth = 1
                //l.setAction("this.getURL('http://www.adobe.com/');");
               l.setAction("var otherDoc = app.openDoc('../Folder2/File2.pdf', this);otherDoc.pageNum = 3 - 1;");
    Current Systems in use to create documents with links and view them:
    Windows XP SP3
    Word 2003 SP3
    Acrobat 9 pro version 9.4.4
    Or just to view them:
    Mac OS 10 Lion version 10.7.4
    Acrobat 9 pro version 9.5.1
    (note I have limited understanding of Mac’s)

    If you use buttons instead, it is possible to script adding the actions that you want. It involves creating a properly constructed FDF, saving it, and then importing it into the document. Buttons can be made to appear just like links. For more information, see: http://www.planetpdf.com/developer/article.asp?ContentID=6338

  • Add a field to the last page of a document file only

    Hello,
    I currently have a script which will add signature and text fields to the first page of a document.
    The script is required to specify the "last page" of the document and not the page number, as each file will vary with the number of pages.
    The script is in run in batch processing on multiple files which are not open (usually 50 at a time).
    If anyone can please advise how to modify the script I will be most grateful.
    // Create Date field dynamically for employee signature field
    var f = this.addField("Todaydate", "text", 0,
    [60, 54, 135, 75]);
    f.userName = "Today's Date";
    f.value = "Automatic Update";
    f.readonly = true;
    f.fillColor = color.ltGray;
    // Create signature field dynamically for employee
    var f = this.addField("mySignature", "signature", 0,
    [120, 85, 330, 105]);
    f.setAction("OnFocus", "var f = this.getField('Todaydate'); f.value = util.printd('d/mm/yyyy', new Date());");

    Thank you very much for your help, I really appreciate your quick response.
    The script has been modified as you suggested and the fields are now added to the last page of each document and is working perfectly.
    I have included the modified script as follows for reference:
    // Create Date field dynamically for employee signature field, add fields to the last page of every file
    // Determine the last page of this document
    var page = this.numPages - 1;
    var f = this.addField("Todaydate", "text", page,
    [60, 54, 135, 75]);
    f.userName = "Today's Date";
    f.value = "Automatic Update";
    f.readonly = true;
    f.fillColor = color.ltGray;
    // Create signature field dynamically for employee
    var f = this.addField("mySignature", "signature", page,
    [120, 85, 330, 105]);
    f.setAction("OnFocus", "var f = this.getField('Todaydate'); f.value = util.printd('d/mm/yyyy', new Date());");

  • [CS3 JS]  Move pages from one document to another?

    First, a brief explanation of what I am trying to do. I have several individual chapters that I am including in an INDD book. However, I also want to be able to allow those individual chapters to stand alone, meaning that I want to add a cover/title page to each chapter file (these two pages would be placed before the current page 1 of each chapter).
    My preference would be to write a script that would open the cover/tp file and open the first chapter file; this part is no problem. Where I am running into trouble however, is the second step: moving the cover/tp pages (2 pages) over into the chapter file.
    Manually, I would open Cover.indd, activate the "move pages" menu, "Move pages: 1-2", "Destination: Before_Page 1", "Move to: Chapter1.indd".
    With over 100 chapters in the book, however, I would prefer to automate the process. I have looked into the Page.move and PageItem.move elements, but both look like they would require a location in the current document (either in (x,y) form or using "AT_BEGINNING".
    If I cannot get this to work, I will likely try to insert two blank pages, then cut/paste with a script, but I would prefer the "move" functionality, if it is possible.
    A couple of answers to potential questions:
    I can't simply place the INDD cover file b/c it uses a text variable to pull the chapter name; this personalizes each stand-alone chapter.
    Same answer to why I can't just slap the 2-page .pdf on the front of each. I need the text variable to still be active.
    Has anyone tried to move pages from one document to another using scripting? I tried to explain what I am trying to do, but if it doesn't make sense, I can try again. :)
    thanks!
    Matt

    ok here we are
    I get a raw skeleton that you will have to adjust but it's functional.
    Use a PDF for placement as you can specify the page that you want to place.
    I don't know if you can do the same for indesign files.
    So basically, it starts adding 2 pages and placeing the pdf in the same time.
    After that, it creates the textVariable and the frame that will receive it.
    Here you are:
    //If a document is open
    if(app.documents.length!=0)
    var ad = app.activeDocument;
    //Pages placement
    for(i=0; i<2; i++)
    //Add 2 pages on top of the document;
    var tmpPg = ad.pages.add(LocationOptions.BEFORE, ad.pages[0]);
    //Here you place your pdf
    app.pdfPlacePreferences.pageNumber = i;
    tmpPg.place(File(cover.pdf), false)
    //You should specify page x and page y but ain't found yet the way to go.
    //Text variable creation
    //Check if the textVariable named "txtVar" does not already exist...
    if(ad.textVariables.item("txtVar")==null)
    //if not found, create the text variable named "txtVar"
    var txtVar = ad.textVariables.add();
    txtVar.variableType =VariableTypes.CUSTOM_TEXT_TYPE;
    txtVar.name = "txtVar";
    //Set the contents of the text variables to the string "test"
    ad.textVariables.item("txtVar").variableOptions.contents = "test";
    //these coordinates don't care aboutyour units but you may adjust them to your needs
    var y1 = ad.marginPreferences.left;
    var x1 = ad.marginPreferences.top;
    var y2 = y1+5;
    var x2 = x1+25;
    var myFrame = ad.pages[0].textFrames.add({geometricBounds:[y1,x1,y2,x2]});
    //Set the contents of the frame to the text variables "txtVar"
    myFrame.contents=ad.textVariables.item("txtVar").variableOptions.contents;
    //You may want to stylize the txtVar
    //In this case, either you use a existing characterStyle or you create one in the script
    Bye Loic

  • [JS CS3] Page side when adding pages

    Hello all,
    I am using a script to remove oversets by adding pages with linked text frames to the end of the document. When I am done removing the oversets, I check to make sure the document ends on a left page; if not, I am using the code below to add an extra page. However, the page ends up as a second right hand page right next to the previous one. How do I ensure that the page I add is a left-hand page. Thanks in advance.
    Rick Quatro
    rick at frameexpert dot com
    585-659-8267
    // Set a variable for the active document.
    var oDoc = app.activeDocument;
    // Call a function to remove the oversets
    // Make sure the document ends on a left page.
    if (oDoc.pages[-1].side == PageSideOptions.RIGHT_HAND)
    AddPageAndLinkedTextFrame(oDoc);
    function AddPageAndLinkedTextFrame(oDoc)
    var oPage = oDoc.pages.add(LocationOptions.AFTER,oDoc.pages[-1]);
    var oTextFrame = oPage.textFrames.add();
    oTextFrame.geometricBounds = GetPageMarginBounds(oDoc,oPage);
    oTextFrame.previousTextFrame = oDoc.pages[-2].textFrames[0];

    in "standard" document - without page shuffling, etc. - you can do something like this (VB):
    if mydoc.pages.item(a) mod 2 then
    ' right page
    else
    ' left page
    endif
    robin
    www.adobescripts.com

  • Appending new pages to signed documents now makes Acrobat 9 and Reader 9 mark signature as invalid

    Hello!
    I have developed a service that appends additional pages to existing PDF documents. Some of the documents the service works on happen to be signed. As the service appends the pages using incremental updates, the signed contents are left untouched. This makes Acrobat 8 and Reader 8 display the signature state as "valid with subsequent changes" which is ok and no one complains about.
    Now along come Acrobat 9 and Reader 9, and all of a sudden the signature state is "invalid" which my users do complain about. Telling them that inspecting the signature state details they can see that the signed content still is untouched and the actual change is recognized to be some appended pages, doesn't help either as they in turn forward the documents to their customers who don't accept the documents if the Adobe Reader sais the signatures are invalid.
    Does anyone know a way new pages can be added to a signed document without having the new Adobe program versions choke on them?
    Even a hint that involves adding some flag to the original unsigned document or the signature itself would help as the users in question can tweak those processes. Due to the nature of the workflow, though, signing unfortunately must happen before my service can add the new pages.
    Best regards, Mikel.
    By the way, the signatures in question are regular approval signatures, nothing fancy, especially not certifying signatures (which indeed can forbid any changes or at least any changes but some form fill-ins and annotations)...

    Hi Fritz,
    In the interest of full disclosure, I got the answer to the problem from one of my distinguished colleagues, I'm just the messenger in this case.
    The problem is that the form adds some items to the Arzneispezialität / Zusatztext combobox which are there during signing but the form doesn’t remember that it did this on the next form open. 
    Since this field is included in the MDP+ signature and the field has changed in the re-opened version vs. the signed version, the MDP+ signature becomes invalid.
    XFA has a feature that remembers these kinds of things for you but it is turned it OFF. Please open the attached screen shot to see the control in question.
    So, you can either (1) turn this feature ON (Automatically), or (2) write some script to clear the combobox items prior to signing or (3) write some script to repopulate the combobox items on the subsequent open to match the items that were there during signing.
    Steve

  • Can't View Multiple Pages of a Document in Cover Flow

    According to the various Steve Jobs demonstrations and the accompanying manual, I thought we would be able to see multiple pages of a document in cover flow. The manual on p. 13 states:
    "Move the pointer over an item to view a movie or see the pages of a document".
    Yet this doesn't seem to work for Apples own Pages or Numbers. I have a multiple page Pages document that shows as one really long page both in cover flow and Quick look. Is there something I need to turn on? Anyone else having this problem?

    Adding to the problems of viewing Pages & Keynote documents, I have to say the integration is quite poor.
    There don't appear to be any problems 'flicking' through different multiple pages of a Pages document in Finder/Quicklook if it is based on an iWork template but if it is an original document containing shapes or images masked by shapes then problems arise; the document will only present the first page and in Quicklook the preview presents all elements separately i.e the image followed by the shape which was used to mask it...quite frankly it looks awful. And the same occurs in Keynote previews. Does anyone else have this experience?
    Fingers crossed this is a bug which will be addressed quickly.

  • Moving pages from one document to another in preview

    I have two PDF documents open with the sidebar on my desktop.  I have moved a page from one document sidebar to another and then saved the document with the additional page.  When I open the document the added page is not there.  This is extremely fustrating as I have tried this all different ways.  Any suggestios???

    See my reply in this thread here:
    Merge 2 pdf files into 1 ?: Apple Support Communities
    The movie is still available, watching it may help, it shows a method for adding all the pages from one PDF to another. The general idea of where to drag in the destination would still apply for adding just one page.
    Francine

  • How to insert a page within a document

    I need to insert an additional page within a document without reformatting my layout.
    How do I do that?
    --- So far "Insert" > "sections" > "text page or blank" puts the additional page at the end of the doument.
    Tips anyone?
    (Pages 09 version 4.3)

    Luanne,
    When you Insert a Section from the Add Section tool or the Insert Menu, the new section will be inserted directly after the current section, the section that the Insertion Cursor is in, or the Section Selected in the Thumbnails pane.
    You can't insert a new section in the middle of an existing section, so it goes at the end of a 1-section document, which is what I would guess you have, a 1-section document. What you probably should do is insert a Section Break at the point where yiu want to add a section or page. Or forget about adding a Section and just Insert a Page Break there.
    Jerry

  • Missing fonts warning when adding pages to a book

    I have a book with 13 documents added and 105 total pages. I have 10 master pages set up, and each time I add (or delete) pages to a document, I get warning: "The document <doc>.indd needs to be updated but has missing fonts. It may recompose with a default substitute font and result in inacurate page numbers. Do you want to continue updating numbering?"  If I click OK to continue updating the numbering, sometimes an extra page gets added somewhere else in the document. Preflight Book is not showing any errors and I also tried looking at the preflight panel in each of the 13 documents. Neither says anything about a missing font. How else can I find it? Thanks!

    It could be in overset text (though preflight should see that) or in a style not currently in use. Are you sure the priflight profile is looking for missing fonts, bucasue is really does sound like there is substitution ocurring. Also, have you looked in Type > Find Font.
    If none of that is fruitful, I'd try exporting each of the documents to .inx or .idml, then opening those and saving as new .indd docs. Add the new docs to a new book and see if you still get errors.

  • Zoom settings change when adding pages

    Hi
    When adding a page to a document with this code:
    app.activeDocument.pages.add(LocationOptions.AT_END);
    InDesign automatically reverts the zoom setting to FIT_TO_PAGE
    Is there a way to prevent this from happening?
    I would like that it should stay at whatever it was.
    Help will be much appreciated!
    Thanks,
    Davey

    Davey_Doo wrote:
    1) is there a difference between what I wrote "layoutWindows[0]" and what you wrote "windows[0]"?
    Yup, "layoutWindows" refer to just the layout windows -- the ones one is normally working in. The other kind is "storyWindows", which is what you get when you open a text in the "Story Editor". There are vast differences between the two, such as "zoom" (you cannot zoom in on the story editor window).
    Using "windows", without specifying the kind, you get a list containing both types; and using "windows[0]", you get the very first one, whether it is a story window or a layout window. Then, if it happens to be a story window, csm_phil's script will Crash & Burn because you cannot zoom in on a story window.
    Your version will work correctly, and just in case you might have a story editor window open, it's best to stick to "layoutWindows" if you want to change a layout window property.
    2) Although this does help, is there a way to prevent it from happening?
         The reason I ask is because in a script which adds many pages, (e.g., MultiPageImporter script), the script needs to do this after adding each page.
    No, you cannot prevent it in any way. It's just ID's default built-in behavior (although it seems strange that this only happens when using a script!).
    But I disagree with your assessment it needs to be done "after adding each page". ID does not store the zoom percentage for each separate page and so it is enough to read the current zoom, add as much pages as you like, then set the zoom.

  • Page side varies when adding pages

    Dear all,
    When i add pages in stacked document that will starts in left hand side as in the below screenshot
    it will change as right hand and new pages will inserted in left hand as below when added thru script
    of same spread but when do manually it ll insert correctly as below
    Please help me to do thru script as above.
    Thanks in advance,
    Sankar

    Shankar, activate the Pages window by press the F12 key.
    Activate the "Allow Document Pages to Shuffle"
    Activate the "Allow Selected Spread to Shuffle"
    As per the below screenshot. Hope it helps.

  • Is there a Special Character for the number of pages in a document?

    I'm creating a template (in cs6) for a series of documents of variable length, and each document needs to be numbered with the format, "page A of Z." I see the special character for inserting the current page number (A) and I'd like to have the number of pages in the document (Z) added automatically as well. Is there a wildcard, special character, or script that will accomplish this? I'd rather not have to enter the number of pages manually as the value will change as these go through the editing process; I'd prefer to have the numbers update automatically. Has anybody done this before?

    Your first suggestion is the only way to capture the last page of a book that's comprised of independent document files. The last page number text variable works only within a single document.
    Anyone who wants a last page in book text variable badly enough can post a feature request at Wishform.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices    
    Arïel wrote:
    Stop press!
    You can also, much more simply, create a new text variable. There is
    specifically one for "last page number". That's much simpler.
    Type>Text Variables>Define>New, and in the Type dropdown just select
    "last page number".
    ariel

Maybe you are looking for

  • VC Chart legend Display

    Hello Everybody, Here we are facing a problem in our Visual composer Dashboard. We have upgraded the patch level of EP server from SP10 to SP17 and BW patch level is SP19. We are using VC 7.0 with compiler Flex2. In our Dashboard we are displaying so

  • No sound incoming mail native app

    i don't get any sound alert when i get a new message using the mac mail app on my new macbook pro retina i get the notification bubble but no sound i have checked the sound settings on both OS preferences and mail app, everything is on but the sound

  • Droid X calendar after update

    After the recent software update my calendar entries synch and present two entries on the Droid while there is only one on the Google Calendar.

  • OBIEE 11g - Fusion Middle ware control and BI Publisher not launching

    Hello I have successfully installed OBIEE11G but the installation has not been stable. Sometimes I find all three components 1) web logic 2) fusion middle ware control and 3) bi publisher whereas most of time, only weblogic console is coming up. When

  • What does the number in parenthesis on a Tab represent?

    Using Firefox 24.0 on a desktop and laptop, when I open Facebook the Tab title shows the Facebook icon, the number seven in parenthesis (7), and the word Facebook. What does it mean?