DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

ExportToPDF not A4 page size

Solved!
Go to solution

Hi,

 

The ExportToPDF function creates a PDF file using the US Letter page size. My graphs are A4 so they end up being fitted to Letter size and leaving a large margin at the bottom. I can't find a setting within DIAdem or a reference to PDF page size in the help files, so does anyone have any idea if it can be controlled?

 

Thanks,

 

Simon.

0 Kudos
Message 1 of 9
(2,635 Views)

Hi Simon,

 

This is a general setting in the layout parameters:

Walter_Rick_0-1638866390902.png

 

Greetings

Walter

 

 

 

0 Kudos
Message 2 of 9
(2,601 Views)

Hi Walter,

 

Perhaps I wasn't clear enough in my original post. The page size is set to A4 in DIAdem but PDFExport produces a document using Letter page size.

Simon_Aldworth_0-1638870212286.png

 

Simon_Aldworth_1-1638870373911.png

So the graph is reduced to fit, leaving a margin at the bottom of each page:

Simon_Aldworth_2-1638870513094.png

Regards.

0 Kudos
Message 3 of 9
(2,595 Views)

Hi Simon,

 

Please can you check the PDF output with this script:

 

call data.Root.Clear
call DataFileLoad(ProgramDrv & "\Examples\Data\Example_data.tdm")

call Report.LoadLayout(ProgramDrv & "\Libr\Documents\Example.tdr")
call Report.Refresh

Report.Settings.Page.Dimensions.UseScaledOutput = false
Report.Settings.Page.Dimensions.Ratio = 0.7

call Report.Sheets.ExportToPDF("D:\Test\Test", false)

 

Greetings

Walter

0 Kudos
Message 4 of 9
(2,590 Views)

Hi Walter,

 

Same problem I'm afraid.

Simon_Aldworth_0-1638881742539.png

Regards.

0 Kudos
Message 5 of 9
(2,581 Views)
Solution
Accepted by Simon_Aldworth

Hi Simon,

 

What are the settings in the printer setting dialog?

Walter_Rick_0-1638883283687.png

 

 

Here are some script commands regarding the format of a Printer:

 

'returns the possible supported formats
msgbox PrinterPaperSizeListGet("winspool,DIAdem PDF Export,nul:")
'returns the selected format
msgbox PrinterPaperSizeGet("winspool,DIAdem PDF Export,nul:")
' sets the format (persistent)
call PrinterPaperSizeSet("A4", "winspool,DIAdem PDF Export,nul:")

 

Greetings

Walter

0 Kudos
Message 6 of 9
(2,578 Views)