Convert PDF to Image using C# - The digital signature in Linux is not displayed

I have a PDF with two digital signatures in it, and now I code it to generate an image.

  • Now, I run the following code under Windows, and the resulting image will show the signature normally
  • When I run the following code under Linux, the resulting image does not show the digital signature(The Linux environment contains all Windows fonts)

Code:
string pdfPath = “test.pdf”;
string outputImagePath = “test.jpg”;
using (var fileStream = new FileStream(pdfPath, FileMode.Open, FileAccess.Read, FileShare.Read))
using (Document doc = new Document(fileStream))
{
var page = doc.Pages[0];
using (FileStream imageStream = new FileStream(outputImagePath, FileMode.Create))
{
Resolution resolution = new Resolution(100);
JpegDevice jpegDevice = new JpegDevice(resolution, 30);
jpegDevice.Process(page, imageStream);
}
}

PDF
认购.pdf (142.2 KB)

The above code generates a picture under Windows
认购.jpg (14.2 KB)

The above code generates a picture under Linux
认购.jpg (9.5 KB)

@137780739qq.com

We tested the scenario in our environment using Aspose.PDF for .NET 21.4 in MAC OS and did not notice any issue. Would you please make sure that you are using the latest version of the API and in case you still face any issue, please let us know.

I am using version 20.3 in a Linux environment.
Can you help me to verify using 20.3 in a Linux environment to see if it is a version defect?

If it is a version bug, then I will try to upgrade to 21.4 to verify and see if the problem is fixed.

If it is not a version defect, then I guess it is an environmental factor. Can you tell me the environmental factor needed to generate the digitally signed image?

Hi.
Is there any conclusion to this question?

@137780739qq.com

We have again tested the scenario in our environment using 20.3 version of the API and did not face any issue. For your kind reference, an output image is also attached.
test2.jpg (15.2 KB)

We made sure that all windows fonts are installed in the system and libgdiplus package is updated as well. Since, you already have MS fonts, you can make sure of libgdiplus package and let us know if the issue still persists.