5 Replies Latest reply on Dec 19, 2013 10:13 AM by Jeffrey_Smith

    Data merge: multiple questions

    Menno79

      Hi all,

       

      I'm having some difficulties merging some data to the proper output.

       

      The situation is as followes:

      • I have a CSV as source file. It holds 4500+ news-items, with variable bodytext-lengths. I need a PDF for each record, but the length of the bodytext makes one item span 2 or 3 pages, and the next just one page, and so on...

       

      My questions:

      • Is it possible to create a separate PDF for each record?
      • Is it possible to span the bodytext across a variable number of pages automatically (per document)?

       

      Would be great if this is possible...

       

      Thanks already for reading.

       

      Best regards,

       

      Menno

        • 1. Re: Data merge: multiple questions
          Peter Spier Most Valuable Participant (Moderator)

          None of this can be done automatically using data merge, which is a "dumb" module.

           

          One set of placeholders = one record with no change in the size of any frames or any ability to span pages or auto-flow overset text. You might be able to script creating one new merged file for each record (set the range of records to merge to one record, then advance a counter), but you can't get past the requirement to manually add pages for your oversets, so there's not much hope of merging directly to PDF.

          • 2. Re: Data merge: multiple questions
            Menno79 Level 1

            Hi Peter,

             

            Thanks for the quick reponse! I will look into it and give it a try...

            • 3. Re: Data merge: multiple questions
              Jeffrey_Smith Most Valuable Participant

              one record with no change in the size of any frames or any ability to span pages or auto-flow overset text.

              Changing Frames Size, as long as the text frame is set up with auto-size, it will expand to necessary size during merge.

               

              Spanning Pages, as long as datamerge placeholders are on master page with a master text frame, a datamerge forcing one record per document will create as many pages as necessary and into individual documents. This does not work if you "Export to PDF" from datamerge, only the first page of record appears.

               

              Although the OP might be able to work around these issues, here are a few things to consider with the data source: a record consisting of a large volume of text most likely contains hard returns. A hard return will invoke a new record and would have to be removed from data source. Commas would also cause issues if working with CSV files.

              • 4. Re: Data merge: multiple questions
                Peter Spier Most Valuable Participant (Moderator)

                Thanks, Jeffrey. I was not aware (obviously) that Data Merge could do that with auto-size frames or that it would add pages from a master page. Very interesting.

                • 5. Re: Data merge: multiple questions
                  Jeffrey_Smith Most Valuable Participant

                  Even with these wonky capabilities, I think this would be a difficult task for datamerge. Flowing text would only flow for that frame. A placeholder (not of main thread) will not appear on page 4 if main frame threads that far.

                   

                  An XML workflow may work, but there are many issues associated with XML like, converting source data to a tagged format, lack of ability to generate multiple individual documents, not to mention a steep learning curve.