Hi All, I’m extracting the name and address from a PDF that contains multiple records - number of pages is variable per record. I’m then mail sorting the data and using this data in a Data Mapper. in the designer I’m using a control script to pull through the pages in the new sorted order
var pdfName,pageNum, totalPages, startNum, result = “images/”;
All works fine from what I can tell. I also need to add some of the text I have extracted to one of the following pages. Is there a way I can target a certain div box to print or not from within the
control scripts for loop?
Can you let us know please what the condition is or conditions are whether a certain div-element should be shown/printed or not?
I am asking this because as far as I know is that you can’t target a specific HTML element from within a Control Script. So you will probably have to find out a way to do this by a Standard Script, by which we can help you of course.
Is there a way I can target a certain div box to print or not from within the control scripts for loop?
Please note that it is unfortunately not possible to select content from within a Control Script. The reason for this is because Control Scripts don’t have a selector and because the ‘query() - PReS Connect 2021.2 User Guide (link)’ function is unavailable from within a Control Script.
I assume that the easiest option will be to use a second run of OL Connect Workflow plugins to:
(Data Mapping Configuration) Split the PDF input file into records based on the condition if a page contains the text “Enclosure 1” at a certain location.
(Template) Use the PDF input file as background for a Print Context Section of your Template and add the specific div-element, which you would like to add to a page which contains the text “Enclosure 1”, to the Master Page or Print Context Section of your Template.