Skip to main content
Participating Frequently
June 12, 2012
Question

Data Merge in newest version of InDesign

  • June 12, 2012
  • 6 replies
  • 21442 views

Hi all,

Was wondering if anyone can point me to the improvments to Data Merge in the newest version of InDesign (assuming there are some). We are specifically looking for a way to output single PDFs (500 page Data Merged InDesign Document saves as 500 PDF files for example) and each PDF being named using a column from the attached Excel file. I realise that it will be possible to have the javascripted, but was kind of hoping to avoid this with the newest InDesgn.

Thanks,

Graham

    This topic has been closed for replies.

    6 replies

    Nick Goodenough
    Participant
    February 11, 2019

    Years later… but for anyone using the revised script I have a fix if you're getting the error:

    RaiseError: The file may be read-only, or another user may have it open. Please save the document with a different name or in a different folder.

    Doc.extractPages:83:Console undefined:Exec

    ===> The file may be read-only, or another user may have it open. Please save the document with a different name or in a different folder.

    The third prompt of the script asks for the relative location of a folder to save the pages in, it defaults to 'pdf/' and if you don't have said 'pdf' folder already created the scripts not smart enough to create it itself, and instead throws the error above.

    The fix is to make sure you have a folder created that matches your answer to the third prompt -OR- leave the third prompt blank and all the files will be saved in place and not in a separate folder.

    Known Participant
    July 23, 2014

    Ahhhhh well done!! I shall try this and let you know how it works out. Thanks for all your hard work. I completely agree, this really could be implemented directly within inDesign but till will attempt this and thank you for your efforts.

    All my client names are already in excel too so similar structure I think. Here's hoping.

    Known Participant
    July 22, 2014

    Hi Graham / everyone else

    Did you ever figure out how to do this? I need to do a similar (or the same) task. I have a 12pp document and 100 records, I want to output 100 x 12pp PDF files, named from a column in the attached CSV.

    Any ideas?

    Participating Frequently
    July 22, 2014

    Hello Ruth!

    I attempted it again today with a clear mind hoping that it was just something that I was missing or doing wrong. Unfortunately, I still was not able to successfully execute the process. I'm not sure if it's the JavaScript or the CSV file. If I had to guess, I would say that based on the complexity of the JavaScript, it's not counting the lines in the database properly. I've done everything possible to - and with the CSV file and end up with the same "The number of pages per row is not an integer…" error. I have a 597 page PDF that I need to split into 199, 3-page PDFs and rename. I really would hate to do this manually, but I have spent so much time trying to get the script to work that I could have . I cannot afford to purchase any software that might be available to accomplish this same thing. Should you manage to find a usable solution, please do share. I know that I would greatly appreciate it!

    Best of luck!

    Known Participant
    July 22, 2014

    I can't even get my head around the script

    In Acrobat Pro you can automatically split the document into even sized "parts" - but you still need to manually rename which I'm hoping to avoid.

    Pages > Split Document

    If that helps.

    Participating Frequently
    July 21, 2014

    I am running into the same situation as well. I have tried a myriad of solutions, but nothing seems to work

    I don't think that I am missing something that's fundamentally simple. I've gone through the process a couple of dozen times without success.

    I may have to split my PDF and rename manually - bummer.

    Participating Frequently
    July 21, 2014

    I'm going to purchase this Advanced Software for Splitting and Merging PDF Documents because I couldn't get the script to work.

    Participating Frequently
    August 9, 2012

    If you're getting 500 separate PDF files, you're doing something wrong. You should be able to save your Excel file (with graphic file references) in tab-delimited TXT format, attach it to your InDesign template through Merge function, complete your layout by dragging fields, then generate your catalog. Check the Indesign Help function. Columns should be your Field names.

    Peter Spier
    Community Expert
    Community Expert
    August 9, 2012

    Cosmo,

    Did you read the first post? The OP isn't getting separate PDFs, he WANTS separate PDFs and was hoping something had changed to allow it.

    Participant
    December 11, 2013

    It seems this script gets slower the more hyperlinks there are in the document:

    • Document with 1100 pages and no hyperlinks: About one 2-page PDF a second, maybe slightly more. Not bad.
    • Same document with 11 hyperlinks every 2 pages: About one 2-page PDF every two or three minutes. Hopeless, it would take more than 24 hours.
    • Same document run through Optimise PDF aggressively reducing its file size by 70% and then through Save As Reduced Size PDF turning off all backwards compatibility: About one 2-page PDF every 24 seconds. Bad, needs to be left running for 3 and a half hours at the end of the working day.

    In each case it's "Saving PDF..." that is the point the process struggles with. I don't know what it is about the addition of hyperlinks that makes the PDFs so slow to save.

    I think it's maybe something to do with cross-reference tables - the final PDFs are 25% cross reference tables according to Optimise PDF's audit tool, and there are no cross references so I can only guess that this is the hyperlinks. Why so much data, I have no idea.


    Thanks for posting your revised script, it would seem that it should do exactly what I require.

    I think I've set it up correctly as an Action in Acrobat.

    I have a 137 page PDF which I want to split into single page documents. I have a .csv file with a list of 137 unique IDs, which I would like Acrobat to use to name the individual files.

    I run the action and get prompted to input anything to prefix and suffix the filename with, together with an option of a relative path.

    I then get asked to choose a data file, so I choose my CSV list.

    The script seems to run ok but I get no output.

    I'm guessing at some point it should ask me for column name and also how many pages per file output??

    Or do I need to edit that in the script first? If so, which are the parts to edit?

    THanks in advance,

    Ben

    Steve Werner
    Community Expert
    Community Expert
    June 12, 2012

    There are no changes in Data Merge in InDesign CS6.

    GrahamHeAuthor
    Participating Frequently
    June 12, 2012

    Thanks Steve.