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.

Fri Aug 27, 2021 3:28 pm

Hi

We are using a licenced version of Spire.PDF (version 7.8.2) in a c# .Net Core 5 application where we are converting html to pdf using Spire.Pdf.HtmlConverter.Qt;

This works fine in windows but when we put it into a linux docker container the convert method just returns an empty stream.

The issue seems to be related to this post of the name "Spire.Pdf.HtmlConverter.Qt.HtmlConverter - LinuxOs" (for some reason I'm not allowed to write URL's in this post.)

We started out with the same issues that the plugins couldn't be found and by running the update commands as suggested we got past that error but now the convert method just returns nothing without throwing any errors.

I have checked the file permissions like you also suggested in the other post.
Any ideas?

Linux OS details:

PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian

mcgammelgaard
 
Posts: 3
Joined: Fri Aug 27, 2021 1:42 pm

Mon Aug 30, 2021 10:52 am

Hi,

Thanks for your inquiry.
Our Spire.Pdf uses QT plugin to convert HTML to PDF, the QT plugin requires GUI support, while the docker has no graphical interface. So I suggest that you first install xvfb in the docker environment, then force to use the xvfb command to run your dotnet project.
sample code like :
Code: Select all
RUN xvfb-run dotnet publish -c Release -o out

If the problem still exists, please provide your dockerfile for our further investigation. You could attach it here or send to us via email ([email protected]). Thanks in advance.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Mon Aug 30, 2021 11:07 am

Hi

Thank you for your reply.
I have tried your suggestion but the error persists.
I have sent the dockerfile in question to you by email.

mcgammelgaard
 
Posts: 3
Joined: Fri Aug 27, 2021 1:42 pm

Tue Aug 31, 2021 11:19 am

Hi,

Thank you for sharing the file via email.
After testing, I found that PDF files cannot be successfully generated in docker. I have posted this issue to our developers for investigating and fixing. Once it is resolved or there is any update, I will inform you in time. Sorry for the inconvenience caused.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Thu Oct 13, 2022 5:08 pm

Hello!
Could you please provide any updates about this issue?
Thanks

polina_khari
 
Posts: 1
Joined: Thu Oct 13, 2022 5:06 pm

Mon Oct 17, 2022 1:46 am

Hello,

Thanks for following up.
Issue SPIREPDF-2694 is not currently resolved due to the complexity of the issue. Our developers are still working hard to find a workaround. I have informed our developers about your situation and asked them to resolve it as soon as possible. Please give us more time. As soon as there is any update, I will keep you informed. Sorry for the inconvenience caused again.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.PDF

cron