easyPDF SDK Usermanual
PDF Creator Programming API  |  Download Free Trial  |  Contact Us to Purchase

WebBrowserPreference Property

Gets/Sets the HTML to PDF conversion preferences.

prnWebBrowserPreference WebBrowserPreference { get; set; }

Property WebBrowserPreference As prnWebBrowserPreference

def getWebBrowserPreference(self)
def setWebBrowserPreference(self, value)

prnWebBrowserPreference getWebBrowserPreference() throws PrinterException
void setWebBrowserPreference(prnWebBrowserPreference value) throws PrinterException

function getWebBrowserPreference() 
function setWebBrowserPreference($value) 

BclPrnResult GetWebBrowserPreference(BclPrinter* pPrinter,
                                     BclPrnWebBrowserPreference* poutVal);
BclPrnResult SetWebBrowserPreference(BclPrinter* pPrinter,
                                     BclPrnWebBrowserPreference newVal);
Property WebBrowserPreference As prnWebBrowserPreference



Default Value

PRN_IE_DIRECT_PRINT (for compatibility with easyPDF SDK 6.x)


Printer.PrintJob is the central dispatcher in the Printer SDK. It automatically detects the type of the document and forwards it to a specific print job implementation.

Originally PrintJob was fairly straightforward. For .DOC and .TXT, it used WordPrintJob. For .XLS, it chose ExcelPrintJob. For .HTML, it dispatched to IEPrintJob.

However, over time the Printer SDK grew to the point that HTML documents can be converted to PDF in multiple different ways. For example:

It makes sense to set this preference in PrintJob, which is exactly why WebBrowserPreference exists. The following choices are valid:

Note that when you are printing Outlook documents with attachments, the OutlookPrintJob.WebBrowserPreference property is considered. For example, an HTML file attached to an Outlook message can be printed in different ways.

Example Usage

Set oPrinter = CreateObject("easyPDF.Printer.8")
Set oPrintJob = oPrinter.PrintJob

oPrintJob.WebBrowserPreference = PRN_IE_EXTENDED_PRINT
oPrintJob.PrintOut "C:\test\input1.htm", "C:\test\output1.pdf" ' Same as IEExtendedPrintJob

oPrintJob.WebBrowserPreference = PRN_IE_DIRECT_PRINT
oPrintJob.PrintOut "C:\test\input2.htm", "C:\test\output2.pdf" ' Same as IEPrintJob

oPrintJob.WebBrowserPreference = PRN_IE_EXTENDED_PRINT
oPrintJob.PrintOut "C:\test\input3.msg", "C:\test\output3.pdf" ' Same as OutlookPrintJob, but HTML attachments
                                                               ' are printed via IEExtendedPrintJob