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

Free Support Forum - aspose.com

Issue during converting PDF file with handwritten text to a set of PNG files on Linux system

There is a problem during converting PDF file with handwritten text to a set of PNG files on Linux system.
Everything works fine on Windows system, but on Linux system there are some PDF files that are being converted to a BLACK image.

Aspose.PDF 20.1.0
.NET Core 3.0

The following commands were used to deploy the code
docker pull mcr.microsoft.com/dotnet/core/sdk:3.0.100-bionic
docker run -itd -v d:/myapp:/myapp --name aspose-test mcr.microsoft.com/dotnet/core/sdk:3.0.100-bionic /bin/bash
docker start -i aspose-test

apt update
apt install -y fontconfig
apt install -y libgdiplus
apt install -y --no-install-recommends libc6-dev
cd myapp
dotnet publish -c Release
dotnet /myapp/bin/Release/netcoreapp3.0/publish/AsposeTest.dll

The following code was used for this converting (it’ written in C#):

private static void TestPdf_1(string file)
{
using var converter = new AsposePdfConverter();

converter.BindPdf($"TestData/{file}");
converter.DoConvert();

converter.StartPage = 1;
converter.EndPage = 4;

Directory.CreateDirectory("Result");

int resolution = 150;
double coef = resolution / 72.0;

Resolution asposeResolution = new Resolution(resolution);
converter.Resolution = asposeResolution;

var page = converter.Document.Pages[1];

int width = (int)(page.Rect.Width * coef);
int height = (int)(page.Rect.Height * coef);

string dstFileName = $"Result/{file}_{DateTime.UtcNow:yyyy-MM-dd_hh_mm_ss}.png";
converter.GetNextImage(dstFileName, System.Drawing.Imaging.ImageFormat.Png, width, height, 75);

}

image.png (47.9 KB)

image.png (361 Bytes)

@Jasneet_Kaur

Thanks for contacting support.

Would you kindly share your sample source PDF document with us. Also, please try using the program with .NET Core 2.0/2.1 before sharing the PDF document and let us know about the results.

pdf.pdf (109.2 KB)

We are using .Net core 3.0.
But, we tried with 2.0/2.1 as well and it did not work.
Attached is the pdf file which we are using.
Request your help here.

@Jasneet_Kaur

Thanks for sharing your feedback.

The issue you are facing needs to be investigation and for the purpose, it has been logged in our issue tracking system under the ticket ID PDFNET-47650. We will further look into details of it and keep you posted with the status of its resolution. Please be patient and spare us little time.

We are sorry for the inconvenience.

Please let us know for any updates on ticket ID PDFNET-47650

@Jasneet_Kaur

The issue has recently been logged in our issue management system and is pending for analysis. Since it has been logged under free support model, it has low priority and will be investigated on a first come first serve basis. We will surely inform you as soon as we have some definite updates regarding its rectification. Please spare us some time.

We are sorry for the inconvenience.