[AS] Duplicate page to other document

I need to duplicate a page from one document into another (Applescript, CS5). I can do it, but the new page always is placed next to the last page, attached on the same spread (like a gatefold). But I don't want it to be attached like that, it would be easier if it could create a new spread on its own (which is the way it seems to work when done by hand). Using "after spread -1" doesn't do anything different than "after page -1".
duplicate every page of otherDoc to after page -1 of doc1

From one doc of single page spreads to another…
tell application "Adobe InDesign CS5"
     set docA to the active document
     set docB to the last document
     -- To end of single page spreads
     duplicate last page of docA to ¬
     after last page of docB
end tell
From a single page doc to one with spreads left page…
tell application "Adobe InDesign CS5"
     set docA to the active document
     set docB to the last document
     -- To first page of new spread
     duplicate last page of docA to beginning of ¬
     (make new spread at end of docB)
end tell
From a single page doc to one with spreads right page…
tell application "Adobe InDesign CS5"
     set docA to the active document
     set docB to the last document
     -- To last page of new spread
     duplicate last page of docA to end of ¬
     (make new spread at end of docB)
end tell
Oh I see you mention every…
tell application "Adobe InDesign CS5"
     set docA to the active document
     set docB to the last document
     -- All spreads to end
     duplicate every spread of docA to ¬
     after last spread of docB
end tell

Similar Messages

  • Reach a page of other document

    Hello,
    I have a problem with the link on a PDF file.
    I like to put a link for "fichier1.pdf" to the page n of "fichier2.pdf"
    but my link to the first page of file2.
    What should I add my code to work properly (something AVPageView surely be how to define it)?
    Thank you
    Here is my code:
    ASAtom pathType = ASAtomFromString("Cstring");ASFileSys fileSys = ASGetDefaultFileSysForPath(pathType,
    "C:/fichier2.pdf");ASPathName pathLaunchFile = ASFileSysCreatePathName(fileSys,pathType,
    "C:/fichier2.pdf", NULL);PDFileSpec laFile = PDFileSpecNewFromASPath(myPDDocc,fileSys,pathLaunchFile,NULL);
    PDAction linkAction;
    AVDoc newDoc = AVDocOpenFromFile (pathLaunchFile, fileSys, NULL);
    PDDoc newPDDocc = AVDocGetPDDoc(newDoc);
    AVPageView pageView = AVDocGetPageView(DocCourant);
    AVPageView myPageView = AVDocGetPageView(newDoc);
    AVPageViewGoTo(myPageView,pNum);
    PDViewDestination pdvDes = AVPageViewToViewDest(myPageView,ASAtomFromString(
    "XYZ"),newPDDocc);
    linkAction = PDActionNewFromDest(newPDDocc,pdvDes,myPDDocc);PDLinkAnnotSetAction(annot,linkAction);

    Variables are defined higher in the code.
    Here is a more complete extract of the code.
    //Create a HiliteEntry object and set its attributes
      HiliteEntry hilite;
      hilite.offset = position;
      hilite.length = nbreMot;
      //memorise le numero de la page courante
      AVPageView currentPageView = AVDocGetPageView(currentAVDoc);
      ASInt32 pageNum = AVPageViewGetPageNum(currentPageView);
      page = PDDocAcquirePage(currentPDDoc, pgNum);
      PDTextSelect textSelection = PDTextSelectCreateWordHilite(page,&hilite, 1);
      AVDocSetSelection(currentAVDoc, ASAtomFromString("Text"),(void *)textSelection, true);
      AVDocShowSelection (currentAVDoc);
      PDTextSelect ts = (PDTextSelect) AVDocGetSelection(currentAVDoc);
      PDTextSelectGetBoundingRect(ts, &fr);
      annot = PDPageCreateAnnot (page, ASAtomFromString("Link"),(const ASFixedRect *) &fr);
      /* on ajoute le lien à la page */
      PDPageAddAnnot(page,-2, annot);
      char foliodest[32];
      ASInt32 destination = 0;
      if ( ((pageDest+1) >= posRomain) && ((pageDest+1) <= posFinRomain))
       destination = pageDest  - (posRomain - prePosRomain) + 1;
      else
       destination = pageDest - (posArabe - prePosArabe) + 1;
      sprintf(foliodest,"%d",destination);
      ASInt32 pNum = pageDest;
      PDLinkAnnotBorder linkBorder;
      strcpy(ligneBuffer," ");
       AVDoc DocCourant = AVAppGetActiveDoc();
       PDDoc myPDDocc = AVDocGetPDDoc(DocCourant);
       char pdfPathChar[1024];
       ASFile asFile = PDDocGetFile (currentPDDoc);
       ASPathName pdfpath = ASFileAcquirePathName (asFile);
       char keys[] = "1234567890";
       sprintf(pdfPathChar,"%s",pdfpath);
       int posEan;
       posEan = strcspn (pdfPathChar,keys);
       strncpy (pdfPathChar,pdfPathChar,posEan);
       pdfPathChar[posEan]='\0';
       creerFichierLogLien(pdfPathChar);
       char pathFichier2[1024];
       strcpy(pathFichier2,pdfPathChar);
       strcat(pathFichier2,"fichier2.pdf");
       ASAtom pathType = ASAtomFromString("Cstring");
       ASFileSys fileSys = ASGetDefaultFileSysForPath(pathType,pathFichier2);
       ASPathName pathLaunchFile = ASFileSysCreatePathName(fileSys,pathType,pathFichier2, NULL);
       PDFileSpec laFile = PDFileSpecNewFromASPath(myPDDocc,fileSys,pathLaunchFile,NULL);
       PDAction linkAction;
       AVDoc newDoc = AVDocOpenFromFile (pathLaunchFile, fileSys, NULL);
       PDDoc newPDDocc = AVDocGetPDDoc(newDoc);
       AVPageView pageView = AVDocGetPageView(DocCourant);
       AVPageView myPageView = AVDocGetPageView(newDoc);
       AVPageViewGoTo(myPageView,pNum);
       PDViewDestination pdvDes = AVPageViewToViewDest(myPageView,ASAtomFromString("XYZ"),newPDDocc);
       AVPageViewUseThisDestination(myPageView, pdvDes, fixedZero);
       linkAction = PDActionNewFromFileSpec(myPDDocc,ASAtomFromString("Launch"),laFile);
       PDLinkAnnotSetAction(annot,linkAction); 

  • Open to the first page in a document

    Adobe Acrobat, reader and creator, both default to open a multiple page document, showing the page that was highlighted at the time that the document was saved. As a result, the next document viewer will see a page somewhere in the middle of the document when first opening that document. If that next viewer is not aware of where this page is in relation to the rest of the document he will not scroll up to the top to view the document from the first page. We have this happening on a regular basis with users who are not aware of the page thumbnails view option. Is there a way to set Acrobat (reader and creator) to default to always open to the first page in a document regardless of what page it was on at time the document was saved?

    For Acrobat X I went to Tools - Pages - and the delete choice was grayed out.  I thought I could get the same result by using the Print to Adobe PDF command.  From any other application I can print to Adobe PDF, just not in Acrobat.  Does Acrobat X not let you do this, or is it just on mine?  And if it is only on mine, what do I do to fix it?  By the way, I am able to delete pages from other documents, just not the particular document I am currently working with.
    Any other suggestions anyone?

  • Duplicate a Text Field on Every Page of a Document?

    Today I wrote my first vb.net/adobe app.  I managed to open the pdf doc in adobe and create a named text field.  I managed to insert a java script that gets the current date when the document is open and updates the text field.  I would like to duplicate the text field on all pages of the document.  Manually, I can right click on a text field and select duplicate.  I don't see a property or method that allows me to program this.  The field property "page" appears to be read only.  any help would be appreciated.  thanks.
    page
    The page number or an array of page numbers of a field. If the field has only one appearance in the document, the page property returns an integer representing the 0-based page number of the page on which the field appears. If the field has multiple appearances, it returns an array of integers, each member of which is a 0-based page number of an appearance of the field. The order in which the page numbers appear in the array is determined by the order in which the individual widgets of this field were created (and is unaffected by tab-order). If an appearance of the field is on a hidden template page, page returns a value of -1 for that appearance.
    TypeInteger | ArrayAccessRFieldsallExample 1Determine whether a particular field appears on one page, or more than one page.var f = this.getField("myField");
    if (typeof f.page == "number")
    console.println("This field only occurs once on page " + f.page);
    else
    console.println("This field occurs " + f.page.length + " times);

    I also tried the brute force method of moving from page to page and creating a text field on each page.   I used pageNum to changes the page, but, adobe didn't seem to recognize that.  I saw the page change on the screen, but, all of the textfields were created on the first page!

  • Pages will no longer let me open files that I have previously downloaded, worked on and then saved on my mac. However it will let me open pages documents that I have started from new. I need the other documents to open and can't figure it out. PLEASE

    Pages will no longer let me open files that I have previously downloaded, worked on and then saved on my mac. However it will let me open pages documents that I have started from new. I need the other documents to open and can't figure it out. PLEASE

    I just got my mac a month ago so go easy on me but I was just working with the pages that was already on it, and then today I know it updated, and now I am unable to open a lot of my documents!:(  Idk what you mean by the icloud version lol sorry! As for the version, when I open pages from my apps and click 'about' it says version 5.1? And when I open the document it just goes grey and kind of blinks and doesnt open? No error message or any indication of why it will not open now when I for sure have opened it in the past! Andddd for the OS X I think it is 10.9.1 ??

  • Pages 5.2 opens all kinds of other document formats (even old .doc  Versions), but cannot open Pages 08 etc. of its own kind? I have to use NeoOffice to open my documents of many years of work. Is there an option to organize a corporate com

    Pages 5.2 opens all kinds of other document formats (even old .doc  Versions), but cannot open Pages 08 etc. of its own kind?
    I have to use NeoOffice to open my documents of many years of work.
    Is there an option to organize a corporate complain to Apple to be heard?

    We have been doing nothing but for 10 months.
    Here is the response:

  • How can I attach j-pegs and other documents to an email unopened and stop each them taking up a whole page of my email ?

    How can I attach j-pegs and other documents to an email unopened and stop each them taking up a whole page of my email ?

    In addition to the last poster's suggestion  -  just so you know, it also depends on the email program the recipient uses as to how they will see any attachments - for instance, when I am using my Yahoo Mail, I am absolutely unable to view any attachment within the browser window - Yahoo forces me to download it; there is no way for me to check it (like a preview) to see if I want to download it or not.
    And, FWIW: the window shown in the screenshot does not show on my version of Mail 5.1 (which is the latest for 10.7.2); the only one similar shows when viewing a message received with an attachment, not while sending one. So that must be a different version.

  • How do I get headers to reproduce on other pages in the document?

    I've spent about 30 minutes on this problem and I'm running out of time. I opened my newsletter project in new Pages and things are not as they should be in the template. I'll leave the griping to other people. They're doing a great job expressing my frustration. I just want to know how to fix this simple problem:
    The header info on Page 1 is no longer showing up on Page 2. There is Lorem Ipsum style text there now. And the date is wrong. Same issue with the footers. The hole point of having headers and footers for me is to edit copy in one place that propogates through the entire document. I suspect the new ability to spawn new headers & footers per page is the culprit. A drop down on the Page 1 header reads "Editing header for pages 1-2", but this isn't so. Page 2 clearly has a separate header. No changes to Page 1 are reflected in Page 2. I'm stumped. Anybody know how to tell Pages to fix this? I've even tried deleting the Page 2 header, but still can't find a way to get the Page 1 header to reproduce there.

    I've got a similar problem but somewhat backwards to yours.
    I have a new MacBook Pro 15 Retina, running Yosemite.  I am using Pages to rewrite my resume from scratch, based on past versions and notes.
    I worked two hours on the page header for page one.  When I started working on the page one header there were three pages in the document, each put there because I inserted a page break.  I also made sure that the document inspector had Hide First Page and Match Previous Section were NOT selected.
    Much to my surprise when I finished working on the header on page one, the same header was on page two.  I started to change the header on page two, but found it was changing the first page header.
    Going back and forth for a couple of hours I now have the page one header ok by itself.  Except . . . when I clicked in the page one header a pop up bubble appeared with the message: "Editing header for pages 1 - 2."
    The only thing I can think of is that the header I composed is fairly complex.  It has a mixture of fonts, sizes, and colors.  Outside of the header box I made a horizontal line, 1 pt. in size, with a grey color.  I moved the line into the area with the header box and the result is great.  Except that is not the header I want for page two.
    I would sincerely appreciate any suggestions based upon practical experience that has worked.  Please, you are kind, but no guesses.

  • Hyperlinks to other documents in Pages  ?

    Even in such a miserable tool as Ms word, it is possible (though unreliable) to set a hyperllink from a document so as to open a different document which is not a webpage, e.g. a pdf. As far as I can see this was not possible in the previous Pages. Does anyone know if this is possible with the new Pages ?

    Although Pages ’09 v4.3 allowed linking to other Pages documents, this feature is not implemented in Pages v5.2.2. This is a new application rewrite of Pages that Apple has omitted nearly 110 features/functionality found in Pages ’09. If you need to link to other documents, then Pages v5.2.2 is not the application of choice.

  • Can I convert PDF documents to Pages or other formats?

    Can a PDF Document be converted to pages or other format like RTF, Text, ETC.

    Have you tried the File ➙ Export To menu in Pages for some format options?

  • Linking other documents into Pages

    Hello. This is my first post and I'm a recent convert from a PC. I've scoured this forum for an answer and played for ages myself and not been able to sort out my problem - so I apologise in advance if its been answered a hundred times before!
    I am preparing a report in Pages and I would like to include links within in it to select other objects, such as pdf files, presentations etc. I don't want these open all the time, just if the reader wants to access the info. I see how you can put in a link to call out another Pages report, but not say a pdf file. I have tried dragging and dropping a pdf from Finder, but it opens it out and I just want a little icon that the reader can select.
    Any suggestions? Thanks. Katarine

    Hi Katarine
    Welcome to the forum.
    Pages lets you link to other Pages documents, but not particular pages within those documents, bookmarks within the same document, and weblinks.
    So the limitation will be yes you can link to .pdf files but they will need to be have an url and be on an accessible website.
    As Yvan said you can ask Apple to make this more flexible:
    +Menu > Pages > Provide Pages Feedback+
    Peter

  • How can I remove the page number from the first page of the document that is the cover page?

    How can I remove the page number from the first page of the document that is the cover page?

    If you open the Pages panel, (Window>Pages) you will see thumbnails of your master pages and your document pages. In new documents, there is usually a master called A-Master and one called None. If you drag the thumbnail of the None master onto the thumbnail of a document page, it will apply that master to that page. Presumably, you have made your page numbers on A-Master, so this will usually do the trick. If you have elements on A-Master that you need on the first page, but just not the page number, you can duplicate A-Master (which, by default will give you B-Master, but you can change the names if you like) and remove the page number on the duplicate and apply that to the document page.
    It might also be worth noting that you can apply master pages in the fly-out of the Pages panel. Go to the fly-out triangle and go down to Apply Master to Pages…, then select a master to apply and the range of pages (1-8 will give you all 8, 1, 3, 5, 7 will be the odds, 1-3, 4, 6-8 if you want continuous ranges and individual pages).

  • Why is Enable Usage Rights creating Duplicate Pages?

    I have created a dynamic PDF form in LiveCycle Designer ES 8.2.  The form is formatted correctly and has no duplicate pages when examining the not-enabled form in Adobe Acrobat Pro 9.  However, when I attempt to Enable Usage Rights so that external users can download the form and fill in the fields, the ENABLED version has duplicate pages.  I do not understand why because the original document does not have these duplicates - they only appear when I Enable the Usage Rights.  I cannot delete these duplicate pages in the Enabled version.  Please help!

    hello, these are the files where firefox stores its cache - you won't need ccleaner (in fact it will only slow things down as you've already noticed, since those files have to be recreated after the next start of the browser), you can also clear the cache with the built-in mechanism in firefox: [[How to clear the Firefox cache]]

  • Exporting PDF generating duplicate pages

    Post Author: raja6791
    CA Forum: General
    Hi,
    I have a crystal report which includes 4 sub reports. The report contains 9 pages. Which is exported to PDF.
    It is working fine till last week.  Now  it is generating around 60 duplicate pages of same content.I am using ASP.NET 1.1 & Crystal Reports 11. Please help me.
    Thanks,Rajasekhar

    I swear, if someone doesn't come up with a solution to this problem, I'm gonna hurl! HA!
    I'm having the *exact* same problem as you, and have been searching for over a day for a resolution - nothing!! Not only is all my text jagged (as you illustrated here), my images are as well, and any other "effects". This is ridiculous!
    I just recently switched from a Macbook Pro running Snow Leopard, to a new shiny iMac running Mountain Lion. This is when all my problems started... Same Acrobat version, same Pages version.
    I've tried Export as PDF, Print to PDF, open them in Preview THEN export as PDF? Open the saved PDF into Illustrator, then re-save as PDF? Nothing fixes it. So I went back to my Macbook Pro, did everything the same (with the SAME document), and it works great. So I can only preclude that it's an issue with Mountain Lion.
    I'm panicking here because I have sooooo.... many documents that I've done previously, that I will no doubt need to re-open and edit, then re-save as PDF moving forward. So what am I supposed to do to fix this?
    HELP, someone!!!!!   ytimon001: were you able to find resolution on this at all?

  • Printing duplicate pages

    I am encountering duplicate printing using my MacBook Pro to print to a Kyocera 2550ci Multi-function color printer.  This is in an office environment.  Irrespective of the application I use, I get 7 copies of each page of each document I print.  This doesn't happen with other printers, and it doesn't happen on this printer with other mac users (or PC users) on this same printer.  If I ctch the print job in the print queue on the printer's configuration screen, I can see that 7 copies are to be printed, and I can reduce the number of copies manually at the printer if I catch the job in time.
    Here are the steps I've taken so far.
    1. deleted and reinstalled the printer.
    2. deleted all other printers and reinstalled the printer.
    3. Reset the printing system.
    4. Deleted the printer, the printer driver and reinstalled both.
    I'm stumped as to what's going on here.  There must be some configuration file I can't identify that's causing this, but I can't identify it.  Any ideas on how to eliminate this? My only other way of printing is on another printer (same model) that is upstairs.
    15" Macbook Pro late 2013
    2.3 GHz Core i7, 16GB RAM
    OSX 10.9.2

    Thanks, Timothy.  I did as you suggest, deleted all of the print.plist files, then deleted and reinstalled the printer. but still get the same result:  7 copies of any document I try to print.
    Any more ideas?

Maybe you are looking for

  • Can't install catalyst on windows 7 64 bit

    Hi, I'm a newbie to adobe and just got production suite which has catalyst, I had to upgrade from xp to windows 7 64 bit which was A clean Install so lost everything. I have issues with catalyst not installing at all with it saying there are errors,

  • How to display page numbers in report

    hi all, i would like to know how to display page numbers in this format " 1 of 5" in the report. Any help would be much appreciated. thanks seema

  • Installing windows 7/64 bit

    Hello please can you help me I have purchased a HP envy 17-J141NA notebook PC on the understanding from a person from HP that I can install windows 7 / 64 bit on this computer. I have removed the hard drive from the computer and installed a new drive

  • CP 5 Project templates wrong after upgrade to CP 5.5

    Hi, I just upgraded my CP 5 to CP 5.5 and discovered that all my project templates are NOK anymore This is what I see: All Placeholders no matter which one have an angle of -1 in CP 5.5. I opened the templates in CP 5 and they are still OK. Reopen in

  • How can I get a list of songs I have bought?

    I had to replace my hard drive so I lost everything in my iTunes. Most of the songs I have on CDs, but not any that I bought through iTunes. How can I recover these. I am pretty sure that if I download the same ones they will be free.