HTML to PDF Conversion not finishing in Docker container

Dear Syncfusion-Team,


Short description of the problem:

We are currently trying to convert html to pdf inside a docker container. Our problem is, that the convert method never returns/finishes.

Conversion on the host machine (Windows x64) is working flawlessly (-> I guess it's a Linux/Docker config. error?).


Detail:

We are using the Webkit-Engine to render the html. Conversion is initiated as follows:

Line 34 never returns one called.


The dockerfile installs all required dependencies as stated here:
https://help.syncfusion.com/file-formats/pdf/convert-html-to-pdf/webkit#prerequisites-for-linux

QtBinaries should be fine as well as there is no Exception thrown.


Once conversion is initiated there are several files created inside the tmp folder (first ls pre-convert, second ls post-convert):

I guess the xvfb process never finishes?


Any help would be much appreciated.


3 Replies 1 reply marked as answer

GK Gowthamraj Kumar Syncfusion Team November 2, 2020 11:02 AM UTC

Hi Peter, 

Thank you for using Syncfusion products. 

We have tried to reproduce the reported issue in our end, but it is working properly. We have created a sample for converting HTML to PDF in Linux Docker container, it generates a PDF document properly. We were not able to reproduce the issue and we have shared the sample and output document for your reference. Kindly please run the sample in your end and let us know the result. 
 

Please refer to this below link for converting HTML to PDF in Linux docker container. 

However, kindly provide the read/write/execute permission for Syncfusion.WebKitWrapper file inside the QtBinariesLinux folder and temp folder on the machine. You can also set the read, write and execute permissions in the DockerFile and let us know the result. Please add the below chmod command in your DockerFile,  

RUN chmod a+rwx -R /usr/bin/xvfb-run 

Note: Please make sure have you set the copy always to your input file in your project, otherwise the input file will not be copied to docker. However, we can cross-check the sample by trying the URL to PDF conversion in your end.    

If still you are facing the same issue, kindly share the complete docker file, modified sample, complete HTML file, Environment details (OS, bit version, culture settings, etc.,) to reproduce the issue on our side. So, that it will be helpful for us to analyze and assist you further on this.   

Regards, 
Gowthamraj K 


Marked as answer

PS Peter Siegel November 12, 2020 03:07 PM UTC

Thank you for your quick reply.

We performed some more testing and figured out, that the problem probably roots from some kind of HTTP-Timeout when rendering the HTML inside a docker container.
If we feed a HTML-File including no external sources the rendering-task suceeds.

This problem also occurs using the demo-project provided by you.

I will try to create some generic test-file which includes external sources and attach it to an upcoming reply.



GK Gowthamraj Kumar Syncfusion Team November 13, 2020 01:38 PM UTC

Hi Peter, 

Thank you for your update. We will wait to hear from you. 

Also, please try the simple URL to PDF conversion in your application and let us know the result. 
  
Kindly please more details such as complete Linux docker file, modified sample, complete HTML file, Docker environment details (OS, bit version, culture settings, etc.,) to reproduce the issue in our side. So, that it will be helpful for us to analyze and assist you further on this.     

Regards, 
Gowthamraj K 


Loader.
Up arrow icon