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 Nov 23, 2023 2:35 pm

Hi Team,

Unable to convert specific pdf file to HTML file. please find the following pdf file for your reference.

Thanks in adv.
Arun.

ceipalAdmin
 
Posts: 92
Joined: Mon Apr 22, 2019 6:31 am

Fri Nov 24, 2023 6:46 am

Hi,

Thank you for your inquiry.
I created a console project with .NetFrameWork4.8 and used the latest version of Spire.Office for .Net 8.11.0 to test the following code, and encountered a error (System NullReferenceException: 'The object reference was not set to an instance of the object.' ). Is your error and code the same as mine? If it is the same, please offer the following information to help us do further investigation. If it is different, please provide an additional copy of your error information or screenshot of the error, you can attach here. Thank you in advance.
Code: Select all
 
            // Create a new PdfDocument object
            PdfDocument pdf = new PdfDocument();

            // Load the PDF file from the specified path
            pdf.LoadFromFile(@"..\17007489Shi_Pras_Resume_Tech_Lead_PHP.pdf");

            // Save the PDF content to an HTML file with the specified format
            pdf.SaveToFile(@"..\ToHtml1.html", FileFormat.HTML);

            // Dispose the PdfDocument object to release resources
            pdf.Dispose();

1)Your full test code that can reproduce your issue.
2)Application type, such as Console App, .NET Framework 4.8.
3)Your test environment, such as OS info (E.g. Windows 7, 64-bit).

Sincerely,
Ula
E-iceblue support team
User avatar

Ula.wang
 
Posts: 282
Joined: Mon Aug 07, 2023 1:38 am

Return to Spire.PDF

cron