Page 1 of 1

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

Posted: Tue Aug 06, 2019 9:21 am
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?

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

Posted: Thu Aug 08, 2019 10:57 am
by Tracker Supp-Stefan
Hello Jochen,

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

Regards,
Stefan

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

Posted: Thu Aug 08, 2019 5:30 pm
by Roman - Tracker Supp
Hello Jochen,
Please try "Paper.Size" (for standard papers) or "Paper.CWidth"/"Paper.CHeight" (for custom paper sizes).