Hi Cosyspro,
Thank you for reaching out to Syncfusion support.
We have checked the reported issue on our end. Upon further analysis, To set a custom PDF page size using centimeters in Syncfusion PDF, you first convert centimeters to points since Syncfusion uses points as the unit (1 cm = 28.3465 points). After creating a PdfDocument, add a page normally using document.Pages.Add(), and then set the page size by accessing page.Section.PageSettings.Size with the converted width and height in points.
This approach allows you to define standard or custom paper sizes like A4 directly in centimeters by converting them before assigning. After setting the size, you can draw content normally using PdfGraphics, and finally save the document. This method keeps the process clean and compatible with Syncfusion’s PDF structure.
For your reference, we have attached the sample and the corresponding output PDF document for your reference.
Please try this solution on your end and let us know the results. Kindly get back to us if you need any further assistance in this.
Regards,
Arumugam M
Attachment:
PdfCreationSample_4251020e.zip