Page/sheet size setting in PDF-XChange Drivers API version 8

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: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
jochen_t
User
Posts: 3
Joined: Tue Aug 06, 2019 9:06 am

Page/sheet size setting in PDF-XChange Drivers API version 8

Post by jochen_t »

I have been using PDF-XChange Drivers API SDK version 5 in the past. For version 5 I set page size using the "Dev.<propertyName>" properties, which seem not to be supported with version 8 anymore - at least my code runs into an exception.

Evaluating version 8 for an update revealed an issue setting the required page/sheet size. I am developing in C#.

I checked the API documentation, the examples and developer forums but could not find any hint.

Here is an excerpt of my code:

Code: Select all

printer.set_Option("Paper.LayoutType", "Normal");
printer.set_Option("Paper.SheetSizeIndex", -2);

logger.Debug(String.Format("Page [layout: {0}, width: {1}, height: {2}]", pageLayout, width, height));

printer.set_Option("Paper.SheetWidth", width);
printer.set_Option("Paper.SheetHeight", height);

printer.ApplyOptions(0);
<width> and <height> are integer values. Regardless of whatever values I specify for "Paper.SheetWidth" and "Paper.SheetHeight" the PDF is generated using ISO A4.

What am I doing wrong?
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17765
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Page/sheet size setting in PDF-XChange Drivers API version 8

Post by Tracker Supp-Stefan »

Hello Jochen,

I am asking a colleague from the dev team to look at this and advise!

Regards,
Stefan
User avatar
Roman - Tracker Supp
Site Admin
Posts: 302
Joined: Sun Nov 21, 2004 3:19 pm

Re: Page/sheet size setting in PDF-XChange Drivers API version 8

Post by Roman - Tracker Supp »

Hello Jochen,
Please try "Paper.Size" (for standard papers) or "Paper.CWidth"/"Paper.CHeight" (for custom paper sizes).
Post Reply