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.

Tue Jan 24, 2023 6:16 am

Hello,

Thank you for your follow-up.
We are now having our Spring Festival holiday from 21/01/2023 to 27/01/2023 (GMT+8:00), we cannot query the status of the issue. Once we get back to the office on 28/01/2023, I will inform you of the status of this issue ASAP. Sorry for the inconvenience caused by us and we appreciate your understanding.

Sincerely,
Annika
E-iceblue support team
User avatar

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

Sat Jan 28, 2023 2:06 am

Hello,

Thank you for your follow-up.
I have checked the issue status, and I'm sorry that the issue SPIREPDF-5645 has not been resolved completely due to its complexity. In any case, I have asked our developers to fix it ASAP. Please spare us more time. If there is any update, I will inform you in time. We apologize for the inconvenience caused.

Sincerely,
Annika
E-iceblue support team
User avatar

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

Mon Jan 30, 2023 3:31 pm

Its been around 2months since we are waiting for the solutions, and our productivity is more damaged due to we are not implementing this functionality to the market. please fix the issue ASAP.

ceipalAdmin
 
Posts: 92
Joined: Mon Apr 22, 2019 6:31 am

Tue Jan 31, 2023 10:00 am

Hello,

Thanks for your following-up.
After extensive testing and investigation, on the desktop version of Ubuntu 20.04, the converted PDF file is available when the ASP NET5.0 project is executed to convert HTML code to PDF file. If you convert the content of “URL” to PDF file, the converted PDF file may have been placed in the temporary folder (such as “/tmp”). Therefore, if you convert the content of “URL” to PDF file, you can check whether the converted PDF file is in the temporary folder.
In addition, please follow the steps below to check your test environment:

1) Please use the QT plugin downloaded from our website(https://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/Convert-HTML-to-PDF-with-New-Plugin.html)

2) Please open the terminal in the QT plugin folder and use the instruction(ldd Html2Pdf) in linux to check whether the relevant dependencies are installed, if you can get these message (as show in the screenshot1 below) after execute the instruction, this means that the dependencies are installed correctly.

3) Please check whether the two files are granted execution permission(as show in the screenshot2 below).

4) If you use the server of Ubuntu 20.04, you need to install Xvfb (apt-get install Xvfb), then use the Xvfb to execute your project (such as “xvfb-run dotnet HtmltoPdf”, the HtmltoPdf is the name of test project).

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Wed Feb 08, 2023 12:52 pm

Hi Team,

We have gone through the suggested approach & all possible ways but no luck. Could you get into a call to sort out this issue?

It's effecting our R&D and ultimately we are not able make this feature live. So, please keep this on high priority and help us in resolving the issue. Please let me know if you need any more details to proceed further.

Thanks,
Arun

ceipalAdmin
 
Posts: 92
Joined: Mon Apr 22, 2019 6:31 am

Thu Feb 09, 2023 10:04 am

Hello,

Thanks for your feedback.
I have some information to add:
1) For making sure that the QT plugin has adequate permissions, please set the folder permissions for the QT “plugin” to 775(chmod -R 775 plugins).
2) Please enter the QT plugins foleder, then execute the echo "< p > test text < / p >" |. / Html2Pdf "placeholder". The output PDF "800" 600 0 0 0 0 1 to see whether the exceptions throw, generally throw exceptions that xxx dependencies cannot be found. If no exceptions are thrown, you will find the result pdf file in QT plugin folder, it also means that the QT plugin can convert html to Pdf file on this linux. Therefore, there may be other reasons for not converting Html to Pdf file properly, such as code issue, QT plugin lack of permissions, and so on. To help us check whether it is a code issue, you can share your test project that can reproduce your issue, you could upload your test project file via Dropbox or OneDrive server, then share us with the download link.

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Fri Feb 10, 2023 2:27 pm

Hi Team,

As requested, here we are sharing the project code & exception details for your reference. Please download the project code from the following URL
"https://ceipalemailverifycom-my.sharepoint.com/:f:/g/personal/amar_c_ceipalemailverify_com/EuPUALPkeB1Ks-kQ_W2mUc0BwF9_yatOQuTQe9YroMROfQ?e=Yay0cB".

Exception details:

root@naukri-linux:~/plugins# echo "< p > test text < / p >" | ./Html2Pdf "placeholder". The output PDF "800" 600 0 0 0 0 1
QFactoryLoader::QFactoryLoader() checking directory path "/root/plugins/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/root/plugins/plugins/platforms/libqxcb.so"
Found metadata in lib /root/plugins/plugins/platforms/libqxcb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"xcb"
]
},
"archreq": 0,
"className": "QXcbIntegrationPlugin",
"debug": false,
"version": 331264
}


Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/root/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/root/plugins/platforms/qwindows.dll"
QElfParser: '/root/plugins/platforms/qwindows.dll' is not an ELF object
"'/root/plugins/platforms/qwindows.dll' is not an ELF object"
not a plugin
loaded library "/root/plugins/plugins/platforms/libqxcb.so"
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

Aborted (core dumped)

Also, we have tried all possible ways to reinstall the QT plugin & xcb but no luck.

Please suggest the approach to proceed further.

Thanks,
Arun

ceipalAdmin
 
Posts: 92
Joined: Mon Apr 22, 2019 6:31 am

Mon Feb 13, 2023 10:27 am

Hello,

Thanks for your feedback.
We will use your project code to test in our system and update you about the progress accordingly.
At the same time, since the plugin method used the third-party HtmlConverter.QT, it has much dependencies on the system internal environment. We suggest that you try to use docker to do the conversion. Here, I a sample demo, after you unzip it, you will find a “readme.txt” file, please refer to its’ steps to test on your side.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1533
Joined: Wed Apr 25, 2018 3:20 am

Wed Feb 15, 2023 6:36 am

Team,

We have gone through the suggested docker approach also & all possible ways but no luck. Could you get into a call to sort out this issue?

Thanks!
Arun.

ceipalAdmin
 
Posts: 92
Joined: Mon Apr 22, 2019 6:31 am

Wed Feb 15, 2023 12:10 pm

Hello,

Thanks for your feedback.
Sorry, we are not Local English speaker and we could not understand the oral English well. To help us reproduce your issue and work out a solution for you, you can provide your document and code that can reproduce your problem. In addition, Skype typing also is available from us. Our Skype is iceblue.support.
In addition, I have some information to inform you:

1) I found that you use Spire.Doc in the project your provided, as shown in the screenshot below. Please kindly notice that the feature of converting html to pdf belong to Spire.Pdf, therefore, please uninstall Spire.Doc and install the latest version of Spire.Pdf through Nuget. If you use both the feature of Spire.Doc and Spire.Pdf, please uninstall Spire.Doc and install the latest version of Spire.Office through Nuget. Then please test your scenario.

1) For the docker demo my colleague Lisa provided, please open the project(HtmlToPdf.sln) through VS, then update the Spire.Pdf to the latest version and modify code in ConvertController.cs (Change a comma to an English comma, as shown in the screenshot below. Then re-run the modified project in the docker environment.If you encounter any issue, please offer the detail of exception. Thanks for your assistance in advance.

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Wed Mar 29, 2023 10:28 am

Hi Team,

We have tried all the possible scenarios and even shared the code files with your for the quick fix. But, nothing happened and still no progress on the current issue over the months. It's really killing our development resources time.

So, let's connect to discuss the issue to move forward. I would request you to connect with your technical team for resolution!

Thanks!
Arun.

ceipalAdmin
 
Posts: 92
Joined: Mon Apr 22, 2019 6:31 am

Fri Mar 31, 2023 9:58 am

Hello,

We apologize for any inconvenience this may have caused.

Based on your description, it is possible that your environment is missing some dependencies required for the Qt plugin. To help us determine if there are any missing dependencies, please navigate to the "plugin" folder and execute "ldd Html2Pdf", then send us the results so that we can determine whether there are any missing dependencies. Additionally, please verify that the following dependencies are installed: libglu1, libglib2.0-0, libasound2, libnss3-dev, libfontconfig, libegl1, and xvfb.

In addition, last time I suggested that you implement html to pdf in docker environment, what is the result.
Thank you for your patience and understanding. We are committed to resolving this issue as quickly as possible.

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Tue Apr 04, 2023 2:59 pm

Hi Support,

Here I am sharing the output of "ldd Html2Pdf"

root@naukri-linux:/var/www/build/convertdocs_linux/Linux_latest_project/plugins# ldd Html2Pdf
linux-vdso.so.1 (0x00007fff27bef000)
libQt5WebEngineWidgets.so.5 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libQt5WebEngineWidgets.so.5 (0x00007f79ac774000)
libQt5Widgets.so.5 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libQt5Widgets.so.5 (0x00007f79abf15000)
libQt5Gui.so.5 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libQt5Gui.so.5 (0x00007f79ab5fb000)
libQt5Core.so.5 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libQt5Core.so.5 (0x00007f79aae20000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f79aac34000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f79aac17000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f79aaa25000)
libQt5WebEngineCore.so.5 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libQt5WebEngineCore.so.5 (0x00007f79a31d1000)
libQt5Quick.so.5 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libQt5Quick.so.5 (0x00007f79a2aa5000)
libQt5PrintSupport.so.5 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libQt5PrintSupport.so.5 (0x00007f79a2833000)
libQt5QmlModels.so.5 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libQt5QmlModels.so.5 (0x00007f79a2599000)
libQt5WebChannel.so.5 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libQt5WebChannel.so.5 (0x00007f79a2376000)
libQt5Qml.so.5 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libQt5Qml.so.5 (0x00007f79a1d27000)
libQt5Network.so.5 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libQt5Network.so.5 (0x00007f79a197c000)
libQt5Positioning.so.5 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libQt5Positioning.so.5 (0x00007f79a16da000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f79a16b7000)
libQt5QuickWidgets.so.5 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libQt5QuickWidgets.so.5 (0x00007f79a14a2000)
libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007f79a141a000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f79a12cb000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f79a12af000)
libicui18n.so.56 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libicui18n.so.56 (0x00007f79a0e16000)
libicuuc.so.56 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libicuuc.so.56 (0x00007f79a0a5c000)
libicudata.so.56 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libicudata.so.56 (0x00007f799f079000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f799f073000)
libgthread-2.0.so.0 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libgthread-2.0.so.0 (0x00007f799ee70000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f799ed47000)
/lib64/ld-linux-x86-64.so.2 (0x00007f79acbc3000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f799ed3b000)
libsmime3.so => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libsmime3.so (0x00007f799eb0c000)
libnss3.so => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libnss3.so (0x00007f799e7c1000)
libnssutil3.so => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libnssutil3.so (0x00007f799e590000)
libplds4.so => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libplds4.so (0x00007f799e38b000)
libplc4.so => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libplc4.so (0x00007f799e185000)
libnspr4.so => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libnspr4.so (0x00007f799df43000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f799df27000)
libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f799de68000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f799de3a000)
libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f799ddf3000)
libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f799dcb6000)
libX11-xcb.so.1 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libX11-xcb.so.1 (0x00007f799dab1000)
libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f799da87000)
libXcomposite.so.1 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libXcomposite.so.1 (0x00007f799d883000)
libXcursor.so.1 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libXcursor.so.1 (0x00007f799d678000)
libXdamage.so.1 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libXdamage.so.1 (0x00007f799d474000)
libXext.so.6 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libXext.so.6 (0x00007f799d260000)
libXfixes.so.3 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libXfixes.so.3 (0x00007f799d057000)
libXi.so.6 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libXi.so.6 (0x00007f799ce46000)
libXrender.so.1 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libXrender.so.1 (0x00007f799cc3b000)
libXtst.so.6 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libXtst.so.6 (0x00007f799ca34000)
libXrandr.so.2 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libXrandr.so.2 (0x00007f799c828000)
libdbus-1.so.3 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libdbus-1.so.3 (0x00007f799c5d4000)
libasound.so.2 => /lib/x86_64-linux-gnu/libasound.so.2 (0x00007f799c4d9000)
libgssapi_krb5.so.2 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libgssapi_krb5.so.2 (0x00007f799c28b000)
libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f799c1d3000)
libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f799c19d000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f799c12a000)
libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f799c0f2000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f799c0e9000)
libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f799c0e1000)
libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f799c0d9000)
libsystemd.so.0 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libsystemd.so.0 (0x00007f799be51000)
libkrb5.so.3 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libkrb5.so.3 (0x00007f799bb76000)
libk5crypto.so.3 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libk5crypto.so.3 (0x00007f799b943000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f799b93c000)
libkrb5support.so.0 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libkrb5support.so.0 (0x00007f799b72e000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f799b714000)
liblzma.so.5 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/liblzma.so.5 (0x00007f799b4ed000)
liblz4.so.1 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/liblz4.so.1 (0x00007f799b2d0000)
libgcrypt.so.20 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libgcrypt.so.20 (0x00007f799afb2000)
libkeyutils.so.1 => /var/www/build/convertdocs_linux/Linux_latest_project/plugins/./lib/libkeyutils.so.1 (0x00007f799adab000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f799ad88000)
root@naukri-linux:/var/www/build/convertdocs_linux/Linux_latest_project/plugins#


Also, we are not going to use the docker. So, please suggest us the solutions with the above response.

Thanks,
Arun

ceipalAdmin
 
Posts: 92
Joined: Mon Apr 22, 2019 6:31 am

Thu Apr 06, 2023 10:04 am

Hello,

Thanks for your feedback.
From the information you provided, it seems that the issue is not related to missing dependencies required by the QT plugin. However, many of our clients have encountered similar issues regarding the generation of result documents. The problem is usually caused by the lack of permissions for the QT plugin or missing dependencies.

Regarding the command you previously executed(echo "< p > test text < / p >" |. / Html2Pdf "placeholder". The output PDF "800" 600 0 0 0 0 1"), please note that there was a mistake in my previous message. Please try running this new command instead and see if the error persists: "echo "<p>test text</p>" | ./Html2Pdf "placeholder" "output.pdf" 800 600 0 0 0 0 1 ".
If the issue still persists, it is likely due to insufficient permissions for the QT plugin() . And please ensure that your Ubuntu account has executable permissions for the QT plugin.

We suggest that you try implementing HTML-to-PDF conversion in a Docker environment to avoid potential permission issues.
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Thu Apr 06, 2023 2:16 pm

Hello,

We have executed the following command, but getting below issue.

root@naukri-linux:/var/www/build/convertdocs_linux/Linux_latest_project/plugins# ls
AppRun Html2Pdf LICENSE default.desktop default.png doc lib libHTMLConverter.so libHTMLConverterJava.so libexec plugins qt.conf resources translations
root@naukri-linux:/var/www/build/convertdocs_linux/Linux_latest_project/plugins# echo "< p > test text < / p >" |. / Html2Pdf "placeholder"
-bash: .: /: is a directory
root@naukri-linux:/var/www/build/convertdocs_linux/Linux_latest_project/plugins# echo "< p > test text < / p >" | ./Html2Pdf "placeholder"
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

Aborted (core dumped)
root@naukri-linux:/var/www/build/convertdocs_linux/Linux_latest_project/plugins# echo "<p>test text</p>" | ./Html2Pdf "placeholder" "output.pdf" 800 600 0 0 0 0 1
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

Thanks!
Arun

ceipalAdmin
 
Posts: 92
Joined: Mon Apr 22, 2019 6:31 am

Return to Spire.PDF

cron