ScribusGenerator
ScribusGenerator copied to clipboard
PDF annotation data only correct on first record on a page
I have a two-line repeating format that pulls data from a .csv file. There are 19 repeating sections. The regular text frames contain the correct data, but the PDF annotations only contain the correct information for the first line. All subsequent annotations contain the data from the last record on the page. I'm not sure if that is a coincidence or is an artifact of how I copied the sections.
The information in the text frames is: Position, Incumbent, e-mail address, telephone
The information in the PDF annotations is: e-mail address, telephone.
The annotation information uses the same fields as the text data. The annotations sit on top of the text frames so a click or tap should trigger them. The annotation fields for the e-mail link are named "Text5", "Copy of Text5", "Copy of Text5 (2)" .... by scribus while the telephone links are named "Text6", "Text26", Text29" ...
I use the same technique for other templates that don't use so many repeating formats on a page and they work.
I use this to generate different sections of a larger document, using a command line script. The active line is:
/usr/bin/python3 ~/.scribus/scripts/ScribusGenerator-master/ScribusGeneratorCLI.py ~/.scribus/templates/${1}.sla -c ./Directory/${1}.csv -o ./Directory/ -n ${2}-$((${2}+1))\ ${1} -m
where $1 is the section I am generating, which also specifies the template file and .csv file. $2 is the current year.
I had been using an older version of the generator that used -python3 as the main folder but just downloaded the latest version that uses -master as the main folder. The problem is similar in both of them, but the -python3 version picked up a different e-mail address than the -master version. Both selected the same telephone number.
To repeat, the first instance works while all subsequent instances have the same incorrect pdf annotations that seem to be from much further down in the .csv file.
I am creating a single .sla file.