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 :-)

Similar Messages

  • How to combine images from several different shoots into one

    Have LR 3.6 for Win xp.
    I have 4 differernt photo shoots that I want to combine into one big single catalogue.  I want to be able to rank and choose images from all 4 shoots at the same time so I can get the best ones identified.
    Each shoot is already in its separate catalogue but I cant figure out how to get all 4 shoots to show up at once so I can rank the best shots and maybe even make a collection of my best images from the 4 shoots.
    How might I do this??
    Thanks Suzzie

    My primary suggestion is that you watch the many videos by Julianne Kost provided in the Adobe site about organizing in the Library Module in LR 4, or read one of the many good LR books. If you want to venture on your own here's a very shorthand description of one of many ways to do what you want. Choose which Catalog you want to use. Open that Catalog and choose "Import from Another Catalog" under the File Menu in the Library Module. Select the images and import them to your chosen main catalog. Once all are in the same Catalog either Keyword all similar images you wish to compare, or make separate Collections of each one. Use the Compare function in the Library ("c" key) and eliminate the one you don't want. Unless you have one client viewing your images in LR and you don't want them to see that you have other images for other clients, I would suggest you use only a single catalog from here on out.

  • Is there a way to find and replace prices in an Indesign document from a CSV file?

    Is there a way to find and replace prices in an Indesign document from a CSV file. Currenty I have a catalog with codes and prices in tables. I need to find a way to look up the code (and new price) in the CSV file and overwrite the price in the current table with the new price. Does anyone know of a script to run this quickly?

    Hi,
    Try this
    1) with all the images showing, got to Find -> By caption or Note
    2) enter the caption you are looking for Image Description and click on OK
    It should display all the ones with that caption
    3) select a few images as a test
    4) go to Edit -> Add caption to selected items
    5) if you want to blank out the captions just check the box to replace the caption and click on ok
    6) You will need to confirm the blank captions
    You could use a similar procedure to change the caption to something else.
    Good luck
    Brian

  • Batch create PDF from multiple InDesign documents

    Is it possible to create PDF files from multiple InDesign documents, or is there perhaps a script that can do this?

    Thanks for this script, it works wonderful.
    It saved me a lot of time.

  • Combine content from selected aspx pages and Consolidate to pdf

    Hi All,
    I have a new requirement in one of the SharePoint portals :
    Contents are placed on ASPX pages using a content editor
    A feature to select pages and combine all the content from content editor of these pages into a pdf document
    Is there a way to access only
     the content stored in content editor and consolidate them in to one data source and then convert that in to a pdf file ?
    Thanks in Advance
    Pallavi

    Hi Pallavi,
    According to your description, my understanding is that you want to convert the content in content editor webpart to PDF file.
    I suggest you can use read content from content editor web part to a string variable using ContentEditorWebPart class.
    Here is a code demo about reading content using ContentEditorWebPart class:
    http://sharepoint.stackexchange.com/questions/87499/how-to-get-content-from-content-editor-webpart-cewp-to-a-custom-webpart-on-the
    ContentEditorWebPart.Content property:
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webpartpages.contenteditorwebpart.content(v=office.15).aspx
    Then you can generate PDF file with string variable. To create PDF file, you need to download PDFsharp library and reference the dll in your project.
    Here is a code demo about creating pdf file using C#:
    http://csharp.net-informations.com/file/create-pdf.htm
    Best Regards
    Zhengyu Guo
    TechNet Community Support

  • How to make an apk from an indesign document

    hello,
    I made a newspaper in indesign. And it works fully on the Ipad.
    now is my question if you can make an apk file from an indesign file so you can see my site on a android tablet.
    My android tablet doesn't have an android market so I can't download adobe content viewer.
    I hope you can help me.

    You need to use the Viewer Builder to build an app for iOS, Android, or QNX.

  • Why does InDesign crash when pasting from another InDesign document after upgrading to Mountain Lion?

    Model Name:          iMac
      Model Identifier:          iMac10,1
      Processor Name:          Intel Core 2 Duo
      Processor Speed:          3.06 GHz
      Number of Processors:          1
      Total Number of Cores:          2
      L2 Cache:          3 MB
      Memory:          12 GB
      Bus Speed:          1.07 GHz
      Boot ROM Version:          IM101.00CC.B00
      SMC Version (system):          1.52f9
    InDesign CS5 crashes when I paste text, a text frame or a graphic from another InDesign CS5 document. I upgraded from OSX 10.6.8 over the weekend.

    In-place upgrades are always a crapshoot. Try trashing the prefs (see Replace Your Preferences), but most likely you'll have to reinstall ID at the very least. YOu may have to do a clean install on the OS as well.

  • Loading content from multiple MiniDV tapes to one DVD

    I am being offered this "One Touch" feature on iDVD to copy my Camera footage to a DVD. I am wondering what the best process is to follow if I wanted to, say, merge :30 minutes of content from one MiniDV and :20 minutes of content from another. Should I be uploading to iMovie instead? If I have the ultimate objective of a. having copies on DVD instead of MiniDV and b. using the content for video editing in iMovie, what is the best process to follow?
    1. Move all MiniDV to DVD and then work from that?
    2. Import clips into iMovie and move them to iDVD?
    Tips, best practices, advice appreciated.

    Brian,
    It's pretty much agreed here that the best storage medium for your MiniDV tapes, is the tape itself.
    I tried OneStep once. Yuk. I bring everything into iMovie HD.
    1.: No.
    2.: Yes
    iDVD 5 Getting Started
    Apple's iMovie Learning Site
    Apple's iDVD Learning Site
    Ken Stone: Authoring in iDVD 5
    My favorite, by far:
    iMovie HD & iDVD 5: The Missing Manual
    iPhoto 5: The Missing Manual

  • Master/Detail? Repeating Tables - Combine data from 2 repeating tables to one cell in sharepoint

    Hi there, new to infopath.  I have 2 sections in my form which are hidden and display based on the department selected.  So Department A versus Department B, a section opens for details pertaining to that Department.  So in each
    section I have similar information requirements, similar but not exactly the same.  Now I was able to create hidden fields that will concat the values from both sections in the instances of similar data (i.e. Name, Department location, etc, so if Department
    A fills in Name on their section, then someone else submits the same form for Department B I still have one column of metadata in SP to displace the Name regardless of department or section they filled data into). However now I am stuck, I have repeating
    tables in both sections and I want to concate the entries to output to the sharepoint list for that cell.  However everything I have tried so far only concats the 1st value in the repeating table.  Is there a way to take ALL of the data from
    two repeating tables and merge them into one column/cell in sharepoint (metadata for the one form entry)???  I want to avoid having to create a excessive "views" of a list in order to accomodate the needs for BOTH departments.  I hope
    this is clear.  Thanks for your help!
    from msn forum

    Hi Meera,
        I apologise for delay. Anyways you can goto the
    following link:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/36f08758-0a01-0010-c291-c03004aeb1af
    for details.
    Hope this will clear you. However, you further require
    any more information then please feel free to mail.
    Note:
    ty_t_sender, cl_abap_char_utilities DEFINITION LOAD
    all these are present in alsmex function group if you
    place your function module in this function group then
    you'll be able to access these things. Further, like
    if you have security options and can't place your code
    in this function group then create your own function
    group in your own package and copy the contents from
    alsmex function group.
        Hope that answer your questions.
    Regards,
    Mirza Ifthekhar Baig.

  • When transfer content from current ipad to new one the apps didn't load

    when transfering data from existing ipad to new one using icloud,  the apps didn't download although the screen icons appear on the new ipad. how to fix?

    So images of the apps appear on your screen and you cannot open them?
    How did you transfer the data? Did you sync the content from itunes or restore the new ipad from the old ipad backup?
    The best way would be to backup the old one and restore the new one from that backup
    How to back up and restore (iCloud and iTunes)
    http://support.apple.com/kb/HT1766

  • Combining Items From Several DVDs Onto One DVD ?

    I know this is not an FCE query but neither is it an iDVD one !
    I have several DVDs with a few short FCE-created films on each of them.
    I now want to put some of those films onto one DVD.
    It could be done by copying the films back into FCE and then burning a DVD, but that would be time-consuming and would involve generational losses.
    Is there a quicker way ? ( I have Toast 8 and Final Cut Studio if there is anything there that could help).
    Ian.

    If the DVD has the space to hold the three movies then you can fit them on there. Combining DVD movies is not like adding tracks on a CD. DVDs have pretty strict rules about what goes where = authoring. You will need to reauthor the DVD, creating a new VIDEO_TS folder accommodating your three movies together so it will play on your television DVD player. This is not just putting all the files in one folder, but creating correct information files to go with the video. Even if you have a tool that will re-author for you it may not create menus, which makes navigating using your TV pretty cumbersome. Sizzle is a freeware tool that lets you create new menus, but it hasn't been upgraded in a while and is not the most intuitive. If you're happy with just the most basic of menus and working out problems with software then you can use it.
    So, simply copying the three sets of files onto a single DVD will not work in your video player, though you can play the files on your computer using a program like VLC.
    The other problem you may be encountering is blank media quality. If you are using the cheap DVDs sold in bulk in discount stores you may find your player won't be able to read them. I have put the same movie on cheap DVDs and high-quality ones. The player could not read the chap DVDs but had no problem with the identical files on a good quality DVD. RW media (be it DVD or CD) can often present even more of a problem in players than non-rewritable media, unless you player specifically states it can handle RW.

  • How do I export content from an InDesign file to a database?

    I have this project that I'm working on where I need to do the reverse thing of what people normally do it seems - I need to take content that's available in InDesign and export that to a database. From my research, I'm attempting to do this by tagging content in InDesign and doing an xml export. This seems to work well except the resulting content is cluttered up with some things which are automatically tagged (Tables and Cells) and more importantly the exported xml does not contain linebreaks. The former problem I can work around (I can just have the import script ignore table and cell tags) but the latter problem is a loss of information so there's no workaround. Any help is appreciated.

    Recover media from iPod
    See this post from forum regular Zevoneer for options on moving your iPod data back to your computer.
    tt2

  • Alternating pages from 2 indesign documents

    I have a set of chapters that are individual .indd files. I can put them into a book easily (and have - I use this book file).
    However, I have another set of chapters that are "companions" to the original chapters. I want combine the two files in such a way that the "real" chapter 1 page 1 faces "companion" chapter 1 page 1. There are some companion chapters that are longer than the original chapter which I would like to stay on the right side, facing a blank page if necessary.
    I know I can do this manually as PDFs, but I'd like to keep the "real" and "companion" chapters separate files so that if/when I update the "real" chapter, it updates within both book files (assuming doing what I would like is a function within creating another book).
    Also, a pipe dream, perhaps, but is there also a way to keep the page numbers? So in the merged book, both page 1s, say "1"; flip the page, both say "2", etc?
    Thanks in advance.

    You can place pages from the .indd files, too, not just PDF, and they behave as linked images. I just looked to see if Scott Zanelli's multipage importer script can handle the "one side of the spread only" for each doc, but it doesn't look like it will. Too bad, because it's a real time saver.

  • Not loading the Static content from the iPlanet document base

    Hi,
    I have configured I-planet and BEA 7.4 successfully. The document base for my
    iplanet has the pict directory.
    so when i try to access the pict directory from the browser say http://<>/pict/s.gif
    I get a Error 404--Not Found. I believe the web-server should serve my /pict directory
    by itself . Why is it that my requests are going to Web-logic..
    <Object name="hppreg" ppath="*/servlet/*">
    Service fn="wl_proxy" WebLogicHost="xxx.ffc.com" WebLogicPort="7001"
    </Object>
    I assume only the request with the /servlet should go to Web-logic.
    Any help is greatly appreciated
    Thanks,
    Nag

    The oracle driver library isn't on your classpath. It's normally called something like classes12.zip under the Oracle client installation directory.
    If you're working with Tomcat you need to copy the class library into common/lib and rename it to give it a .jar extension.

  • Combine iTunes from several computers(all macs) to make one full library???

    I have iTunes on our desktop and two laptops, and my iPod is synced to my personal laptop. All of the computers have the some of the same music, but each has additional music we have added over time. How do I load the music from both laptops to the desktop, so my husband and I can have one main library we can both connect our iPods to? Do I just connect each laptop to the iMac using a firewire? If I'm in target mode and drag the iTunes folder from the laptop to the desktop, does it replace the folder on the desktop? Thereby losing the desktop files not on the laptop? I just want to make sure that I don't lose any music in turn having to download or copy CDs over again.
    We want to save space on our laptops by removing the music files so I am also looking to "share" iTunes on each of our laptops sort of wirelessly from the main computer. We will only use the main computer from now on to add music to the library.
    If there are step-by-step instructions this would be fabulous because somehow even if i think I know what I am doing I always mess it up.

    Don't mess about with the iTunes Library folder - that way lies madness. Locate the files in the 'Music' display of iTunes, select them and drag them to a folder on your Desktop. Move them, over the network through file sharing, or using and external disk or USB stick, to the Mac(s) you want the songs to appear on. Select all the songs and drag them into the iTunes list. They will be indexed and show properly. Repeat as necessary with other computers.
    iTunes offer s 'Home Sharing' facility: I've not tried it - please see this Apple Tech Note and see if it suits you:
    http://support.apple.com/kb/ht3819

Maybe you are looking for