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 May 18, 2020 8:13 pm

I am using C# .NET Spire.PDF to convert PDF to HTML. I am using a font called Trebuchet MS and I am having trouble getting Bold and Italic to convert correctly in the HTML. The PDF shows 3 lines of text using the same font. The 1st line is regular, 2nd line is bold, and 3rd line is italic. As you can see when the PDF to HTML conversion happens the HTML is not showing the 2nd and 3rd lines correctly.

Temp.rar


Here is my code:

Code: Select all
var document = new PdfDocument();
document.LoadFromFile(@"C:\temp\pdf.pdf");
using (var finalStream = new MemoryStream())
{
   document.SaveToStream(finalStream, FileFormat.HTML);
   var finalHtml = Encoding.UTF8.GetString(finalStream.ToArray());
   File.WriteAllText(@"C:\temp\html.html", finalHtml);
}


Please advise on solution with code fix or if there are some limitations to be aware of with this framework.

jdomsky
 
Posts: 4
Joined: Fri Jul 28, 2017 7:40 pm

Tue May 19, 2020 2:27 am

Hi,

Thanks for your inquiry.
I have reproduced your issue and logged it into our bug tracking system with the ticket SPIREPDF-3271 for further investigating. If there is any update, we will inform you. Sorry for the inconvenience caused.

Sincerely,
Sara
E-iceblue support team
User avatar

Sara.Yang
 
Posts: 33
Joined: Wed May 06, 2020 1:05 am

Tue May 19, 2020 5:01 pm

Thank you Sara. We are urgently needing this for a client deliverable in the next month. Can you please provide us a way to track this issue?

jdomsky
 
Posts: 4
Joined: Fri Jul 28, 2017 7:40 pm

Wed May 20, 2020 5:42 am

Hi,

Thanks for your feedback.
Sorry there is no way for you to track this issue directly. Anyway, I have posted your situation to our Dev team and will keep you informed if there is any update about their investigations.

Sincerely,
Sara
E-iceblue support team
User avatar

Sara.Yang
 
Posts: 33
Joined: Wed May 06, 2020 1:05 am

Thu May 28, 2020 11:30 am

Hello,

Glad to inform that we just released Spire.PDF Pack(Hot Fix) Version:6.5.15 which fixed the issue of SPIREPDF-3271, please download it from the following links to test.
Website link: https://www.e-iceblue.com/Download/down ... t-now.html
Nuget link: https://www.nuget.org/packages/Spire.PDF/

Sincerely,
Lisa
E-iceblue support team
User avatar

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

Mon Jun 01, 2020 4:37 pm

Thank you. I have recently installed the latest version of Spire.Office from NuGet but realized that the Spire.PDF is not referencing the latest version 6.5.15 which contains the hotfix from this post. (The Spire.PDF version is showing as 6.5.9). Can you please have your team resolve this issue?

jdomsky
 
Posts: 4
Joined: Fri Jul 28, 2017 7:40 pm

Tue Jun 02, 2020 9:33 am

Hello,

Thanks for your feedback.
Yes, sorry currently our latest Spire.Office 5.5.1 does not include the dlls of latest Spire.PDF version 6.5.15. The next office version will include them. Once it is available, we will let you know at the first time. Thanks for your understanding.

Sincerely,
Lisa
E-iceblue support team
User avatar

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

Tue Jun 02, 2020 1:50 pm

Can you please provide an approximate date for updating the Spire.Office NuGet package to use Spire.PDF 6.5.15? We will need to plan a production deployment in accordance to this fix.

jdomsky
 
Posts: 4
Joined: Fri Jul 28, 2017 7:40 pm

Wed Jun 03, 2020 9:08 am

Hello,

Sorry, at this moment I can’t tell you an approximate date for updating the Spire.Office NuGet package. Anyway, I have posted your situation to our Dev team and urged them. Once the next Spire.Office Nuget package is updated, I will let you know asap. Meanwhile, we prepared a temporary version(spire.office_5.6.0.zip) for you, which includes the dlls of latest Spire.PDF version 6.5.15. Please download it and reference the dlls manually to have a test firstly.

Sincerely,
Lisa
E-iceblue support team
User avatar

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

Tue Jul 14, 2020 11:59 am

Hello,

Glad to inform that we just released the official Spire.Office Platinum(Hotfix) Version:5.7.3, welcome to download it from the following links.
Website link: https://www.e-iceblue.com/Download/download-office-for-net-now.html
Nuget link: https://www.nuget.org/packages/Spire.Office/

Sincerely,
Lisa
E-iceblue support team
User avatar

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

Return to Spire.PDF