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

PDF-XChange Drivers API (only) V4/V5
This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - VERSION 4 & 5 - Please use the PDF-Tools SDK Forum for Library DLL assistance.

Moderators: Tracker Support, TrackerSupp-Daniel, Chris - Tracker Supp, Vasyl-Tracker Dev Team, Sean - Tracker, Tracker Supp-Stefan

Post Reply
docu-track99
User
Posts: 493
Joined: Thu Dec 06, 2007 8:13 pm

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

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

docu-track99
User
Posts: 493
Joined: Thu Dec 06, 2007 8:13 pm

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

Post by docu-track99 » Fri Oct 19, 2018 8:24 pm

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.

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13320
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

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

Post by Tracker Supp-Stefan » Thu Nov 01, 2018 11:30 am

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

Post Reply