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)