How do you show background in Design View when setting from script?

When I run the following script, the background shows on the Preview tab, but not the Design tab:

//Show PDF File in the Background

merge.template.contexts.PRINT.sections[‘Facesheet’].background.source = BackgroundResource.RESOURCE_PDF;

resourceUrl = ‘file:///C:/Test/Facesheet.pdf’;

merge.template.contexts.PRINT.sections[‘Facesheet’].background.url = resourceUrl;

When I set the background via the GUI in the Print Section Properties, the background shows on both the Design and Preview tab.

Is there a way to get the background to show via a script in the Design view?

The design tab can’t display a dynamic resource as this needs the javascript to get executed which isn’t done in the Design view.

That’s only working for a fixed static image.