Page 1 of 1

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
by docu-track99
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

Re: Moving from version 5 of the Printer API to version 7 of the Printer API breaks default papersize

Posted: Fri Oct 19, 2018 8:24 pm
by docu-track99
To followup. It seems like the key issue we are facing is that the line:

PDFPrinter.Option("DevMode.PapSize") = 1

is no longer supported.

Do you have an alternative?

After spinning up an instance of the printer, do we now need to use a Windows API call to set the default "Printer Preferences" for the user.

I am frustrated that I haven't received a response on this.

Re: Moving from version 5 of the Printer API to version 7 of the Printer API breaks default papersize

Posted: Thu Nov 01, 2018 11:30 am
by Tracker Supp-Stefan
Hello docu-track99,

I removed the duplicate of this topic, and moved this one to the correct "Drivers API" forum as you had it originally in the tools one.
And I will now ask a colleague from the dev team for some advise on your inquiry!

Cheers,
Stefan