Generated pdf opens blank in Adobe Acrobat

Hi, I have used Aspose.PDF to generate pdfs and ended up with just what we needed. However, the generated pdfs are blank when viewed in adobe Acrobat. When viewed in a browser such as Chrome or Edge, the PDF looks just like you would expect, but in Acrobat the pdf is blank. Is there anything that can be done to fix this issue?

We are using Aspose.Pdf Version 18.2

Here is some example code that causes the problem.

        var pdfDocument = new Document();
        pdfDocument.Pages.Add();
        Page page = pdfDocument.Pages[1];
        page.Paragraphs.Add(new Aspose.Pdf.Text.TextFragment("Hello World"));
        
        pdfDocument.Save();

        pdfDocument.Pages[1].SetPageSize(612, 792); 

        pdfDocument.Save("OutputFileLocation");

@nbidstrup
We are looking into it and will be sharing our feedback with you shortly.

@nbidstrup

Please try using 24.5 version of the API as it is the latest one. In case issue still persists, please let us know so that we can further proceed accordingly.

My current license doesn’t support the latest version. Is there any way to get it working with our current license?

Having the same problem in Aspose 19.1. Found the cause: the problem only occurs when I try to use Aspose 19.1 with .NET Core 2.2 or higher. As long as I stay with .NET Core 2.1, the output is OK.

@nbidstrup

We are checking it further and will get back to you shortly.

@cherabomb
@nbidstrup

We tested using 24.5 version of the API and could not replicate the issue. Attached is the generated output. Also, if you cannot use 24.5 version with your current license, you can use it with a 30-days temporary license and upgrade to latest version once you find everything is working correctly.