The source property sets the source type of the PDF background (e.g. None, Datamapper,
PDF Resource) in your template. Could you retry things with the code snippet below?
var printSections = merge.template.contexts.PRINT.sections;
printSections[‘Section 1’].background.source = BackgroundResource.RESOURCE_PDF;
printSections[‘Section 1’].background.url=‘file://///C:/somepdf.pdf’;
@Ralf, We’ve released Connect 2018.1.1. This patch version contains a fix for an issue related Section cloning which also effected section backgrounds set in a Control Script for these clones. I suggest to update that version and let us know the outcome.
no cloning used! But after installing 2018.1.1 the pdf source from datamapper is still loosing some source pages (red cross) and:
external backgrounds from local path not stored in the template folder render correctly, but only the first page, if there are more pages in external pdf these are empty! URGENT!
external backgrounds from mapped network drive render with a file naming convention like file:///// (5x slash, previously I thought there were 4 slashes), Can’t use that because when rendered through the server, those paths are different from client paths. Backside page renders empty! same error as before.
external backgrounds from UNC paths previously worked but I can’t fiddle out the new naming tried several slash combinations. Urgent!
Even with Control script off UNC paths don’t work.Just try to set a backgorund to any unc ressource (don’t store the asset in the template, keep it external).
external background images stored within the template render correct, even with more than one page.
thx to VM snapshot I’ll revert to 1.8 (everything’s running there)
We are able to reproduce the problem when the path (and/or file name) contains spaces or backslashes. When escaping these characters using encodeURI() things should work correctly (see the sample below). Can you confirm that your paths contain these characters (or other special characters)?