BCL easyConverter SDK
easyConverter SDK Usermanual
PDF-to-HTML Programming API  |  Download Free Trial  |  Contact Us to Purchase

ConvertToHTML2 Method

Convert a PDF document to an Array containing HTML stream, image streams and image file name streams as they are referenced from HTML. Method ignores AbsolutePositioning property.

Function ConvertToHTML2(InputFileName As String,
                        [Password] As Variant,
                        [From] As Variant,
                        [To] As Variant)
                        As Variant



Input file name in absolute path format.

Password (optional)

Password to open the PDF document if any.

From (optional)

The starting page number to convert.

To (optional)

The ending page number to convert.

Return Values

Array of streams. Array has 1 + 2N elements, where N is the number of images referenced in the HTML document. First stream in the array contains HTML code. Second contains the name of the first image referenced in the HTML (if exists). Third contains image data for the first image, and etc...

Exception Handling

Please refer to the list of return exceptions.

Example Usage in C#

PDF2HTML oConverter = new PDF2HTML();
Array data = oConverter.ConvertToHTML2(InputFileName);
File.WriteAllBytes(HtmlFileName, (byte[])data.GetValue(0));
for (int i = 1; i < data.Length - 1; i+=2)
     File.WriteAllBytes(HtmlFilePath + Text.Encoding.ASCII.GetString((byte[])data.GetValue(i)), (byte[])data.GetValue(i+1));