Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Mon Mar 25, 2024 3:38 am

Hi team,
1.FreeSpire.PDF, Version=10.2.0, .net Core3.1;
2.Runs normally in Windows environment, but becomes invalid after Docker container deployment;
Code: Select all
                PdfDocument pdf = new PdfDocument();
                pdf.LoadFromStream(stream);
                PdfImageHelper helper = new PdfImageHelper();
                for (int i = 0; i < pdf.Pages.Count; i++)
                {
                      PdfImageInfo[] images = helper.GetImagesInfo(pdf.Pages[i]);
                         foreach (PdfImageInfo pdfImage in images)
                        {
                           ......
                        } 
                }

I'm sure pdf.Pages[i] is not null ,but images.Length =0(linux),images.Length =1(Windows)
Help,please~

joe.zhuang
 
Posts: 1
Joined: Mon Mar 25, 2024 3:25 am

Mon Mar 25, 2024 5:58 am

Hello,

Thanks for your inquiry.
We speculate that your issue may be caused by a lack of fonts in the Docker environment. We suggest that you install the fonts used in you pdf file to Docker first and then try again. If it still doesn't work, please provide us with your PDF file and we will further investigate. You can attch your file here, or send it via eamil([email protected]). Thank you in advance.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 732
Joined: Mon Dec 27, 2021 2:23 am

Return to Spire.PDF