Do you have any API to convert PDF to html

Is it possible to preserver font styles and alignment, Anchor tags while converting PDF to html.

Please let us know if you have any API's. Thank you

7 Replies 1 reply marked as answer

SL Sowmiya Loganathan Syncfusion Team June 17, 2020 11:05 AM UTC

Hi Mahesh,   
 
Thank you for contacting Syncfusion support.   
 
We can able to convert PDF to HTML files with use of XPDF (open source viewer library of PDF document). Please refer the below link for more details,   
 
Regards,  
Sowmiya Loganathan    


Marked as answer

AG Anthony Griggs September 20, 2022 12:53 PM UTC

Where do we get the required assemblies? They are not available via NuGet.



GK Gowthamraj Kumar Syncfusion Team September 21, 2022 09:18 AM UTC

Hi Anthony Griggs,


We did not include the assemblies (Syncfusion.PdfToHtmlConverter.OPX.dll and Syncfusion.PdfToHtmlWrapper.dll) for PDF to HTML conversion in nuget.org. We have created a sample for converting PDF to HTML file using PdfToHtmlConverter, HTML file is generated properly. We have attached the sample with assemblies and output document for your reference, please try the sample on your end and let us know the result.


Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/PdfToHtmlOPX-2033150245
Document:
https://www.syncfusion.com/downloads/support/directtrac/general/ze/Output-807771905


Please find the below documentation details,
https://www.syncfusion.com/products/opx/xpdf


Please find the assemblies (Syncfusion.PdfToHtmlConverter.OPX.dll and Syncfusion.PdfToHtmlWrapper.dll) download link from below,  

https://www.syncfusion.com/downloads/support/directtrac/general/ze/Assemblies-1533584496


Kindly try with the above assemblies and let us if you need any further assistance on this.  


Regards,

Gowthamraj K



PG Peter Groft January 9, 2023 05:42 AM UTC

Steps to turn a PDF into a web page.

  1. Open the file you want to convert in your PDF editor.
  2. Select the Create & Edit button on the right-side toolbar.
  3. Click Export PDF at the top of the window.
  4. Choose HTML Web Page and select your options.
  5. Click Export and choose the folder where you want to save your new page.

Greetings,

Peter



IJ Irfana Jaffer Sadhik Syncfusion Team January 10, 2023 07:16 AM UTC

Thanks for providing your suggestions. 



LQ Lý Quang Tùng October 4, 2024 08:11 AM UTC

https://www.syncfusion.com/forums/155252/do-you-have-any-api-to-convert-pdf-to-html?reply=SfEnYJ

I try down the sample and run. But the dependency have been outdate, I cannot restore 2 package is Syncfusion.Compress.Base and Syncfusion.Pdf.Base.

I try to create new project install Syncfusion.Pdf.Net.Core package then reference 2 assembly file from sample but still not working. The error I received is:

Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Syncfusion.PdfToHtmlConverter.OPX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

File name: 'Syncfusion.PdfToHtmlConverter.OPX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'

   at Program.<Main>$(String[] args)


Did anyone have any idea why? I suspect that in the dll have reference to old version unsupported package 




AM Arumugam Muppidathi Syncfusion Team October 7, 2024 01:59 PM UTC

Hi Lý Quang Tùng,


Thank you for reaching out to Syncfusion support

We have checked your issue on our end. Upon further analysis,  The package Syncfusion.PdfToHtmlConverter.OPX is a base package and you are trying to add Syncfusion.Pdf.Net.Core package it seems, which is a core package.  So the conversion is failed. Currently, we don't have support to perform PDF to HTML conversion in .NET Core application.  We have support PDF to HTML conversion only in the. Net framework.

 

We kindly request you to create .NET Framework application and perform PDF to HTML conversion.  You can get the below assemblies in the following link

Syncfusion.PdfToHtmlConverter.OPX.

Syncfusion.PdfToHtmlWrapper. 

 

http://www.syncfusion.com/downloads/support/directtrac/general/ze/PdfToHtmlOPX1940268788

 

Additionally, please refer the below documentation to perform PDF to HTML conversion
https://support.syncfusion.com/kb/article/12389/how-to-convert-pdf-to-html-using-c?isInternalRefresh=False

 

Please try the above solution and let us know the result. Kindly get back to us if you need any further assistance.


Regards,
Arumugam M


Loader.
Up arrow icon