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, Sean - Tracker, Chris - Tracker Supp, 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 » Tue Aug 06, 2019 9:21 am

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: 13524
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 » Thu Aug 08, 2019 10:57 am

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: 268
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 » Thu Aug 08, 2019 5:30 pm

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

Please ZIP any files uploaded to this forum or they will not be posted !
You may also use a RAR or 7Z archive format

Post Reply