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

AbsolutePositioning Property

Set the option to create HTML file using absolutely positioned textboxes.

The following properties are completely ignored when AbsolutePositioning = True: ConnectHyphens, HTMLTitle, ImageFormat, ImageResolution, OcrOption, SymbolFontToUnicode.

bool AbsolutePositioning { set; }
Property AbsolutePositioning As Bool
def setAbsolutePositioning(self, newVal)
void setAbsolutePositioning(boolean newVal) throws PDF2HTMLException
function setAbsolutePositioning($newVal)
BCL_BOOL AbsolutePositioning;
Sub AbsolutePositioning(newVal As Bool)
beconvh.exe -method flow|absolute

Parameters

newVal

True - Use textboxes (absolute positioning)
False - Do not use textboxes (naturally flow the text)

Feature Matrix

Depending on the value of the AbsolutePositioning property, certain features are not usable. Here is a chart that indicates which properties and metgods are implemented for flow text versus absolute positioning.

AbsolutePositioning
False True
ConnectHyphens Yes No
FileConversionTimeOut Yes No
HTMLTitle Yes No
ImageFormat Yes No
ImageResolution Yes No
JpegQuality Yes Yes
LicenseKey Yes Yes
NumberOfPages Yes Yes
OcrOption Yes No
SimpleLists Yes No
SymbolFontToUnicode Yes No
ConvertToHTML Yes Yes
ConvertToHTML2 Yes Yes
ConvertToHTML3 Yes Yes

Exception Handling

Please refer to the list of return exceptions.

Example Usage

using BCL.easyConverter.HTML;
...
PDF2HTML pdf2html = new PDF2HTML();
try
{
   pdf2html.AbsolutePositioning = true; // use absolutely positioned textboxes
   pdf2html.ConvertToHTML(@"c:\temp\input.pdf", @"c:\temp\output.html");
}
catch(PDF2HTMLException ex)
{
   Console.WriteLine(ex.Message);
}
finally
{
   pdf2html.Dispose();
}
Imports BCL.easyConverter.HTML
...
Dim pdf2html As New PDF2HTML()
Try
   pdf2html.AbsolutePositioning = True ' use absolutely positioned textboxes
   pdf2html.ConvertToHTML("c:\test\input.pdf", "c:\test\output.html")
Catch ex As PDF2HTMLException
   System.Console.WriteLine(ex.Message)
Finally
   pdf2html.Dispose()
End Try
import PDF2HTML
pdf2html = PDF2HTML.PDF2HTML()
try:
   pdf2html.setAbsolutePositioning(True) # use absolutely positioned textboxes
   pdf2html.ConvertToHTML("c:\\test\\input.pdf", "c:\\test\\output.html")
except PDF2HTML.PDF2HTMLException as ex:
   print(ex)
PDF2HTML pdf2html = new PDF2HTML();
try
{
   pdf2html.setAbsolutePositioning(true); // use absolutely positioned textboxes
   pdf2html.ConvertToHTML("c:\\temp\\input.pdf", "c:\\temp\\output.html", "", 0, -1);
}
catch(PDF2HTMLException e)
{
   System.out.println(e);
}
finally
{
   pdf2html.dispose();
}
<?php
require("PDF2HTML.php");
$pdf2html = new BCL\easyConverter\HTML\PDF2HTML();
try
{
   $pdf2html->setAbsolutePositioning(true); // use absolutely positioned textboxes
   $pdf2html->ConvertToHTML("c:\\test\\input.pdf", "c:\\test\\output.html");
}
catch(BCL\easyConverter\HTML\PDF2HTMLException $ex)
{
   echo $ex->getMessage(), "\n";
}
?>
#include <stdio.h>
#include <windows.h>
#include "easyConverterHTML.h"

int main()
{
   HMODULE hPdf2HtmlDll = LoadLibraryW(L"C:\\Program Files\\BCL Technologies\\easyConverter SDK 5\\Html\\easyConverterHTML.dll");
   if(!hPdf2HtmlDll)
   {
      printf("easyConverter could not be loaded.\n");
      return 1;
   }
   else
   {
      BclWdhrError error;
      BclPDF2HTML* pPdf2Html = CreatePDF2HTML(hPdf2HtmlDll);
      if(!pPdf2Html)
      {
         printf("easyConverter could not be initialized.\n");
         FreeLibrary(hPdf2HtmlDll);
         return 1;
      }
      pPdf2Html->AbsolutePositioning = BCL_TRUE; // use absolutely positioned textboxes
      error = pPdf2Html->ConvertToHTML(pPdf2Html, L"c:\\test\\input.pdf", L"c:\\test\\output.html", L"", 0, -1);
      if(error)
      {
         printf("Conversion failed with error %d.\n", error);
         FreeLibrary(hPdf2HtmlDll);
         return 1;
      }
      pPdf2Html->Dispose(pPdf2Html);
      FreeLibrary(hPdf2HtmlDll);
      return 0;
   }
}
oConverter = CreateObject("EasyConverter.PDF2HTML.5")
' Set the option to create HTML file using absolutely positioned textboxes
oConverter.AbsolutePositioning = True
Call oConverter.ConvertToHTML(inFileName, outFileName)
set beconvh="C:\Program Files\BCL Technologies\easyConverter SDK 5\Html\beconvh.exe"
REM Set the option to create HTML file using absolutely positioned textboxes
%beconvh% -method absolute -i "c:\test\input.pdf" -o "c:\test\output.html"