Solution
The SystemLink Analysis Server uses a different PDF driver than DIAdem. Therefore, the PDF report may appear differently after executing the Analysis Automation Procedure (.ANP file) in SystemLink.
This issue can be resolved in two ways:
- Modify the ANP to use a report template, and alter the report template to use a manual border (instead of an automatic border).
- Modify the ANP to export the report sheets as an image, and use an external Python library to convert the images to a PDF.
Refer to the relevant sections below for details.
Using a Report Template with Manual Border
- Inside the ANP, modify the Python script to load a template report.
- In the code snippet below, the LoadLayout function is called, where TemplatePath is a variable that stores the path of the .TDR file.
TemplatePath = "C:\\Users\\PVE\\Desktop\\example_template.TDR"
dd.Report.LoadLayout(TemplatePath)
- Modify the report template (.TDR file) to include a manual border.
- In DIAdem, select the REPORT panel.
- Open the TDR file that is being loaded within the ANP.
- From the top menu bar, select Settings >> Layout Setup >> Layout Parameters...
- In the Worksheet tab, uncheck the Display Frame option.
- On the report, manually delete the border that appears around the sheet.
- Add a rectangle object to the report sheet. Resize it so that it emulates a border.
- Move any other objects on the sheet to fit within the "manual" border.
- Save the TDR file.
Exporting to Images and Converting to a PDF
- Use a Python script inside the ANP so that an external Python module can be imported to fix the scaling issues.
- Inside the Python script, export each DIAdem report sheet as an image.
- Using the [External] fpdf module, create a PDF document that places each exported image on its own page (ensuring that the image is the full width and height of the page).
Full instructions for implementing these steps can be found in
Create PDF Report From Images in DIAdem Python Script.