Pdf 生成图片,图像丢失

版本:aspose.pdf 21.4,
环境:linux+docker ,已经安装libgdiplus
在pdf文档生成图片的时候,图片已经生成了,但是在生成图片上面丢失了pdf文档上原有的图片.
windows 上没有问题.
在linux+docker的环境下,pdf保存到svg没问题.

code: using (var pdfDocument = new Aspose.Pdf.Document(inputFile))
{
if (pdfDocument.Pages.Count > 0)
{
RenderingOptions opts = new RenderingOptions();
opts.UseFontHinting = true;
using (FileStream imageStream = new FileStream(newFileName, FileMode.Create))
{
Resolution resolution = new Resolution(300);
PngDevice pngDevice = new PngDevice(resolution);
pngDevice.RenderingOptions = opts;
pngDevice.Process(pdfDocument.Pages[1], imageStream);
imageStream.Close();
}
}
}

test.pdf (49.2 KB)

@guoxuefeng

您能否分享在docker中安装的Linux版本详细信息?另外,请确保libgdiplus软件包是否已更新为最新版本。请分享您的回应,以便我们进一步为您提供帮助。

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai'>/etc/timezone
RUN apt-get update -y && apt-get install -y libgdiplus && apt-get clean && ln -s /usr/lib/libgdiplus.so /usr/lib/gdiplus.dll
WORKDIR /app
EXPOSE 80
COPY / .
ENTRYPOINT ["dotnet", "HSCWFileServer.dll"]

Dockerfile.zip (474 Bytes)

@guoxuefeng

我们正在检查该问题,并将尽快与您联系。

@guoxuefeng

PDFNET-50075 的调查票已记录在我们的问题跟踪系统中。我们将进一步调查其详细信息,并在解决后通知您。请耐心等待,给我们一些时间。

我们对造成的不便很抱歉。