When trying to create a pdf it is generating an exception on the platform I use netcore 3.0 on ubuntu20.04 server.
I see that it marks it when trying to do the PdfDocument document = htmlConverter.Convert(url);
Hi Dan padilla,
Our WebKit rendering engine internally makes use of the Syncfusion WebKitWrapper file for converting HTML to PDF. It requires read/write/execute permission in order to perform the conversion. We suspect that the file does not have the required permission. 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 and let us know the result. Can you please add the below command to your machine and try the conversion.
|
chmod 777 /app/QtBinaries/QtBinariesLinux/Syncfusion.WebKitWrapper |
|
chmod a+rwx -R /usr/bin/xvfb-run |
The reported exception may also occur due to missing prerequisites and dependent packages, kindly ensure that all the dependent packages are installed in the machine.
Please refer to the below link for dependency packages for converting HTML to PDF in Linux.
Prerequisites: https://help.syncfusion.com/file-formats/pdf/convert-html-to-pdf/webkit#prerequisites-for-linux
Troubleshooting - https://help.syncfusion.com/file-formats/pdf/converting-html-to-pdf#troubleshooting
KB: https://www.syncfusion.com/kb/8481/how-to-convert-html-to-pdf-in-asp-net-core-linux
Kindly provide the read/write/execute permission for Syncfusion.WebKitWrapper file inside the QtBinariesLinux folder on the machine. Please refer to the below KB documentation,
Please let us know if you need any further assistance in this.
Regards,
Gowthamraj K
yes, I already had it working correctly.
Only this error just started throwing at me this week.
I tried what you mentioned but it didn't work :(
Hi Dan,
Could you please try the below troubleshooting steps to overcome this issue on our end.
Regards,
Gowthamraj K
didn't work,
I reconfigured another server equal to the productive Ubuntu 20.04.4 LTS (GNU/Linux 5.13.0-1025-aws x86_64) and the same thing happens.
Already replace References.
Change the permissions.
Also pkill Xvfb.
Reinstall all https://help.syncfusion.com/file-formats/pdf/convert-html-to-pdf/webkit#prerequisites-for-linux
It keeps throwing on the new server Syncfusion.Pdf.PdfException: xvfb-run: error: Xvfb failed to start
Hi Dan
padilla
Currently, we are trying to reproducing the reported issue
in a same environment machine on our end and we will update the further details
on June 2nd 2022.
Meanwhile, we request you to share the complete code snippet, Linux environment details to replicate the issue on our end. So that it will helpful for us.
Regards,
Gowthamraj K
I attach a screenshot of the example code.
this is the method that builds the pdf receives a website url to convert it to pdf
Hi Dan padilla,
We have created a same Ubuntu 20.04 environment and ensure the HTML
to PDF conversion using Net Core 3.1 application, but it is working properly. We
have attached the sample for your reference, please try the sample on your end
and let us know the result.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/HtmlToPdfSampleMVC1615834384
Please refer to the below link for dependency packages for converting HTML to PDF in Linux.
UG: https://help.syncfusion.com/file-formats/pdf/convert-html-to-pdf/webkit#prerequisites-for-linux
Please try to install the commands in your server machine.
|
sudo apt-get update sudo apt-get install xvfb sudo apt-get install libssl-dev sudo apt-get install libx11-dev libx11-xcb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-render0-dev libxcb-shm0-dev libxcb-util0-dev libxcb-xfixes0-dev libxcb-xkb-dev libxcb1-dev libxfixes-dev libxrandr-dev libxrender-dev |
Regards,
Gowthamraj K