[JS] [Win7] [CS5] Moving pages to another document

Hi guys,
I need to write a script for my company which merges 3 documents together by selecting the needed pages in two of three documents and moving them to the third document. Everything works fine and I am almost finished but I can't find a way to move pages between documents.
I also thought about just copying everything on the needed pages but this doesn't work because every document has different master pages which are needed.
Is somebody able to help me with the needed code to select some Pages and move them to the end of another document?
Any help would be greatly appreciated.
Statixx91

Statixx91 wrote:
Everything works fine and I am almost finished but I can't find a way to move pages between documents. I also thought about just copying everything on the needed pages but this doesn't work because every document has different master pages which are needed.
With no pages moved and no pageItems covered - where is the point which you called "almost finish"?
Example:
(with 2 documents opened - last opened index = 0)
var tarPage = app.documents[0].pages[0];
app.documents[1].pages[0].duplicate(LocationOptions.AFTER, tarPage);
It duplicates 1st page of 1st doc after 1st page od 2nd doc. Move() method work similar.
In case of masterPages you can move them as well but this is an open gate to another story, I am afraid.
Jarek

Similar Messages

  • 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

  • Hyperlink with an action 'Go to a page in another document' in IE browser.

    When the PDF Document is opened in IE, Clicking on a Hyperlink with an action 'Go to a page in another document' is not navigating to the proper destination page.
    This happens when the destination document is already opened in IE once and cached.

    Hi Vinayaka,
    I am unable to replicate this at my end. I am using Acrobat 11.0.10 on Windows 7 and IE11
    Below are the steps I followed :
    Create a link and select the "Custom link" option, click "Next",  select the "Options" tab, select "Go to page view", click the "Add: button, open the file to the page you want to link to, click the "Set link" button.
    Regards,
    Rave

  • Go to a page in another document

    How put i link to go to a page in another document on pdf?

    Create a link and select the "Custom link" option, click "Next",  select the "Options" tab, select "Go to page view", click the "Add: button, open the file to the page you want to link to, click the "Set link" button.

  • How can I add a link in a cell in pages to another document

    Hello I am new to this so be gentle with me
    Can anyone tell me if it is possible to add a link in a (table) cell in pages to another document on my Mac, so when I click on it, it will take me to the document
    Many Thanks
    Charles

    As far as I remember you couldn't do it in PAges 09 and Pages 5 has lost over 90 features that Pages 09 has so I would say no you can't. I can't test it right now. I had a quick look in the help (http://help.apple.com/pages/mac/5.0/?lang=en) and could find that you could link to another document from anywhere let alone a table cell.

  • 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

  • FW CS5: Copy Page from one document to another without changing layers

    Hi,
    how can I copy a Page from one document to another without changing the layers?
    Drag-and-drop isn´t possible and by Copy-Paste all elements are placed in the same layer.
    Greetings,
    toho

    Use File > Import.
    Open the File, then navigate to the page you want to import
    Be sure to select Insert after current page, or FW will just import the content into the current page itself.

  • 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 to copy a page to another document?

    In earlier versions of Acrobat Professional I could copy pages from one PDF to another simply by dragging over the thumbnail of the page to the other document's thumbnails.... Couldn't have been easier! I'm now using Acrobat 8 Professional and the thumbnails have been eliminated. An awkward floating panel called "Pages" performs some of the same functions, but it won't let me drag a thumbnail from the "Pages" panel to another document and Acrobat won't let me view two documents "Pages" windows at the same time.
    The "Help" function is rather helpless in solving this problem and I have studied the menus hoping to see a magic "copy page" command somewhere, but no.
    Adobe, if you are listening, why on earth wouild you change such a simple and wonderful function? And if you somehow made copying pages from one document to another easier, at least make it obvious as to how I would go about doing this!
    Any help would be appreciated!
    Thanks,
    -Mark

    I've discovered that when "Pages" is a free floating window there is no way to copy a page from one document to another using drag and drop. The solution is to select "Show Navigation Pane" and dock the "Pages" window in the pane. Only then did it let me see the pages from two documents at once and allow me to drag and drop pages from one document to another.
    Thanks!
    -Mark

  • Can no longer find "Go to a page in another document"

    please see attachment
    The screengrab is from an older version of Acrobat. I use the newest CC version.
    However, I can no longer find how to access "Go to another page in a document"
    under Execute menu items for button parameters.
    Have not used Acrobat since late January.
    maybe I forgot
    Thanks

    I get this.....

  • Why did Adobe remove link action "Go to a page in another document"???

    When linking documents, you used to be able to link to another document and tell Adobe which page to open on.  Example: I want to link document A to document B but I want document B to open on Page 2 instead of 1.  That option does not exists anymore under Actions, execute menu option.  It was very helpful and I would like it back.

    Yes but when I click Set Link it's only for the opened document. Not the document I need.  And when I try to edit the link, i only get option for name destination which doesn't work.  Below is what I am used to seeing which is not available anymore it appears:

  • How to Export Page to another document

    For example I've got document with 'n' pages, I need to save each page to different documents. <br />This my simple code for each page. <br /><br />UIDList pageList(pTargetList->GetDataBase());<br />     do<br />     {<br />          UIDRef docRef = pTargetList->GetRef(0);<br /><br />          <br />          InterfacePtr<IPageList> pgLst(docRef, UseDefaultIID());<br />          if(!pgLst) break;<br />          int32 pageCount = pgLst->GetPageCount();<br />          <br />          IDataBase* db = pTargetList->GetDataBase();<br />          if(db == nil) break;<br />          PMString origName = FileUtils::SysFileToPMString(m_FullPath);<br /><br />          int32 succededPages=0;//lets us to determine if at least one page is successfully done with export<br />          for (int32 i = 0; i < pageCount; i++)<br />          {<br />               bool pageExportStatus=false;<br />               do<br />               {<br />                    UIDRef pageUIDRef(db, pgLst->GetNthPageUID(i));<br />                    if (pageUIDRef == UIDRef::gNull) break;<br /><br />                    PMString filePath = origName;<br />                    if(this->AdjustExportFileName(pageUIDRef,i,pageCount>1,filePath)==k Failure) break;<br />          <br />                    DocumentHelper docHelp(filePath);<br />                    IDFile docPath(filePath);<br />                    /*What to add to save each page <br />                      by <br />                    */<br />                    //docHelp.SaveDocument(docPath);<br /><br />                    <br /><br />               }while(false);<br />          }<br />     }while(false);

    Thanks for kDuplicatePageCmdBoss ! And what about SaveAs, how to delete page.
    Sorry for newbie question, but I can't find the way how to delete page ):

  • Problems pasting pages from another document

    Hi guys,
    I used to copy pages from one ID document to another very easily before. I don't know why i cannot do it now.
    I have both InDesign CS 6 files. I open them both in two separated windows but when i select copy from page 3 (the short 6 pages News Section) to the end into the large Document number two (the whole magazine) there is a mix of blank pages, weird styles and two new sections that never appear before.
    Here is picture 1 (small document)
    http://postimg.org/image/5v2lswmnh/
    Here is picture 2
    http://postimg.org/image/vbbmjr7n5/966147d6/
    Could you help me out with that issue?
    Thanks and best,
    S

    Hi Peter,
    Thanks for the info!
    By the way, where do i select "View Pages and select either horizontal or vertical"? I just move the pages and i am searching for this menu but cannot find it.
    Here is the image:
    http://postimg.org/image/lim7qnosh/
    Cheers,
    S

  • How to "go to a page in another document" without closing currently open document?

    I've created a form that used a button to jump to another pdf document. This second document is included in the first document as an attachment so that the whole package can be sent to people as one document.
    It works well but the problem is that when the button is selected the document that is already open is closed (albeit with a save document prompt).
    There seems to be no way to keep the existing document open whilst the second document (the linked document) is opened.
    Is there a solution to this?

    Go to the button's Properties and edit the "Go to a page view" action
    you've created. Edit the "Open In" option and set it to "New Window".

  • Creating a print button to print a page from another document - is this possible?

    Hello,
    My company is designing an interactive pdf with indesign with some great navigation on a side-bar. We've made the dimensions of the navigation pages larger than 8.5 x 11. We are constructing a pdf portfolio that contains a printable version of this document and this interactive version. Would it be possible to have a print button in the interactive document that calls up the corresponding page in the printable document and send it to the printer?

    Flash Catalyst does not directly support printing. You are going to have to add that functionality via Flash Builder and writing ActionScripting. I have not worked with the printing capabilities in Flex, so there is not a lot I can offer past this in terms of advice.I would suggest browsing the Flex forums for some guidance on how to assemble your state for the printer.
    Good luck!
    Chris

Maybe you are looking for