You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
The text was updated successfully, but these errors were encountered:
If I understand correctly, your issue seems to me to be related to the location of the pdfannotations bits (XML Element) in the SLA template.. like they would all be located at the end of the source file after the last NEXT-RECORD tag.
Do you mind attaching your (template) sla here so I can have a look?
Did you create all the annotations after duplicating the repeat sections, or were they already defined on the first section and then duplicated along with it?
A priori, changing the location of the pdfannotations XML Element in the SLA, before their respective NEXT-RECORD tag, should solve the issue. But I don't know a sure way to do it in Scribus : last tried with 'grouping' to no avail, maybe 'select and send backwards' would work. I'd do it with an external text/XML editor. In a copy of the template just to be sure :)
add %SG_NEXT-RECORD% before the first element of this item, make it smaller to makes it a different (ITEXT) element entirely, that will be cleaned entirely by the script
group all elements of item (ctrl+g) - make sure to include the annotation frames in this group
Menu item > mutliple duplicate to duplicate as much as needed (7 rows in this case)
ungroup first element of page (ctrl+shif+g) to remove it's SG_NEXT-RECORD marker, as leaving it would skip the first record (of each 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.
The text was updated successfully, but these errors were encountered: