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 Jan 11, 2021 1:54 pm

I have issue when try to use Spire.Pdf.HtmlConverter.Qt.HtmlConverter.
Getting exception:
Unhandled exception. System.InvalidOperationException: The conversion provider cann't be found.
Please make sure the folder "plugins" is under the same folder of Spire.Pdf.dll. For more help, please visit below website.
.../Tutorials/Spire.PDF/Spire.PDF-Program-Guide/Convert-HTML-to-PDF-with-New-Plugin.html
at Spire.Pdf.HtmlConverter.Qt.HtmlConverter.init(String url, Boolean enableJavaScript, Int32 timeout, SizeF pageSize, PdfMargins margins)
at Spire.Pdf.HtmlConverter.Qt.HtmlConverter.Convert(String url, String fileName, Boolean enableJavaScript, Int32 timeout, SizeF pageSize, PdfMargins margins)
at Spire.Pdf.HtmlConverter.Qt.HtmlConverter.Convert(String url, String fileName, Boolean enableJavaScript, Int32 timeout, SizeF pageSize, PdfMargins margins, LoadHtmlType urlHtml)

Os is Linux Mint. Plugins directory is located under the same directory as executable directory.
When print HtmlConverter.PluginPath the result is same as executable directory.
Where should be pluings directory located?
Using Spire.Office 5.8.5 and plugin is downloaded from .../downloads/plugins/plugins-linux-x64.tar.gz.

bradjen
 
Posts: 24
Joined: Thu Jul 25, 2019 6:07 am

Tue Jan 12, 2021 6:11 am

Hello,

Thanks for your inquiry!

You can locate the plugins file as the same directory as the executable file directory.

pluginsLocation.png


Or you can refer to the following code to specify the path of the plugins file.
Code: Select all
string pluginPath = "../plugins";
Spire.Pdf.HtmlConverter.Qt.HtmlConverter.PluginPath = pluginPath;


In addition, to avoid permissions issues that are not accessible to plugins packages, please copy plugins-linux-x64.tar.gz to your Linux server and then unzip the plugin package.

If you encounter any issues related to our product in the future, just feel free to contact us.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Tue Jan 12, 2021 8:27 am

Sorry but this still not working. This is source code for test app.
Code: Select all
using System;

using Spire.Pdf.HtmlConverter.Qt;

using Spire.Pdf.HtmlConverter;

using Spire.Pdf;



namespace SpirePluginTest

{

    class Program

    {

        static void Main(string[] args)

        {
            //Spire.Pdf.HtmlConverter.Qt.HtmlConverter.PluginPath = "../plugins";

            Console.WriteLine(Spire.Pdf.HtmlConverter.Qt.HtmlConverter.PluginPath);


            Spire.Pdf.HtmlConverter.Qt.HtmlConverter.Convert("html body goes here",

                                                      "fileName.pdf",

                                                      false,

                                                      200,

                                                      new System.Drawing.SizeF(612, 792),

                                                      new Spire.Pdf.Graphics.PdfMargins(0),

                                                      LoadHtmlType.SourceCode);

        }

    }

}


And this is executable directory structure:
We have tried to change plugins path based on your suggestions. We have tried with different users and different Linux distribution but no luck.
Please help.

bradjen
 
Posts: 24
Joined: Thu Jul 25, 2019 6:07 am

Tue Jan 12, 2021 11:51 am

Hello,

Thanks for your feedback.

I have made a test on Linux Ubuntu x64 and did reproduce your issue. We will notify you as soon as we made some progress towards issue resolution.

Besides, what is your Linux operating environment?

Thanks for your patience and cooperation.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Tue Jan 12, 2021 12:25 pm

Glad to here good news!

This test application is developed on Linux Mint 19 Cinnamon x64 running on VM Box using .NET Core 3.1.
The final application will be on AlpineLinux 3.1 composed into docker image and run as container on Kubernetes platform with .NET Core 3.1.

I hope I'm from help.

bradjen
 
Posts: 24
Joined: Thu Jul 25, 2019 6:07 am

Wed Jan 13, 2021 10:16 am

Hello,

Thanks for sharing more information!

After further investigation, I found that the reason why the plugins cannot be found. It is that my Linux server installed some incorrect version of the dependent files for plugins. I executed the following code and resolved the issue.
Code: Select all
sudo apt-get install libgif-dev autoconf libtool automake build-essential gettext libglib2.0-dev libcairo2-dev libtiff-dev libexif-dev


And I also attached my whole test project, please run it on your side.

Hope this can help you, I am looking forward to your feedback!

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Wed Jan 13, 2021 1:33 pm

After running command
Code: Select all
 sudo apt-get install libgif-dev autoconf libtool automake build-essential gettext libglib2.0-dev libcairo2-dev libtiff-dev libexif-dev

and copying your test application on our Linux Mint 19 - error is gone but we can't found output.pdf. So result missing.

Installing missing libs on Alpine3.1 still not fix main error. Libs names are different on AlpineLinux and probably we need some more dependencies.
Command installing libs on AplineLinux3.1 is
Code: Select all
apk add giflib-dev autoconf libtool automake build-base gettext glib-dev cairo-dev tiff-dev libexif-dev


Please help?

bradjen
 
Posts: 24
Joined: Thu Jul 25, 2019 6:07 am

Thu Jan 14, 2021 10:57 am

Hello,

For the issue 1: I was able to generate output files in the Linux environment I tested (Ubuntu x64). Anyway, we will do an investigation to find out what causes the issue and keep you updated on it.

For the issue 2: Did you use alpine-3.1.0-x86_64.so to build your AlpineLinux 3.1 environment? I will set up a same system environment as yours to investigate this issue.

Thanks for your patience and cooperation.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Thu Jan 14, 2021 12:43 pm

Hi,

Current Alpine Version 3.12.3 (Released Dec 16, 2020).

Thanks for fast response.

bradjen
 
Posts: 24
Joined: Thu Jul 25, 2019 6:07 am

Fri Jan 15, 2021 9:25 am

Hi,

Update:
Issue 1. We have tried plugin on Debian but still no output files
Code: Select all
cat etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"


We need to found solution fast.

bradjen
 
Posts: 24
Joined: Thu Jul 25, 2019 6:07 am

Fri Jan 15, 2021 10:19 am

Hello,

Thanks for sharing more information!

For the issue that there is no output file, I have asked our development team about its progress. Because the underlying problem here is very complex, we need more time to analyze and investigate it. Please bear with us as we find a solution. We will do our best to provide a solution for you ASAP.

For the second issue, I have reproduced the issue under the Alpine Linux v3.12.3 system and logged it in our issue tracking system with the ticket SPIREPDF-3980 for further investigation.

We have given the highest priority to these issues, if there is any progress, we will keep you informed. Sorry for the inconvenience caused and thanks for your patience.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Tue Feb 02, 2021 10:56 am

Hi,

Any updates on the issue?

bradjen
 
Posts: 24
Joined: Thu Jul 25, 2019 6:07 am

Wed Feb 03, 2021 6:29 am

Hello,

Thanks for your patience.

Our Dev team is still working on your issues, sorry to tell that there is no significant progress so far. Anyway, I urged and requested them to share any possible ETA at their earliest, once there is any good news, we will notify you immediately. Sorry for the inconvenience caused.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Wed Mar 03, 2021 10:09 am

Hello,

Sorry for the long silence.

For the issue that there is no output file on Debian OS: After a further investigation by our developers, we guess that the problem may be caused by that some files under the plugins folder don't have open permission under your Linux OS. Please make sure that you are unzipping the plugins-linux-x64.tar.gz under the Linux OS and confirm the permissions of \plugins\libexec\QtWebEngineProcess and \plugins\Html2Pdf files as the following screenshots shown, and then try to convert HTML to PDF again. If the problem persists, please provide us with your whole test project. Thanks in advance.

permission1.png

permission2.png

For the issue SPIREPDF-3980, our Dev team is still working on this, once there are some good news, we will inform you ASAP. Thanks for your patience.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Return to Spire.PDF