Convert PDF Files to HTML
This sample illustrates how to convert a PDF into a HTML page.
Solid Framework has supported a PdfToHtmlConverter class for many years. This class provides a very simple mechanism for creating HTML from a PDF, and creates HTML that is “re-flowed” which is ideal for reading the PDF on a small device. However “re-flowed” HTML pages do not look the same as the original PDF since the order of some elements may have been modified.
This sample builds the HTML using the Core Model rather than using the PdfToHtmlConverter class. This allows the fine tuning of the conversion process and creates an HTML page that is visually similar to the original PDF.
To use the sample:
- Download a license from solidframework.net.
- Download the latest version of SolidFramework.dll.
- Download the sample PdfToHtml sample code which is a zip file.
- Extract the contents of the zip file.
- Copy the SolidFramework.dll that you downloaded and your license.xml file into the project folder (the folder that contains PdfToHtml.csproj).

- The solution should then build successfully.
- An example PDF file for conversion (brewpub.pdf) is stored in the Examples folder in the project folder. The sample converts this file by default.
- Run the project.
- Running the sample will then create an HTML file (brewpub.html) and a brewpub-content folder in the Examples folder.
