Author Topic: Scribus Generator script alt - merge data into a single PDF file  (Read 3438 times)

ClubEd

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
  • Scribus User
Hello.

I wanted to import CSV data into a Scribus file and have it output multiple records into a single PDF page instead of one PDF for each record. I accomplished this by altering the Scribus Generator script (http://www.ekkehardwill.de/sg/). See attached.

Instead of your Scribus fields using %VAR_Name% (or whatever the field name is), use as many as you like in the same file, but add an underscore and the record numbers: such as '%VAR_Name_1%', '%VAR_Name_2%', etc.

This is suitable for my current needs, but it may be a bit unwieldy with hundreds of records as opposed to the several I'm currently using it for. I may return with an update, but feel free to have a go at it yourself. For 1000 records, it would probably make sense to have it loop through the same page with ten records (%VAR_Field_1% to %VAR_Field_10%) as opposed to requiring you to make 100 identical pages in Scribus...

I contacted the original author but have not heard back yet, so this may not make it as an official alternative or feature added into the current Generator.

Enjoy!
 :)

berteh

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
  • Scribus User
Re: Scribus Generator script alt - merge data into a single PDF file
« Reply #1 on: September 14, 2015, 06:12:04 pm »
thanks for your contribution... I had a look at your code to integrate a similar feature into https://github.com/berteh/ScribusGenerator/
have a nice day!
B.

ClubEd

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
  • Scribus User
Re: Scribus Generator script alt - merge data into a single PDF file
« Reply #2 on: September 21, 2015, 06:01:02 am »
Brilliant! Thanks for picking up the project :)