Moving from version 5 of the Printer API to version 7 of the Printer API breaks default papersize
Posted: Fri Oct 19, 2018 1:04 pm
Hi Tracker,
Posted this initially in the wrong forum.
We have just moved from PDFX5API.exe to PDFX7API.exe.
The primary reason why we made this move is because under version 5, setting the default page size to letter was not working in French versions of windows. (It was showing up as A4 instead)
When we moved to version 7 we found that PDFPrinter.Option("DevMode.PapSize") = 1 threw an error.
I tried to replace it with PDFPrinter.Option("Paper.SheetSizeIndex") = 0 and it had no effect when bringing up the printer properties.
THE PRINTER PROPERTIES WOULD ALWAYS SHOW A4 AND NOT THE DESIRED LETTER
I tried multiple options of setting the Paper.SheetSizeIndex and also Paper.LayoutType, but no matter what I did, I could not see any difference when Printing from Word and looking at the printer properties.
I also tried combinations of PDFPrinter.ResetDefaults() and PDFPrinter.ApplyOptions(0) (the latter of which does not appear to be in your sample solution)
Any thoughts as to what I might be doing wrong?
Sample code is below:
PDFPrinter = PDFPFactory.Printer("", sDocItPrinterName, sKey, "")
With PDFPrinter
.ResetDefaults() 'tried both with and without this
.Option("Save.SaveType") = "Save"
.Option("Save.ShowSaveDialog") = "No"
.Option("Save.WhenExists") = "Overwrite"
.Option("Save.RunApp") = "False"
.Option("Fonts.EmbedAll") = 1
.Option("Paper.LayoutType") = 0 'tried various combinations of this.
.Option("Paper.SheetSizeIndex") = 0 'tried various combinations of this
.ApplyOptions(0) 'tried both with and without this line
End With
Posted this initially in the wrong forum.
We have just moved from PDFX5API.exe to PDFX7API.exe.
The primary reason why we made this move is because under version 5, setting the default page size to letter was not working in French versions of windows. (It was showing up as A4 instead)
When we moved to version 7 we found that PDFPrinter.Option("DevMode.PapSize") = 1 threw an error.
I tried to replace it with PDFPrinter.Option("Paper.SheetSizeIndex") = 0 and it had no effect when bringing up the printer properties.
THE PRINTER PROPERTIES WOULD ALWAYS SHOW A4 AND NOT THE DESIRED LETTER
I tried multiple options of setting the Paper.SheetSizeIndex and also Paper.LayoutType, but no matter what I did, I could not see any difference when Printing from Word and looking at the printer properties.
I also tried combinations of PDFPrinter.ResetDefaults() and PDFPrinter.ApplyOptions(0) (the latter of which does not appear to be in your sample solution)
Any thoughts as to what I might be doing wrong?
Sample code is below:
PDFPrinter = PDFPFactory.Printer("", sDocItPrinterName, sKey, "")
With PDFPrinter
.ResetDefaults() 'tried both with and without this
.Option("Save.SaveType") = "Save"
.Option("Save.ShowSaveDialog") = "No"
.Option("Save.WhenExists") = "Overwrite"
.Option("Save.RunApp") = "False"
.Option("Fonts.EmbedAll") = 1
.Option("Paper.LayoutType") = 0 'tried various combinations of this.
.Option("Paper.SheetSizeIndex") = 0 'tried various combinations of this
.ApplyOptions(0) 'tried both with and without this line
End With