Is there a maximum and minimum page width and height for PDF's (CAD Module)

Product: @pdftron/pdfnet-node, CADModule

Product Version: 10.0.0

Please give a brief summary of your issue:
Is there a maximum and minimum page width and height for PDF’s

Please describe your issue and provide steps to reproduce it:
When setting the page width and height during a CAD to PDF conversion, is there a maximum and minimum size for the values that can be passed? Are there limits on the Apryse API? If so, could you point me towards any related documentation?

E.g. in the minimal sample code below, what is the maximum and minimum values that can be set for the pageWidth and pageHeight values?

Please provide a link to a minimal sample where the issue is reproducible:
const opts = new PDFNet.Convert.CADConvertOptions();
opts.setPageWidth(pageWidth);
opts.setPageHeight(pageHeight);

2 Likes

Thank you for contacting us about this. Just to get more information about your use case, can I ask why you are looking maximum and min values for the page width and height? Are you running into any exceptions or issues when setting large or small values?

1 Like

Hi Shakthi, thanks for the response.

In our application we usually provide users with page sizes to choose from (e.g. A1, A2, A3, A4 etc.) but now have a requirement to allow custom page sizes, as not all of their drawing files fit these standard dimensions.

So we are allowing users to enter custom width and height values. But we want to test the boundaries to make sure that we don’t encounter errors or exceptions when we go live. E.g. We wouldn’t allow 0x0. But is there any range for what the API would consider a minimum or maximum value or where it might cause problems or exceptions?

1 Like

Hi Shakthi, just wondering if you have any feedback on those min and max values for the Pdf width and height? It’s no problem if there aren’t any, I just wanted to verify with you before going ahead.

Thanks

1 Like

Apologies for the delay. Please limit the max value to 200x200inches (5080 x 5080 mm, or 14,400 PDF units in each direction), as this is the maximum value supported by the PDF standard. Higher values might cause issues with conforming readers.

Thank you.

1 Like

Thank you Shakthi, that’s great to know. I appreciate you getting back to me with this info.

1 Like