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.

Thu Aug 30, 2018 7:14 am

Hey guys, I've been waiting for Spire.PDF to have .net Core support and finally it does thankyou!
I installed version 4.8.14 through the nuGet package manager in Visual Studio and all seems ok.

However, I'm not quite sure how to convert a html string to a pdf document anymore.

Normally I would just use the following code, however LoadFromHTML is no longer a method that is available on the PdfDocument.

Code: Select all
         Spire.Pdf.PdfDocument doc = new Spire.Pdf.PdfDocument();

         Thread thread = new Thread(() =>
         {
            doc.LoadFromHTML(html, false, true, true);
         });
         thread.SetApartmentState(ApartmentState.STA);
         thread.Start();
         thread.Join();

         //Save pdf file.
         doc.SaveToFile("sample.pdf");
         doc.Close();


Is there a new way to do this or am I missing something?
Is this now a "paid for" method only perhaps?

TrentF
 
Posts: 2
Joined: Tue May 29, 2018 6:39 am

Thu Aug 30, 2018 8:33 am

Dear Trent,

Thanks for your inquiry.
Sorry that our Spire.Pdf doesn't support converting HTML to PDF on .NET Core at present. We will consider adding it as a new feature into our upgrade list. If it can be achieved in the future, we will let you know.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1182
Joined: Tue Sep 27, 2016 1:06 am

Thu Aug 30, 2018 12:35 pm

Thanks Nina. Appreciate the response :)

TrentF
 
Posts: 2
Joined: Tue May 29, 2018 6:39 am

Wed Aug 07, 2019 9:44 am

Hi,

Glad to inform you that we released Spire.PDF Pack(Hot Fix) Version:5.8.2 which supports converting HTML to PDF with plugin on .NET Core. Please download the hotfix from the following link.
Our website link: https://www.e-iceblue.com/Download/download-pdf-for-net-now.html
NuGet link: https://www.nuget.org/packages/Spire.PDF/

Please refer to following tutorials to convert HTML to PDF with plugin:
https://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/Convert-HTML-to-PDF-with-New-Plugin.html

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1182
Joined: Tue Sep 27, 2016 1:06 am

Return to Spire.PDF