Scribus Generator script alt - merge data into a single PDF file

Previous topic - Next topic

ClubEd

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

[attachment deleted by admin]

berteh

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