Out of Memory when calling SetPageSize

Hello,
If I use a function Page.SetPageSize(), my program runs out of memory when I call Pdf.Document.Save().
Here is a sample:
Document doc = new Document();
CurrentPage = doc.Pages.Add();
CurrentPage.SetPageSize(8.5, 11);
//… add some text to the page
doc.Save(path); //at this point I run out of memory.
if I omit CurrentPage.SetPageSize(8.5, 11);, everything works fine. I am using latest pdf library 19.10.
Thank you

@mpogorelov

Thank you for contacting support.

Please note that the basic unit in Aspose.PDF for .NET API is Point , where 72 points are equal to 1 inch. So please try using below line of code and then share your kind feedback with us.

CurrentPage.SetPageSize(8.5*72, 11*72);