Images Cut Off When Rasterizing PDF on Linux

We are having an issue where the same code does not produce equivalent output between windows and linux.
The below .NET core compatible code can be used to render PDF pages into tiff images, but on Linux the barcode images which are present on some pages are getting cut off. This does not happen on Windows.

    Dim pdfDoc As New Document(FilePath)
    Dim index As Integer = 0
    Dim pageCount = pdfDoc.Pages.Count
    Dim PDFdirectory = System.IO.Path.GetDirectoryName(FilePath)

    For index = 0 To pageCount - 1
        Dim imgFile As New FileStream(PDFdirectory & "/Images/" & FileName & "img_" & index & ".png", FileMode.Create)
        Dim pngDevice As New PngDevice()
        pngDevice.Process(pdfDoc.Pages(index + 1), imgFile)
        imgFile.Close()
    Next

Edit: I was able to upload a sample PDF and sample output now as well. Please note pages 4,7, and 9 of the document.
Test_Invoice.pdf (490.3 KB) Test_invoice_linux.zip (426.8 KB)

@805toolz

We are looking into it and will get back to you shortly.

@805toolz

We can not reproduce the issue so please upgrade to latest version of API and share your feedback.

Hi @mudassir.fayyaz,

I have tried upgrading Aspose.PDF from 21.9 to 21.10.1, which seems to be the latest public version. However, I am still having the same issue. Please see this example where only half of the bar code is visible. I was not able to detect any difference in the generated image.
Test_Invoice.pdfimg_3.png (23.1 KB)

Can you please specify which Linux library versions you are using for the lower level image and graphics processing? This seems to be lacking from the documentation, so there could be some difference there.
I have libgdiplus0 version 6.0.5-12.21. ReadElf shows the following dependencies:
Edit: below dependencies were for an older version of libgdiplus. Please see follow up post.

Dynamic section at offset 0x64cb8 contains 38 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libglib-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libcairo.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libfreetype.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libXrender.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libX11.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libtiff.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libjpeg.so.62]
 0x0000000000000001 (NEEDED)             Shared library: [libgif.so.4]
 0x0000000000000001 (NEEDED)             Shared library: [libpng15.so.15]
 0x0000000000000001 (NEEDED)             Shared library: [libz.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libexif.so.12]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libfontconfig.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000e (SONAME)             Library soname: [libgdiplus.so.0]

Update: my mistake, this issue is resolved after correcting the version of libgdiplus.so.0.
After further review, I noticed that I had installed packages for both libgdiplus and libgdiplus0. I still think some documentation around the linux package versions/general setup would be useful.

I realized that both of the below packages were installed and the latter effectively overwrote the former because they use the same shared library filename.
libgdiplus0-6.0.5-12.21.x86_64
libgdiplus-2.10-10.el7.x86_64

My distro package management tool mislead me, but reinstalling lidgdiplus0 from an RPM corrected the issue.

Correct image file is generated now.
Test_Invoice.pdfimg_3.png (42.6 KB)

Corrected libgdiplus library dependency list:

Dynamic section at offset 0x80c70 contains 37 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libglib-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libcairo.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libfreetype.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libjpeg.so.8]
 0x0000000000000001 (NEEDED)             Shared library: [libtiff.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libgif.so.7]
 0x0000000000000001 (NEEDED)             Shared library: [libpng16.so.16]
 0x0000000000000001 (NEEDED)             Shared library: [libX11.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libexif.so.12]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libfontconfig.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000e (SONAME)             Library soname: [libgdiplus.so.0]

@805toolz

Thank you for the suggestion. It’s good to hear that issue is resolved on your end.