I'm trying to create a PDF from the scratch using GemBoxPdf
using (var document = new PdfDocument())
{
// Add a page.
var page = document.Pages.Add();
page.Rotate = 90;
// Write a text.
using (var formattedText = new PdfFormattedText())
{
formattedText.Append("Hello World!");
page.Content.DrawText(formattedText, new PdfPoint(100, 700));
}}
I'd like to change the size of the page to be able to set it as A1,A2,A3 or A4 or custom size
I've tried to set the cropBox but it does not work. I've seen another questions of how to do it with spreedsheet but using its PrintOptions I am also unable to change its size
How do I modify the page size ?
Thanks