We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Generating a PDF with barcode while targeting netcoreapp3.1 displays nothing

I have a class that generates a PDF that contains a line of text and a barcode. When I use this class in a project that targets .Net Framework 4.8 (net48) this class works to generate the first attached file. We are now doing an upgrade to .Net Core. However, when I use the exact same code in a project that targets .Net Core 3.1 (netcoreapp3.1), then nothing on the PDF displays. (Note: The yellow text background has only been added in attempt to debug this. It is the only thing that displays, for some reason.)
The odd thing about this is that I know the barcode is on the page. I set up a unit test that generates the PDF, then attempts to read the barcode from the page. The test passes when targeting either platform. So it seems that all of the graphical elements are actually in the PDF, they’re just not visible.
Why does this code perform differently under .Net Core 3.1, and what can I do to fix it so all of my graphical elements displayTest coversheet netcoreapp3.1 FAILURE.pdf (55.9 KB)
Test coversheet net48 SUCCESS.pdf (55.9 KB)
?

BarCodeGenerator .zip (1.8 KB)

Now, I’m very confused. I clicked on the links for the PDF files attached above. When I download them in Chrome and they open in the browser, they look identical. However, when I open the “Test coversheet netcoreapp3.1 FAILURE.pdf” locally, using Adobe Acrobat Pro 2017, the only thing that appears is the yellow background for the text. Is this some sort of bug with Acrobat?

@mchu1234

Would you kindly use Aspose.PDF for .NET 20.8 in your environment and in case issue still persists, please share a sample console application in .zip format with us. We will test the scenario in our environment and address it accordingly.

Ah, yes. Using Aspose.Pdf 20.8 seems to have resolved the issue.

@mchu1234

It is good to know that your issue has been resolved. Please keep using our API and in case you need further assistance, please feel free to let us know.