I am trying to create a Document object with a custom page size in C# using iText 7.
So far I have tried passing a rectangle using the documentation's definition for resolution of 72 user units per inch:
Rectangle pageSize = new Rectangle(288, 306);
string fullFilePath = "some string";
PdfWriter pdfwriter = new PdfWriter(fullFileNamePDF);
PdfDocument pdf = new PdfDocument(pdfwriter);
pdf.AddNewPage();
Document Doc = new Document(pdf, rect);
However, the code fails compilation with 'cannot convert from iText.Kernel.Geom.Rectangle to iText.Kernel.Geom.PageSize.'