Background: From PDF DataMapper input

Dear All,

My template’s Section’s Background is enable with “From PDF DataMapper input”.

For some scenario, the PDF input file will have more than 1 page. We will need to set different position for 2nd page onwards.

Is there any way to archive this?

Thanks and Regards,
Janice

How about using two sections? Would that work for your use case? First for page 1 and second for remaining pages. You can set the page range in the Background tab of the Section properties dialog.

Erik

Hi @Erik ,

I did tried with 2 Sections, 1st Section for Page 1 only, and 2nd Section for page 2 onwards. And the Background position for Section 1 and Section 2 is different.

But the result is incorrect as per below:

a. If the PDF input is having 1 page only, the final output become 2 page, whereby both pages are displaying the content of the PDF input, but the field’s mapping is not working properly in the 1st page.

b. If the PDF input is having more than 1 page, the final output is also 2 pages, but the position that I set for Background for Section 2 is not reflected.

Alright, perhaps the CSS approach provides a solution. Return to the single-section layout and add the following CSS rule to the context_print_styles.css file in the Stylesheets folder within the Resources panel. This rule sets specific positioning for the data mapper background image on all pages except the first (adjust the settings to your needs).

Erik

#pages>div:not(:first-child) img.ol_pdf_datamapper_input {
	top: 10mm !important;
	left: 10mm !important;
	transform: none !important;
	outline: 2px solid orange;
}

Hi @Erik ,

Thank you for your suggestion. It works!

1 Like