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 Sep 18, 2020 6:36 am

I'm trying to convert html to pdf with the use of new plugin, but i keep get the error: The conversion provider cann't be found. The "plugins" folder has been placed in the same folder with the spire.pdf.dll. Below is my code.
Code: Select all
     
            string htmlCode = File.ReadAllText("C:\\Users..\\myproject\\Template.html");   
            string outputFile = "C:\\New folder\\output.pdf";
            Spire.Pdf.HtmlConverter.Qt.HtmlConverter.PluginPath = "C:\\Users\\..\\myproject\\bin";
            Spire.Pdf.HtmlConverter.Qt.HtmlConverter.Convert(htmlCode ,

            outputFile,
            //enable javascript
            true,
            //load timeout
            10 * 1000,
            //page size
            new SizeF(612, 792),
            //page margins
            new Spire.Pdf.Graphics.PdfMargins(0),
            //load from content type
            LoadHtmlType.SourceCode
            );

xiao0207
 
Posts: 45
Joined: Thu Dec 13, 2018 9:50 am

Fri Sep 18, 2020 10:46 am

Hello,

Thanks for your inquiry.
You should specify the plugin path like below. If there is still any issue, please get back to us ASAP.
Code: Select all
            //The path of the folder "plugins" is "E:\MyProjects\TestPDF\bin\Debug"
            Spire.Pdf.HtmlConverter.Qt.HtmlConverter.PluginPath = "E:\\MyProjects\\TestPDF\\bin\\Debug\\plugins";


Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Sat Sep 19, 2020 4:06 am

I had tried
Code: Select all
Spire.Pdf.HtmlConverter.Qt.HtmlConverter.PluginPath = "C:\\Users\\..\\myproject\\bin\\plugins";
but it still give me that error https://imgur.com/d7eYtZL

this is my project's directory:https://imgur.com/2rlujyz

xiao0207
 
Posts: 45
Joined: Thu Dec 13, 2018 9:50 am

Mon Sep 21, 2020 8:02 am

Hi.. rachel.lei

I have been trying on the latest Spire.Office Platinum demo too. The result is the same..
https://imgur.com/U2mzbPM

Please help...

xiao0207
 
Posts: 45
Joined: Thu Dec 13, 2018 9:50 am

Mon Sep 21, 2020 8:17 am

Hello,

Sorry for the late reply as weekend.
This is my test project for your reference, please run it directly on your side.
http://www.e-iceblue.com/downloads/demo/22842Demo.zip

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Sun Sep 27, 2020 11:23 am

Hello,

Greetings from E-iceblue!
Has your issue been resolved? Any feedback will be greatly appreciated!

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Return to Spire.PDF