Posted by a ceTe Software moderator
Hello,
Below is the code to create an A4 portrait document as per you requirements.
Document document = new Document();
PageDimensions dimensions = new PageDimensions(PageSize.A4, PageOrientation.Portrait);
dimensions.BottomMargin = 72;
dimensions.TopMargin = 72;
dimensions.LeftMargin = 54;
dimensions.RightMargin = 54;
Page page = new Page(dimensions);
document.Pages.Add(page);
document.Draw("test.pdf");
When you print the document using a PDF Viewer, please make sure to select the “Actual Size” and “Choose paper source by PDF page size” to print the page with the actual dimensions. If you continue experiencing this issue even after you are printing the PDF with actual dimensions, please send over the PDF file and the code used to create the file to
support@cete.com so we can look into it further.
Thanks,
ceTe Software Support Team.