Custom Paper.SheetSizeIndex does not work.  SOLVED

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics or PDF-XChange Viewer SDK if appropriate.

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Stefan - PDF-XChange

shahchandra
User
Posts: 6
Joined: Mon May 19, 2025 9:08 am

Custom Paper.SheetSizeIndex does not work.

Post by shahchandra »

I want to set different page size during the print but all the page is printed on A4 size.

Attached you can find the demo project. I have used the below code to set page size,

Code: Select all

PDFPrinter.ResetDefaults();

// setting other general and save options which works :)
 
PDFPrinter.set_Option("Paper.LayoutType", "Normal");
PDFPrinter.set_Option("Paper.SheetSizeIndex", -2); 
PDFPrinter.set_Option("Paper.SheetWidth", 450);
PDFPrinter.set_Option("Paper.SheetHeight", 250);
// other options which works
// ...
PDFPrinter.ApplyOptions(0);
I am using the PDF-XChange version10.3.1.387.

Any help is appreciated.
TestPDF.zip
You do not have the required permissions to view the files attached to this post.
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 12441
Joined: Wed Jan 03, 2018 6:52 pm

Re: Custom Paper.SheetSizeIndex does not work.

Post by Daniel - PDF-XChange »

Hello, shahchandra

Thank you for letting us know, this has been raised to the dev team to ask for their insight and expertise. Hopefully one of them can come post here with a solution, or promise to resolve the issue in a future release.

Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
shahchandra
User
Posts: 6
Joined: Mon May 19, 2025 9:08 am

Re: Custom Paper.SheetSizeIndex does not work.

Post by shahchandra »

Daniel - PDF-XChange wrote: Wed Oct 29, 2025 3:59 pm Hello, shahchandra

Thank you for letting us know, this has been raised to the dev team to ask for their insight and expertise. Hopefully one of them can come post here with a solution, or promise to resolve the issue in a future release.

Kind regards,
Hi Daniel,

Is there any update regarding the issue from the dev team? Any updates would be helpful.

Regards
User avatar
Sean - PDF-XChange
Site Admin
Posts: 657
Joined: Wed Sep 14, 2016 5:42 pm

Re: Custom Paper.SheetSizeIndex does not work.

Post by Sean - PDF-XChange »

Hi shahchandra,

There are no updates on this yet - either Dan or the development team will post here when there are.

Thanks and have a nice day,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
shahchandra
User
Posts: 6
Joined: Mon May 19, 2025 9:08 am

Re: Custom Paper.SheetSizeIndex does not work.

Post by shahchandra »

Hi,

Any words on this yet, some status(looking into, working on) would be really helpful as we are hanging on the changes from the PDF X-Change.

Thanks.

Regards
User avatar
Sean - PDF-XChange
Site Admin
Posts: 657
Joined: Wed Sep 14, 2016 5:42 pm

Re: Custom Paper.SheetSizeIndex does not work.

Post by Sean - PDF-XChange »

Hi shahchandra,

I've given them a nudge on this.

Kind regards,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3602
Joined: Thu Jul 08, 2004 10:36 pm

Re: Custom Paper.SheetSizeIndex does not work.  SOLVED

Post by Ivan - Tracker Software »

Sorry for the huge delay.

Please use Paper.StdSheetWidth and Paper.StdSheetHeight instead of Paper.SheetWidth and Paper.SheetHeight.

But also, please consider using Paper.CWidth, Paper.CHeight, and/or Paper.Size.

In a nutshell, dimensions specified by Paper.Size, Paper.CWidth, and Paper.CHeight is what your application "sees" when it communicates with the printer. And the Paper.SheetSizeIndex, Paper.StdSheetWidth, Paper.StdSheetHeight (and other parameters) defines what PDF page size (and layout on it) will be generated.
PDF-XChange Co Ltd. (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
shahchandra
User
Posts: 6
Joined: Mon May 19, 2025 9:08 am

Re: Custom Paper.SheetSizeIndex does not work.

Post by shahchandra »

Hi,

Thanks for the answer, the custom size works perfectly with the StdSheetWidth and StdSheetHeight property.

Do we have any new documentation for the properties you have mentioned like Paper.CWidth, Paper.CHeight?

According to the documentation provided in the https://help.pdf-xchange.com/pdfxdapi7/PDFXDAPI_MAN.pdf, the index column can used in the Paper.SheetSizeIndex, but that results are not as intended.

If we use the Paper.SheetSizeIndex = 13, according to the documentation the A3 type paper should be the result but the result is the B5 (JIS) paper. It is taking the standard index column value and for undefined its taking the A4 size.

Can you clarify this and also the Paper.Size, should this also use the same table & index as in the image below.

image.png
Regards
You do not have the required permissions to view the files attached to this post.
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3602
Joined: Thu Jul 08, 2004 10:36 pm

Re: Custom Paper.SheetSizeIndex does not work.

Post by Ivan - Tracker Software »

Here is the updated table:
image(1).png
The help site will have the updated table soon.
For Paper.Size and for Paper.SheetSizeIndex values from the second column "Standard Index" should be used.
You do not have the required permissions to view the files attached to this post.
PDF-XChange Co Ltd. (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.