On the PDF Viewer you have only to set the variable in the "Document" property.
Then you create a Button for the PDF generation with the following code:
Set(
varPDFContent;
PDF(
S7_ContainerMultipage;
{
Orientation: PaperOrientation.Landscape;
Size: PaperSize.A3;
Margin: "20px";
ExpandContainers:true
}
)
);;
Practically the same as in the "OnVisible" property only with another container.
The calculation for the containers is the dimension in inches multiplied for the DPI.
In my case an A3 is 11.69 x 16.54 inches and I used a 96 DPI (to let the screen fit in the preview).
The calculation:
11.69 x 96 = 1122.24
16.54 x 96 = 1587.84
Then you have to play a little bit to let it fit.
So in my case all the containers are 1090 x 1556.
As you can see in my previous answer I used a container for the first page (fix) and a gallery for all the other pages with variable content. The gallery has the same dimensions and also the templateheight property of the gallery.
To download the generated PDF you can take from a Form the Attachment field and use this code:
{
Name:(FilenameCalculated & ".pdf");
Value:varPDFContent
}
I hope this can help