[JS CS3] Moving pages from one doc to another

I'm having trouble understanding the pages.move method, when used to move pages from one file to another. With one ID file open, I want to create another file, and then move pages from the first file to the second. At this point, the new, second file is untitled. Must I save it first? Here is what I have so far...
var oldDocument = app.activeDocument;
var newDocument = app.documents.add();
// Move pages
oldDocument.pages.itemByRange(0,1).move(LocationOptions.after,newDocument.pages[-1]);
I'm having trouble figuring out how to reference both documents properly.

Dave, that was it! I didn't realize that the Move method actually "moved" the pages. I assumed it copied the pages, similar to the move pages dialog without the "delete pages after moving" option checked. But I see now that what I really want to use is the "duplicate" method, which will allow me to copy the page from a one-page document into another document. Thanks!

Similar Messages

  • 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

  • Moving pages from one project to another??

    I only keep one website per iWeb project. How could I copy a couple of pages from one iWeb project and move them to another.
    Given I can only have one iWeb project open at a time.
    Is such a thing possible?
    Ben

    you can use iWebSites: http://mistergregg.com/cocoadrillosoftware/iWebSites/
    to merge the two projects then drag the wanted pages from one site to the other site.
    be sure to make back up of your domain.sites2 packages before the merging procedure.
    however, if those pages happen to be blog entries or podcast entries then you are pretty much out of luck because there is no simple way to merge them.

  • Alternate layout created when moving pages from one  document to another

    I'm using CC on Windows 7 -  I have 2 documents  that I want  to merge and make into 1 [I know people will want to know why I would want to do this -  each document is  the result of a different data merge - data merge can only handle one master page - so I have  2  datamerges - 2 files - and just need to  merge the 2 files]
    This used to work beautifully in  ID 5.5 - now when I   use the pages panel to move the pages to  the other document - it creates an alternate layout - it is then very difficult for me to  interlace alternating  pages - - I use dot be able to just move the pages into place - but with eh 2 layouts it is behaving differently and in a way I do not understand. Is there any way I can get around this? or avoid the alternate layout and just have one. The 2 page sizes are identical so it is not a problem of  varying size - the paragraph styles are all the same as well. I have tried to delete the alternating style but it  will delete all the pages as well.
    Thanks

    Maybe its time for me to Replace my Preferences, because I also have 8.0.2, and I tried the same thing with two new documents based on the same preset - it still made an alternate layout. When the moved page is placed in the middle of several pages (say - after page 2, of 6 pages) all the pages after the inserted one become part of the new alternate layout. In this example, I had a six-page document, and moved one page of the other identical document to After Page 3 Here's the result

  • How do I maintain spreads after moving pages from one file to another?

    I'm consolidating several book chapters into one Indesign file, by way of clicking on the thumbnails on the Pages panel and selecting 'Move Pages...' from the contextual menu.
    The problem I'm having is that I can't maintain the page flow between chapters on the destination file, resulting in a broken spread between chapters when exporting to PDF. Here's a screenshot to better illustrate the problem, here seen in between pages 18-19:
    I've tried turning on and off the following options on both the source and destination documents but nothing changes:
    - Allow Selected Spread To Shuffle
    - Allow Document Pages To Shuffle
    I've also removed all the sections from the destination document (as you can see on the screenshot, page 19 does not have the little black arrow which denotes a new section), with no luck either.
    I also tried dragging the thumbnails manually but to no avail; I just can't figure out how to keep the page spreads between chapters together.
    Can anyone help me with this?
    Thanks in advance 
    Mariano

    Thank you so much for your reply Peter
    I have no idea what those brackets meant, I've followed your recommendation and my problem is fixed now.
    Kind regards
    Mariano

  • Indesign CS5 crashing public.dll when copying pages from one document to another

    Hello,
    I have several Lenovo W520 (Core i7-2720, 8GB ram, Quadro 1000M) and a couple Dell M6500 (Core i7, 4GB ram, Quadro FX 2800M) all running Windows 7 Pro x64, the latest video drivers and Adobe CS5, including Indesign 7.0.4.  We have several different Indesign docs that for the purpose of interactive Table of Contents, are copying pages from one to another to end up with one master document.  On the majority of the documents, copying as few as one page to another doc crashes Indesign with the windows system error below. 
    Faulting application name: InDesign.exe, version: 7.0.4.553, time stamp: 0x4d890440
    Faulting module name: Public.dll, version: 7.0.4.553, time stamp: 0x4d8903ca
    Exception code: 0xc0000005
    Fault offset: 0x00038727
    Faulting process id: 0x18c0
    Faulting application start time: 0x01ce1f68465d45de
    Faulting application path: C:\Program Files (x86)\Adobe\Adobe InDesign CS5\InDesign.exe
    Faulting module path: C:\Program Files (x86)\Adobe\Adobe InDesign CS5\Public.dll
    Report Id: fa196aee-8b5b-11e2-9afa-a088b43f1cec
    We have tried working with the documents on different machines (both specs outlined above), and copying different pages from one doc to another in varying quantities.  The documents do not have any link errors or other references that need to be corrected. 
    Any suggestions or other things to look at?
    Thanks.

    HI. Same problem Here. i will now trying to reinstall the software. hopefully it will help me.
    What could be the cause of this error? its not in english sorry for that.
    Název protokolu:Application
    Zdroj:         Application Error
    Datum:         22.4.2013 14:09:32
    ID události:   1000
    Kategorie úlohy:(100)
    Úroveň:        Chyba
    Klíčová slova: Klasické nastavení
    Uživatel:      Není k dispozici
    Počítač:       NB-CZ-1209.cz.corp.mann-hummel.com
    Popis:
    Název chybující aplikace: InDesign.exe, verze: 7.5.3.333, časové razítko: 0x4f6b9e72
    Název chybujícího modulu: Public.dll, verze: 7.5.3.333, časové razítko: 0x4f6b9c77
    Kód výjimky: 0xc0000005
    Posun chyby: 0x000df832
    ID chybujícího procesu: 0xad4
    Čas spuštění chybující aplikace: 0x01ce3f522c7f2f21
    Cesta k chybující aplikaci: C:\Program Files\Adobe\Adobe InDesign CS5.5\InDesign.exe
    Cesta k chybujícímu modulu: C:\Program Files\Adobe\Adobe InDesign CS5.5\Public.dll
    ID zprávy: 7d476cca-ab45-11e2-b201-009c02185dea
    Kód XML události:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Application Error" />
        <EventID Qualifiers="0">1000</EventID>
        <Level>2</Level>
        <Task>100</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2013-04-22T12:09:32.000000000Z" />
        <EventRecordID>12469</EventRecordID>
        <Channel>Application</Channel>
        <Computer>NB-CZ-1209.cz.corp.mann-hummel.com</Computer>
        <Security />
      </System>
      <EventData>
        <Data>InDesign.exe</Data>
        <Data>7.5.3.333</Data>
        <Data>4f6b9e72</Data>
        <Data>Public.dll</Data>
        <Data>7.5.3.333</Data>
        <Data>4f6b9c77</Data>
        <Data>c0000005</Data>
        <Data>000df832</Data>
        <Data>ad4</Data>
        <Data>01ce3f522c7f2f21</Data>
        <Data>C:\Program Files\Adobe\Adobe InDesign CS5.5\InDesign.exe</Data>
        <Data>C:\Program Files\Adobe\Adobe InDesign CS5.5\Public.dll</Data>
        <Data>7d476cca-ab45-11e2-b201-009c02185dea</Data>
      </EventData>
    </Event>

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

  • When moving a page from one pdf to another I see a message "consolidating fonts" and the added page does not view properly

    I am working with multiple PDF files in Acrobat Pro XI.  Sometimes when I move a page from one PDF to another it does not view properly.  It was fine in the source PDF, but not when moved to the desired PDF.  I also see a message momentarily across the bottom of my screen that says "consolidating fonts".  What must I do to fix this?

    Lloyd ,
    Follow these steps for Acrobat 11 .
    Launch Acrobat>Tools>Print Production>Acrobat Distiller
    Now in Acrobat Distiller follow these.
    Select Standard in Default settings. 
    Go to Settings and select Edit Adobe PDF Settings. 
    Select Fonts and in the font source window select the fonts you want to Add. 
    Click Save As and then OK.
    See if this helps.
    Regards
    Sukrit Dhingra

  • Moving pages from one iphoto book to another iphoto book

    I have hit the 100 page maximum in a book I am making of recent travels. I'd like to copy and paste pages from this book into a new book so that I have volumes I and II. Is there a way to move pages from one book to another without simply re-creating them? Thanks!

    Only thing I can think of is you can duplicate the whole book and then delete the pages you don't want from the new book. I'm pretty sure there's no way to copy pages from one book to another existing book.

  • Export and Import a page from one application to another within same WKSPCE

    Hello,
    Can anyone help me out in moving a page from one application to another within the space workspace. I tried to export it and then import the page, but I am not able to do that. I think the problem is with the application IDs.
    Plz help me out with this issue.
    Thanks,
    Orton

    Hi Orton,
    moving a page from one application to another within the space workspace
    This U can get it, through copying the page from one application to another application within the same workspace
    In the top of the page, you have "copy" option.
    regards,
    Kavitha

  • Copying iweb pages from one computer to another

    I have iweb pages operational on a G5.
    I want to transfer them to iweb on my macbook instead.
    I don't want to re-create them from scratch.
    I have a .mac account.
    Both iweb programs are the same version.
    This is a mac! There must be an easy way to copy the web pages from one computer to another!
    I explored the domain file route, copied the file from my G5 to the macbook, and did not get the pages I wanted. Instead I got the start page template. My information was not there.
    Any help out there?

    All your information is in a single file called "domain"
    By default it should be located in your
    user/library/application support/iWeb/ folder.
    Find it, copy it, and move it to the new computer.
    The first time you use it on the new computer double click the newly moved "domain" file to start up the iWeb application. Once you do that iWeb will remember that that is the file to open on start-up.
    I use multiple computers to edit iWeb and to avoid confusion as to which "domain" file is the most recent, I just keep it on a flash drive. Be sure to keep "domain" backed up safely on your computers and off (CD disks, external hard drives, etc) because if you lose that one file, you've lost all your work. iWeb cannot edit published pages.
    The reason you got blank pages is that you have to double click on the newly moved "domain" file to start up iWeb. Otherwise iWeb will start from the blank "domain" file that is already on the computer. You can have many "domain" files on the computer, If you start the iWeb application by clicking the iWeb icon, it will open the last "domain" file edited on that computer, which isn't the one you just moved. There is no other way to access your work.
    Good luck, David
    ibook & imac   Mac OS X (10.4.8)  

  • Cannot move the pages from one document to another

    Hi,
    I cannot move the pages from one document to another, abobe gets crashed. I am not sure but I think this was happening when I try to copy or move the threaded content. How to resolve this, this is happening in both CS4 and CS5. Can anyone help me?

    Thanks for ur reply.
    1. Open two documents, for ex doc1 and doc2, doc1 contais 4 pages, doc2 contains 2 pages
    2. Using Move Pages from the Pages panel menu in doc1, moving 1st two pages to doc2
    Move Pages  : 1-2
    Destination   : After page 1
    Move to        : doc2
    Actually I was not able to copy the textframe which is linked with another, immediately it crashes.

  • Error while copying a page from one application to another application

    Hi All
    I am using Oracle Apex 4.0
    I getting the error ORA-06502 Pl/Sql Numeric error character string buffer too small when i copying a page from one application to another application.
    Thanks & Regards
    Srikkanth.M

    I'm having the same issue. How did you solve this?

  • How can I copy a page from one wiki to another?

    Using the Wiki function in OSX server, I am able to move a page from one wiki to another by clicking the gear icon. Is there a way to copy the page to another wiki while leaving it intact in its existing wiki? I have tried to copy/paste while editing a page, however much of the formatting does not properly migrated to the pasted content.

    What you are looking for is how to "duplicate" ca page.

  • How can I script moving paths from one file to another?

    Hello. I have 1 image with various color correction layers. The other is the exact same size but only contains paths. How can I script moving paths from one file to another? Thanks, in advance, for any help you can offer. Thanks!

    Thanks! This one actually worked for me. Thanks for your help.
    http://forums.adobe.com/message/3305389#3305389

Maybe you are looking for