Sei sulla pagina 1di 723

SelectPdf Html To Pdf Converter for .

NET

Welcome to Select.Pdf Html To Pdf Converter for .NET Community Edition


Select.Pdf Html To Pdf Convert for .NET - Community Edition is a subset of Select.Pdf
Library for .NET. The Community Edition is available free of charge for personal and
commercial purposes.
The current documentation is explicitly for SelectPdf Community Edition users. The
full documentation for Select.Pdf for .NET Professional is available online or in the
specific product archive that can be downloaded from http://selectpdf.com.
Select.Pdf for .NET is a professional PDF library that can be used for creating,
writing, editing, handling and reading PDF files without any external dependencies
within .NET applications. Using this .NET PDF library, you can implement rich
capabilities to create PDF files from scratch or process existing PDF documents
entirely through C#/VB.NET without installing Adobe Acrobat.
SelectPdf Html To Pdf Converter for .NET - Community Edition can be used to
generate pdf documents from any web page or html string. The main limitation of
the free version is related to the number of pages of the generated pdf document.
The Community Edition allows the generation of pdf documents up to 5 pages.

Sample Code
Coding with Select.Pdf Html To Pdf Converter is very easy. Take a look at the section
below:
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// create a new pdf document converting an url
PdfDocument doc = converter.ConvertUrl(TxtUrl.Text);
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' create a new pdf document converting an url
Dim doc As PdfDocument = converter.ConvertUrl(TxtUrl.Text)
' save pdf document
doc.Save(Response, False, "Sample.pdf")

SelectPdf Html To Pdf Converter for .NET

' close pdf document


doc.Close()

See Also
Reference
SelectPdf
Other Resources
Select.Pdf Website

SelectPdf Html To Pdf Converter for .NET

Installation
Select.Pdf Html To Pdf Converter for .NET Community Edition can be downloaded
from the product site: http://selectpdf.com/community-edition.
Select.Pdf Community Edition is shipped as a product archive with the following
structure:
Assemblies
Contains the assemblies and related files needed by SelectPdf Library for .NET.
Select.Pdf Html To Pdf Converter is shipped with different versions for CLR 2.0
(.NET 2.0, 3.5) and for CLR 4.0 (.NET 4.0 and above).
Documentation
Contains the product documentation in CHM format.
Samples
Contains C# and VB.NET samples that show how to use most of the features the
library provides.

Project Setup
To use Select.Pdf Html To Pdf Converter Community Edition in a .NET project, a
reference needs to be added to Select.HtmlToPdf.dll. Besides the .NET assembly,
an additional file (Select.Html.dep) is also needed. This needs to be manually
copied into the bin folder of the application, next to Select.HtmlToPdf.dll.
Alternatively, the path to Select.Html.dep can be specified using the
HtmlEngineFullPath property of the GlobalProperties class.

GAC Installation
If you plan to install Select.Pdf HtmlToPdf Converter into GAC, the only dll that needs
to be added to GAC is Select.HtmlToPdf.dll.
Important
In the case of GAC installation, the full path to Select.Html.dep must always be
specified in code using the HtmlEngineFullPath property of the GlobalProperties
class.

See Also
Other Resources
Licensing
License Agreement
Deployment

SelectPdf Html To Pdf Converter for .NET


Select.Pdf Website

SelectPdf Html To Pdf Converter for .NET

Licensing Select.Pdf Html To Pdf Converter


Free license
Select.Pdf Html To Pdf Converter for .NET - Community Edition is provided as a free
product that can be used for personal or commercial purposes without any
limitation.
Take a look at the End User License Agreement for licensing details.

See Also
Other Resources
License Agreement
Deployment
Select.Pdf Website

SelectPdf Html To Pdf Converter for .NET

End User License Agreement


This End-User Software License Agreement ("EULA") is a legal agreement between
you and SelectPdf for software together with all related documentation ("SOFTWARE
PRODUCT" or SOFTWARE") provided by SelectPdf. By using the SOFTWARE
PRODUCT, you agree to be bound by the terms of this End User License Agreement
("EULA").

GRANT OF LICENSE
THE SOFTWARE is licensed, not sold to you, to use only under the terms of this
license agreement. SelectPdf retains the ownership of the product source code and
reserves all the rights not expressly granted to you. SelectPdf grants you the
following rights:
COMMUNITY EDITION: The product can be used free of charge for personal or
commercial purposes without any limitation or additional approval.
Important
The Community Edition does not include any support. A maintenance plan can be
purchased if support is needed.

COPYRIGHT
THE SOFTWARE is owned by SelectPdf, and it is protected by international copyright
laws and international treaty provisions. You shall not develop/market/sell any
similar product that is based on the SOFTWARE PRODUCT, either in its original form
or thin wrapped form.

DECOMPILING, DISASSEMBLING OR REVERSE ENGINEERING


You acknowledge that THE SOFTWARE contains trade secrets and other proprietary
information of SelectPdf and its licensors. Except to the extent expressly permitted
by this Agreement or by the laws of the jurisdiction where you are located, you may
not decompile, disassemble or otherwise reverse engineer THE SOFTWARE or
engage in any other activities to obtain underlying information that is not visible to
the user in connection with normal use of THE SOFTWARE.

TERM AND TERMINATION


The license granted under this EULA will continue in force until terminated, as set
forth herein. If you fail to pay any fees related to THE SOFTWARE or any related
service, or violate any term or condition of this EULA, SelectPdf or its agent may
terminate this license immediately by giving notice of termination to you. You are
responsible for providing valid contact information to SelectPdf. If no valid contact
information is available for you in SelectPdf's records, SelectPdf is not required to
give notice of termination to you.

NO WARRANTY
ANY USE BY YOU OF THE SOFTWARE IS AT YOUR OWN RISK. THE SOFTWARE IS
PROVIDED FOR USE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR

SelectPdf Html To Pdf Converter for .NET


IMPLIED, INCLUDING, WITHOUT LIMITATION, IMPLIED WARRANTIES OR CONDITIONS
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
NONINFRINGEMENT.

LIMITATION OF LIABILITY
IN NO EVENT SHALL SELECTPDF OR ITS LICENSORS BE LIABLE FOR ANY DAMAGES
WHATSOEVER (INCLUDING, WITHOUT LIMITATION, INCIDENTAL, DIRECT, INDIRECT,
SPECIAL OR CONSEQUENTIAL DAMAGES, DAMAGES FOR LOSS OF BUSINESS
PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER
PECUNIARY LOSS) ARISING OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE,
EVEN IF SELECTPDF HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
BECAUSE SOME STATES/COUNTRIES DO NOT ALLOW THE EXCLUSION OR LIMITATION
OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE
LIMITATION MAY NOT APPLY TO YOU.

MORE INFORMATION
For more information visit Select.Pdf Website.

SelectPdf Html To Pdf Converter for .NET

Deployment
To deploy a project using Select.Pdf HtmlToPdf Converter, simply include
Select.HtmlToPdf.dll and Select.Html.dep along with your project. There are no
additional setups or configurations needed either on your server or your client's
machine.
Select.Html.dep needs to be deployed in the same folder with
Select.HtmlToPdf.dll. Alternatively, the path to Select.Html.dep can be specified
using the HtmlEngineFullPath property of the GlobalProperties class.
Important
Full trust is required on the deployment machine. SelectPdf.Pdf makes numerous
native API calls, thus it requires full trust to run.

GAC Installation
If you plan to install Select.Pdf into GAC, the only dll that needs to be added to GAC
is Select.HtmlToPdf.dll.
Important
In the case of GAC installation, the full path to Select.Html.dep must always be
specified in code using the HtmlEngineFullPath property of the GlobalProperties
class.

Deployment to a Shared Hosting Environment


If you plan to deploy Select.Pdf Html To Pdf Converter to a shared hosting
environment, please check with your hosting company whether they support full
trust. SelectPdf.Pdf makes numerous native API calls, thus it requires full trust to
run. If your hosting company cannot grant full trust to your site, you may need to
consider moving your site to a dedicated or virtual server.

Deployment to Windows Azure


If you plan to deploy Select.Pdf Html To Pdf Converter to Windows Azure, make sure
you deploy to a Cloud Service or a Virtual Machine. Due to some security
restrictions, Select.Pdf does not support Windows Azure WebSite execution mode. To
resolve the issue, you can either deploy your site to a Cloud Service or a Virtual
Machine, or isolate the PDF related feature into a separate Web Service that runs on
a different server (either on a Windows Azure Cloud Service/Virtual Machine, or a
dedicated server hosted elsewhere), then call the web service from your Windows
Azure WebSite.

See Also
Other Resources
Installation
Licensing
License Agreement
8

SelectPdf Html To Pdf Converter for .NET

SelectPdf Html To Pdf Converter for .NET

Getting Started with Html to Pdf Converter for .NET


Select.Pdf Html To Pdf Converter - Community Edition provides a powerful and easy
to use html to pdf converter that can be used in any .NET applications to generate
pdf documents from web pages and html code.
Select.Pdf Html To Pdf Converter - Community Edition provides most of the features
of the Professional Select.Pdf Library for .NET. The main limitation is related to the
number of pages of the generated pdf documents. The community edition
generates pdf documents up to 5 pages.

Quick Start
Using the Html to Pdf Converter is very easy. The first thing that needs to be done is
the namespace importing.
C#
using SelectPdf;
VB
Imports SelectPdf

Sample code that shows how to convert an url to pdf using Free Select.Pdf Html To
Pdf Converter for .NET:
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// create a new pdf document converting an url
PdfDocument doc = converter.ConvertUrl(TxtUrl.Text);
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' create a new pdf document converting an url
Dim doc As PdfDocument = converter.ConvertUrl(TxtUrl.Text)
' save pdf document
doc.Save(Response, False, "Sample.pdf")

10

SelectPdf Html To Pdf Converter for .NET


' close pdf document
doc.Close()
Sample code that shows how to convert raw html code to pdf using Free Select.Pdf
Html To Pdf Converter for .NET:
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// create a new pdf document converting the html code
PdfDocument doc = converter.ConvertHtmlString(htmlString, baseUrl);
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' create a new pdf document converting the html code
Dim doc As PdfDocument = converter.ConvertHtmlString(htmlString,
baseUrl)
' save pdf document
doc.Save(Response, False, "Sample.pdf")
' close pdf document
doc.Close()

Html to Pdf Converter Properties


Options - controls the html to pdf conversion process and the generated pdf
document properties.
Header - controls the properties of the custom header of the generated pdf
document.
Footer - controls the properties of the custom footer of the generated pdf document.
ConversionResult - offers information about the result of the html to pdf conversion
process.
These properties will be described in details in the next sections of the Developers
Guide.

11

SelectPdf Html To Pdf Converter for .NET

See Also
Reference
SelectPdf
HtmlToPdf

12

SelectPdf Html To Pdf Converter for .NET

Setting Pdf Page Properties with Html to Pdf Converter for


.NET
Select.Pdf Html to Pdf Converter can be used to control how the pdf pages look like
when the pdf document is generated from the conversion of a web page. The most
important properties of a pdf page are:

Page size

Page orientation

Page margins

Page size
SelectPdf supports the following standard page sizes:

A0 to A10

B0 to B5

ArchA to ArchE

Letter, HalfLetter, Letter11x17, Note, Flsa, Ledger

To set the page size for the html to pdf conversion, the PdfPageSize property of the
HtmlToPdfOptions object needs to be used. Pages with custom page sizes can also
be created using Select.Pdf. A custom page size can be set using the
PdfPageCustomSize property.

Page orientation
SelectPdf supports the following page orientations:

Portrait

Landscape

To set the page orientation for the html to pdf conversion, the PdfPageOrientation
property of the HtmlToPdfOptions object needs to be used.

Page margins
Page margins can be set using MarginLeft, MarginRight, MarginTop, MarginBottom
properties of the HtmlToPdfOptions object.

13

SelectPdf Html To Pdf Converter for .NET

Sample Code
This sample code shows how to use Select.Pdf html to pdf converter to convert an
url to pdf, also setting page size, orientation and margins.
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// set converter options
converter.Options.PdfPageSize = PdfPageSize.A4;
converter.Options.PdfPageOrientation = PdfPageOrientation.Portrait;
converter.Options.MarginLeft = 10;
converter.Options.MarginRight = 10;
converter.Options.MarginTop = 20;
converter.Options.MarginBottom = 20;
// create a new pdf document converting an url
PdfDocument doc = converter.ConvertUrl(url);
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' set converter options
converter.Options.PdfPageSize = PdfPageSize.A4
converter.Options.PdfPageOrientation = PdfPageOrientation.Portrait
converter.Options.MarginLeft = 10
converter.Options.MarginRight = 10
converter.Options.MarginTop = 20
converter.Options.MarginBottom = 20
' create a new pdf document converting an url
Dim doc As PdfDocument = converter.ConvertUrl(url)
' save pdf document
doc.Save(Response, False, "Sample.pdf")
' close pdf document
doc.Close()

14

SelectPdf Html To Pdf Converter for .NET

See Also
Reference
SelectPdf
HtmlToPdf
HtmlToPdfOptions

15

SelectPdf Html To Pdf Converter for .NET

Convert Url To Pdf


Using Select.Pdf Html to Pdf Converter for .NET any web page can be converted to
pdf. The web page can be specified by an external url or can be a local html file on
the disk.
To convert an url (or local file) to pdf, HtmlToPdf class exposes the
ConvertUrl(String) method.

Sample Code
This sample code shows how to use Select.Pdf html to pdf converter to convert an
url to pdf, also setting a few properties.
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// set converter options
converter.Options.PdfPageSize = pageSize;
converter.Options.PdfPageOrientation = pdfOrientation;
converter.Options.WebPageWidth = webPageWidth;
converter.Options.WebPageHeight = webPageHeight;
// create a new pdf document converting an url
PdfDocument doc = converter.ConvertUrl(url);
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' set converter options
converter.Options.PdfPageSize = pageSize
converter.Options.PdfPageOrientation = pdfOrientation
converter.Options.WebPageWidth = webPageWidth
converter.Options.WebPageHeight = webPageHeight
' create a new pdf document converting an url
Dim doc As PdfDocument = converter.ConvertUrl(url)
' save pdf document
doc.Save(Response, False, "Sample.pdf")

16

SelectPdf Html To Pdf Converter for .NET


' close pdf document
doc.Close()

See Also
Reference
SelectPdf
HtmlToPdf
HtmlToPdfOptions

17

SelectPdf Html To Pdf Converter for .NET

Convert Html Code To Pdf


Using Select.Pdf Html to Pdf Converter for .NET any html code can be converted to
pdf. Select.Pdf Library supports the latest HTML5 with CSS3 style sheets.
To convert a raw html string to pdf, HtmlToPdf class exposes the
ConvertHtmlString(String) and ConvertHtmlString(String, String) methods.
The first method, that has only the url parameter, can be used to convert html
strings that don't have external references to javascript, css files or images. In case
the html string contains references to external resources specified using relative
paths, the second method needs to be used. ConvertHtmlString(String, String)
contains an additional parameter: baseUrl. The baseUrl parameter allows the
converter to resolve relative urls. Basically, baseUrl + relative image/css url = full
absolute url.

Sample Code
This sample code shows how to use Select.Pdf html to pdf converter to convert an
html string to pdf, also setting a few properties.
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// set converter options
converter.Options.PdfPageSize = pageSize;
converter.Options.PdfPageOrientation = pdfOrientation;
converter.Options.WebPageWidth = webPageWidth;
converter.Options.WebPageHeight = webPageHeight;
// create a new pdf document converting an html string
PdfDocument doc = converter.ConvertHtmlString(htmlString, baseUrl);
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' set converter options
converter.Options.PdfPageSize = pageSize
converter.Options.PdfPageOrientation = pdfOrientation
converter.Options.WebPageWidth = webPageWidth
converter.Options.WebPageHeight = webPageHeight

18

SelectPdf Html To Pdf Converter for .NET


' create a new pdf document converting an html string
Dim doc As PdfDocument = converter.ConvertHtmlString(htmlString,
baseUrl)
' save pdf document
doc.Save(Response, False, "Sample.pdf")
' close pdf document
doc.Close()

See Also
Reference
SelectPdf
HtmlToPdf
HtmlToPdfOptions

19

SelectPdf Html To Pdf Converter for .NET

Resizing Content During Conversion with Select.Pdf Html


to Pdf Converter
Html pages that are converted to pdf and pdf pages in the generated document
usually do not have the same size. Because of that, Select.Pdf Library needs to
perform some operations on the content rendered from the web page to be able to
display it in the pdf page.

Pdf Page Size


The size of the pdf pages can be specified using PdfPageSize property of the
HtmlToPdfOptions object. More details about this in the following section: Setting Pdf
Page Properties.

Web Page Size


Select.Pdf Html to Pdf Converter has an internal browser that renders the web page
just like a regular browser. There are some properties that control how the web page
will look in the internal browser:

WebPageWidth - Gets or sets the width of the converted web page as it would
appear in the internal browser used to render the html.
The web page width is specified in pixels and the default value is 1024px. The
page width is only an indication of the minimum page width recommended
for conversion. If the content does not fit this width, the converter will
automatically resize the internal browser to fit the whole html content. To
avoid this, the WebPageFixedSize property needs to be set to true. When
WebPageFixedSize is true, the web page will be rendered with the specified
WebPageWidth and WebPageHeight even though the content might be
truncated.
If WebPageWidth is set to 0, the converter will automatically determine the
page width, finding the width that will fit the html content.
This property can also be set directly in the constructor of HtmlToPdf class.

WebPageHeight - Gets or sets the height of the converted web page as it


would appear in the internal browser used to render the html.
The web page height is specified in pixels and the default value is 0px. This
means that the converter will automatically calculate the page height.
Generally this property does not need to be changed, but there are situations
when the converter cannot calculate correctly the web page height (for
example for web pages with frames) and in that case, WebPageHeight needs
to be set, otherwise no content might appear in the generated pdf.

20

SelectPdf Html To Pdf Converter for .NET


Note: If the WebPageHeight is set, the content that exceeds this page height
is truncated and will not appear in the generated pdf document. Only using
the default 0 value will allow the whole page content to be rendered all the
time in the generated pdf document.
This property can also be set directly in the constructor of HtmlToPdf class.

WebPageFixedSize - Controls whether the web page is rendered with a fixed


size internal browser or the size automatically extends to make the whole
content visible.
The default value of this property is false.
If the web page does not fit the dimensions specified by the WebPageWidth
and WebPageHeight properties and WebPageFixedSize is set to false, the
converter will try to automatically calculate a larger width and height to be
able to display the whole html content.
If WebPageFixedSize is set to true, this will indicate the converter not to
calculate another width and height, but use width and height specified by
WebPageWidth and WebPageHeight. These dimensions with be used even
though the content will not fit the available space and it will be truncated.
Note: If WebPageFixedSize is set to true, a page height needs to be set using
WebPageHeight, because the default value (0) will make the converter fail
(cannot render a web page with no height).

Content Resizing
Because a web page has generally a different width compared with a standard pdf
page, the content will not fit perfectly when the web page content is rendered into
pdf. As an example, most web sites are optimized for browsers with page widths of
at least 1024px or 1280px. A standard A4 page has 595 x 842 points. 1 point is 1/72
inch. 1 pixel is 1/96 inch. This means that an A4 page width is 793px. Because the
web page width (1024px or more) is larger than this pdf page width, when the
content is rendered into pdf, it will either get trucated or it needs to be resized
(shrinked) to fit the pdf page width.
Select.Pdf Html to Pdf Converter has a few properties that control how the content
from the web page is resized during the rendering into the pdf document:

AutoFitWidth - Specifies the html content horizontal auto fit mode.


The converter considers both AutoFitWidth and AutoFitHeight when the html
content is rendered in the pdf page or specified rectangle.
If this property is set to NoAdjustment, the html content is not resized
horizontally in any way to fit the available space. If the content is larger, it
will be cut and not all of it will be displayed in the generated pdf file.

21

SelectPdf Html To Pdf Converter for .NET


If this property is set to ShrinkOnly, the html content is resized only if the
content width is larger than the destination space (pdf page or rectangle)
width. In this case, the content is shrunk to fit the destination space width
and the elements that it contains (texts, images) will appear smaller in the
generated pdf document than in the original web page. If the original content
width is smaller than the destination width, no adjustments will be done and
the content will be rendered exactly as it is, even though some additional
white space might appear to its right.
If this property is set to AutoFit, the html content is resized to fit the available
width of the destination space. If the original content width is smaller than
the destination width, the elements rendered (texts, images) will appear
larger in the generated pdf document. If the original content width is larger
than the destination width, the elements rendered (texts, images) will appear
smaller in the generated pdf document.
The default value of this property is ShrinkOnly.

AutoFitHeight - Specifies the html content vertical auto fit mode.


The converter considers both AutoFitWidth and AutoFitHeight when the html
content is rendered in the pdf page or specified rectangle.
If this property is set to NoAdjustment, the html content is not resized
vertically in any way to fit the available space. If the content is larger, it will
be cut and not all of it will be displayed in the generated pdf file.
If this property is set to ShrinkOnly, the html content is resized only if the
content height is larger than the destination space (pdf page or rectangle)
height. In this case, the content is shrunk to fit the destination space height
and the elements that it contains (texts, images) will appear smaller in the
generated pdf document than in the original web page. If the original content
height is smaller than the destination height, no adjustments will be done and
the content will be rendered exactly as it is, even though some additional
white space might appear at the bottom.
If this property is set to AutoFit, the converter will treat it like ShrinkOnly.
The default value of this property is NoAdjustment and for rendering, the
converter will only take AutoFitWidth into consideration.

Sample Code
The following sample code shows the simplest code that can be used to convert an
url to pdf:
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// create a new pdf document converting an url
PdfDocument doc = converter.ConvertUrl(url);
22

SelectPdf Html To Pdf Converter for .NET

VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' create a new pdf document converting an url
Dim doc As PdfDocument = converter.ConvertUrl(url)
The above code is equivalent with the following sample code where the default
values are explicitly specified:
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// set converter options
converter.Options.PdfPageSize = PdfPageSize.A4;
converter.Options.PdfPageOrientation = PdfPageOrientation.Portrait;
converter.Options.WebPageWidth = 1024;
converter.Options.WebPageHeight = 0;
converter.Options.WebPageFixedSize = false;
converter.Options.AutoFitWidth = HtmlToPdfPageFitMode.ShrinkOnly;
converter.Options.AutoFitHeight = HtmlToPdfPageFitMode.NoAdjustment;
// create a new pdf document converting an url
PdfDocument doc = converter.ConvertUrl(url);
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' set converter options
converter.Options.PdfPageSize = PdfPageSize.A4
converter.Options.PdfPageOrientation = PdfPageOrientation.Portrait
converter.Options.WebPageWidth = 1024
converter.Options.WebPageHeight = 0
converter.Options.WebPageFixedSize = False
converter.Options.AutoFitWidth = HtmlToPdfPageFitMode.ShrinkOnly
converter.Options.AutoFitHeight = HtmlToPdfPageFitMode.NoAdjustment
' create a new pdf document converting an url
Dim doc As PdfDocument = converter.ConvertUrl(url)

23

SelectPdf Html To Pdf Converter for .NET

Pdf Document Properties


Select.Pdf Html To Pdf Converter for .NET can be used to set pdf document
properties, such as:

Title

Author

Subject

Keywords

Creation Date

This can be done using DocumentInformation property of the PdfDocument object.


What's interesting when it comes to the Html to Pdf Converter, is that Select.Pdf
Library can take advantage of the web page properties it converts and set the
document properties title, subject and keywords with the corresponding web page
properties (title, description, keywords).
To access the web page properties, after the conversion, the HtmlToPdf object
exposes a property called ConversionResult. This is an instance of HtmlToPdfResult
class and contains details about conversion, including details about the original web
page in WebPageInformation property.

Sample Code
This sample code shows how to convert a web page to pdf using Select.Pdf and set
the basic pdf document information (title, subject, keywords) with the values taken
from the webpage.
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// create a new pdf document converting an url
PdfDocument doc = converter.ConvertUrl(TxtUrl.Text);
// get conversion result (contains document info from the web page)
HtmlToPdfResult result = converter.ConversionResult;
// set the document properties
doc.DocumentInformation.Title = result.WebPageInformation.Title;
doc.DocumentInformation.Subject =
result.WebPageInformation.Description;
doc.DocumentInformation.Keywords =
result.WebPageInformation.Keywords;
doc.DocumentInformation.Author = "Select.Pdf Samples";

24

SelectPdf Html To Pdf Converter for .NET


doc.DocumentInformation.CreationDate = DateTime.Now;
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' create a new pdf document converting an url
Dim doc As PdfDocument = converter.ConvertUrl(TxtUrl.Text)
' get conversion result (contains document info from the web page)
Dim result As HtmlToPdfResult = converter.ConversionResult
' set the document properties
doc.DocumentInformation.Title = result.WebPageInformation.Title
doc.DocumentInformation.Subject =
result.WebPageInformation.Description
doc.DocumentInformation.Keywords = result.WebPageInformation.Keywords
doc.DocumentInformation.Author = "Select.Pdf Samples"
doc.DocumentInformation.CreationDate = DateTime.Now
' save pdf document
doc.Save(Response, False, "Sample.pdf")
' close pdf document
doc.Close()

See Also
Reference
PdfDocument
HtmlToPdf
HtmlToPdfResult

25

SelectPdf Html To Pdf Converter for .NET

Pdf Viewer Preferences


A pdf document can control the way it will be displayed when opened in a pdf
viewer. When the pdf document is generated as a result of an html to pdf
conversion, these properties can be set using ViewerPreferences property of the
HtmlToPdfOptions object.
The following customizations can be done using the HtmlToPdfViewerPreferences
object:
Property
HideToolbar

HideMenuBar

HideWindowUI

FitWindow

CenterWindow

DisplayDocTitle

PageMode

Description
A flag specifying whether to hide the
pdf viewer application's tool bars when
the document is active
A flag specifying whether to hide the
pdf viewer application's menu bar when
the document is active.
A flag specifying whether to hide user
interface elements in the document's
window (such as scroll bars and
navigation controls), leaving only the
document's contents displayed.
A flag specifying whether to resize the
document's window to fit the size of the
first displayed page.
A flag specifying whether to position the
document's window in the center of the
screen.
A flag specifying whether the window's
title bar should display the document
title.
The document page mode when the pdf
document is opened in a pdf viewer.
Possible values:
UseNone
Neither document
outline
(bookmarks) nor
thumbnail images
are visible.
UseOutlines
Document outline
(bookmarks) are
visible.
UseThumbs
Thumbnail
images are
visible.
FullScreen
Full-screen mode,
with no menu bar,

26

SelectPdf Html To Pdf Converter for .NET

PageLayout

NonFullScreenPageMode

window controls
or any other
window visible.
UseOC
Optional content
group panel is
visible.
UseAttachments
Document
attachments are
visible.
The page layout to be used when the
document is opened. Possible values:
SinglePage
Displays one
page at a time.
OneColumn
Displays the
pages in one
column.
TwoColumnLeft
Displays the
pages in two
columns, with
odd-numbered
pages on the left.
TwoColumnRight
Displays the
pages in two
columns, with
odd-numbered
pages on the
right.
The document page mode when the pdf
viewer application exits the full screen
mode. Possible values:
UseNone
Neither document
outline
(bookmarks) nor
thumbnail images
are visible.
UseOutlines
Document outline
(bookmarks) are
visible.
UseThumbs
Thumbnail
images are
visible.
UseOC
Optional content
group panel is
visible.

27

SelectPdf Html To Pdf Converter for .NET

Code Sample
This sample code shows how to convert from html to pdf using Select.Pdf and set
the pdf viewer preferences.
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// set converter options
converter.Options.ViewerPreferences.CenterWindow = true;
converter.Options.ViewerPreferences.DisplayDocTitle = true;
converter.Options.ViewerPreferences.FitWindow = true;
converter.Options.ViewerPreferences.HideMenuBar = true;
converter.Options.ViewerPreferences.HideToolbar = true;
converter.Options.ViewerPreferences.HideWindowUI = true;
converter.Options.ViewerPreferences.PageLayout =
PdfViewerPageLayout.SinglePage;
converter.Options.ViewerPreferences.PageMode =
PdfViewerPageMode.UseNone;
converter.Options.ViewerPreferences.NonFullScreenPageMode =
PdfViewerFullScreenExitMode.UseNone;
// create a new pdf document converting an url
PdfDocument doc = converter.ConvertUrl(url);
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' set converter options
converter.Options.ViewerPreferences.CenterWindow = True
converter.Options.ViewerPreferences.DisplayDocTitle = True
converter.Options.ViewerPreferences.FitWindow = True
converter.Options.ViewerPreferences.HideMenuBar = True
converter.Options.ViewerPreferences.HideToolbar = True
converter.Options.ViewerPreferences.HideWindowUI = True
converter.Options.ViewerPreferences.PageLayout =
PdfViewerPageLayout.SinglePage
converter.Options.ViewerPreferences.PageMode =
PdfViewerPageMode.UseNone

28

SelectPdf Html To Pdf Converter for .NET


converter.Options.ViewerPreferences.NonFullScreenPageMode =
PdfViewerFullScreenExitMode.UseNone
' create a new pdf document converting an url
Dim doc As PdfDocument = converter.ConvertUrl(url)
' save pdf document
doc.Save(Response, False, "Sample.pdf")
' close pdf document
doc.Close()

See Also
Reference
PdfDocument
HtmlToPdf
HtmlToPdfOptions
HtmlToPdfViewerPreferences

29

SelectPdf Html To Pdf Converter for .NET

Pdf Security Settings


Select.Pdf can be used to set the basic security settings for the generated pdf files
and also manage different permissions:

Owner Password

User Password

Assemble Document permission

Copy Content permission

Edit Annotations permission

Edit Content permission

Fill Form Fields permission

Print permission

When the pdf document is generated as a result of an html to pdf conversion, these
properties can be set using SecurityOptions property of the HtmlToPdfOptions
object.

Code Sample
This sample code shows how to convert from html to pdf using Select.Pdf, how to
set a password to be able to view or modify the document and also specify user
permissions for the pdf document (if the user can print, copy content, fill forms,
modify, etc).
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// set document passwords
converter.Options.SecurityOptions.OwnerPassword = "test1";
converter.Options.SecurityOptions.UserPassword = "test2";
//set document permissions
converter.Options.SecurityOptions.CanAssembleDocument = false;
converter.Options.SecurityOptions.CanCopyContent = true;
converter.Options.SecurityOptions.CanEditAnnotations = true;
converter.Options.SecurityOptions.CanEditContent = true;
converter.Options.SecurityOptions.CanFillFormFields = true;
converter.Options.SecurityOptions.CanPrint = true;
// create a new pdf document converting an url
PdfDocument doc = converter.ConvertUrl(url);

30

SelectPdf Html To Pdf Converter for .NET


// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' set document passwords
converter.Options.SecurityOptions.OwnerPassword = "test1"
converter.Options.SecurityOptions.UserPassword = "test2"
'set document permissions
converter.Options.SecurityOptions.CanAssembleDocument = False
converter.Options.SecurityOptions.CanCopyContent = True
converter.Options.SecurityOptions.CanEditAnnotations = True
converter.Options.SecurityOptions.CanEditContent = True
converter.Options.SecurityOptions.CanFillFormFields = True
converter.Options.SecurityOptions.CanPrint = True
' create a new pdf document converting an url
Dim doc As PdfDocument = converter.ConvertUrl(url)
' save pdf document
doc.Save(Response, False, "Sample.pdf")
' close pdf document
doc.Close()

See Also
Reference
PdfDocument
HtmlToPdf
HtmlToPdfOptions
PdfSecurityOptions

31

SelectPdf Html To Pdf Converter for .NET

Conversion Delay and Web Page Timeout with Html to Pdf


Converter for .NET
For pages that use javascripts heavily, the conversion can be delayed a number of
seconds using MinPageLoadTime property of the HtmlToPdfOptions object, to allow
the content to be fully rendered.
In a similar way, if a page takes too much time to load, the converter can specify
the amount of time in seconds when the page load will timeout using the property
MaxPageLoadTime property of the HtmlToPdfOptions object.

Sample Code
This sample code shows how the html to pdf converter can be used to convert a
web page to pdf using Select.Pdf Pdf Library for .NET and how to set the conversion
delay and timeout properties.
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// specify the number of seconds the conversion is delayed
converter.Options.MinPageLoadTime = 2;
// set the page timeout (in seconds)
converter.Options.MaxPageLoadTime = 30;
// create a new pdf document converting an url
PdfDocument doc = converter.ConvertUrl(TxtUrl.Text);
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' specify the number of seconds the conversion is delayed
converter.Options.MinPageLoadTime = 2
' set the page timeout (in seconds)
converter.Options.MaxPageLoadTime = 30
' create a new pdf document converting an url
Dim doc As PdfDocument = converter.ConvertUrl(TxtUrl.Text)

32

SelectPdf Html To Pdf Converter for .NET


' save pdf document
doc.Save(Response, False, "Sample.pdf")
' close pdf document
doc.Close()

See Also
Reference
HtmlToPdf
HtmlToPdfOptions

33

SelectPdf Html To Pdf Converter for .NET

Headers and Footers with SelectPdf HtmlToPdf Converter


Select.Pdf Html To Pdf Converter can add headers and footers to the generated pdf
document using the Header and Footer properties of the HtmlToPdf converter
object.
Header and Footer Options are covered in more details in the following sections:

Header Options
Footer Options
Setting a Different Header or Footer for a Specific Pdf Page

Header Options
To display a custom header in the generated pdf, the DisplayHeader property of the
HtmlToPdfOptions object must be set to true. If the DisplayHeader property of the
Options object is false, the header will not be displayed and all the options set for
the header will have no effect.
The header of the pdf document generated from the html to pdf conversion can be
customized using the Header property of the HtmlToPdf converter object. That is an
instance of PdfHeader class and has the following properties:

Height - The height of the pdf document header.

DisplayOnFirstPage - Controls the visibility of the header on the first page of


the generated pdf document.

DisplayOnOddPages - Controls the visibility of the header on the odd


numbered pages of the generated pdf document.

DisplayOnEvenPages - Controls the visibility of the header on the even


numbered pages of the generated pdf document.

FirstPageNumber - Controls the page number for the first page being
rendered.

TotalPagesOffset - Controls the total number of pages offset in the generated


pdf document.

To add content to the pdf header, PdfHeader class exposes the


Add(PdfSectionElement) method. That can be used to add 3 types of objects to the
header:

Text - using PdfTextSection objects.

Image - using PdfImageSection objects.

HTML using PdfHtmlSection objects.

Page numbers can be added to pdf document headers using PdfTextSection objects.
The page number is displayed setting a {page_number} placeholder in a Text

34

SelectPdf Html To Pdf Converter for .NET


property of a PdfTextSection object that can be added to the header. By default the
page numbers start with 1. This can be changed using the FirstPageNumber
property of the PdfHeader object.
The total number of pages is displayed setting a {total_pages} placeholder in the
Text property of a PdfTextSection object that can be added to the header. The total
number of pages can be incremented with a value specified by the TotalPagesOffset
property of the PdfHeader object. This could be useful when the generated pdf will
be merged with other documents.

The following code sample shows how to add a custom header to the pdf document
generated from a html to pdf conversion:
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// header settings
converter.Options.DisplayHeader = true;
converter.Header.DisplayOnFirstPage = true;
converter.Header.DisplayOnOddPages = true;
converter.Header.DisplayOnEvenPages = true;
converter.Header.Height = 50;
// add some html content to the header
PdfHtmlSection headerHtml = new PdfHtmlSection(headerUrl);
headerHtml.AutoFitHeight = HtmlToPdfPageFitMode.AutoFit;
converter.Header.Add(headerHtml);
// create a new pdf document converting an url
PdfDocument doc = converter.ConvertUrl(url);
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' header settings
converter.Options.DisplayHeader = True
converter.Header.DisplayOnFirstPage = True
converter.Header.DisplayOnOddPages = True
converter.Header.DisplayOnEvenPages = True

35

SelectPdf Html To Pdf Converter for .NET


converter.Header.Height = 50
' add some html content to the header
Dim headerHtml As New PdfHtmlSection(headerUrl)
headerHtml.AutoFitHeight = HtmlToPdfPageFitMode.AutoFit
converter.Header.Add(headerHtml)
' create a new pdf document converting an url
Dim doc As PdfDocument = converter.ConvertUrl(url)
' save pdf document
doc.Save(Response, False, "Sample.pdf")
' close pdf document
doc.Close()

Footer Options
To display a custom footer in the generated pdf, the DisplayFooter property of the
HtmlToPdfOptions object must be set to true. If the DisplayFooter property of the
Options object is false, the footer will not be displayed and all the options set for the
footer will have no effect.
The footer of the pdf document generated from the html to pdf conversion can be
customized using the Footer property of the HtmlToPdf converter object. That is an
instance of PdfFooter class and has the following properties:

Height - The height of the pdf document footer.

DisplayOnFirstPage - Controls the visibility of the footer on the first page of


the generated pdf document.

DisplayOnOddPages - Controls the visibility of the footer on the odd


numbered pages of the generated pdf document.

DisplayOnEvenPages - Controls the visibility of the footer on the even


numbered pages of the generated pdf document.

FirstPageNumber - Controls the page number for the first page being
rendered.

TotalPagesOffset - Controls the total number of pages offset in the generated


pdf document.

To add content to the pdf footer, PdfFooter class exposes the


Add(PdfSectionElement) method. That can be used to add 3 types of objects to the
footer:

Text - using PdfTextSection objects.

Image - using PdfImageSection objects.

36

SelectPdf Html To Pdf Converter for .NET

HTML using PdfHtmlSection objects.

Page numbers can be added to pdf document footer using PdfTextSection objects.
The page number is displayed setting a {page_number} placeholder in a Text
property of a PdfTextSection object that can be added to the footer. By default the
page numbers start with 1. This can be changed using the FirstPageNumber
property of the PdfFooter object.
The total number of pages is displayed setting a {total_pages} placeholder in the
Text property of a PdfTextSection object that can be added to the footer. The total
number of pages can be incremented with a value specified by the TotalPagesOffset
property of the PdfFooter object. This could be useful when the generated pdf will
be merged with other documents.

The following code sample shows how to add a custom footer to the pdf document
generated from a html to pdf conversion:
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// footer settings
converter.Options.DisplayFooter = true;
converter.Footer.DisplayOnFirstPage = true;
converter.Footer.DisplayOnOddPages = true;
converter.Footer.DisplayOnEvenPages = true;
converter.Footer.Height = 50;
// add some html content to the footer
PdfHtmlSection footerHtml = new PdfHtmlSection(footerUrl);
footerHtml.AutoFitHeight = HtmlToPdfPageFitMode.AutoFit;
converter.Footer.Add(footerHtml);
// page numbers can be added using a PdfTextSection object
PdfTextSection text = new PdfTextSection(0, 10, "Page: {page_number}
of {total_pages} ", new System.Drawing.Font("Arial", 8));
text.HorizontalAlign = PdfTextHorizontalAlign.Right;
converter.Footer.Add(text);
// create a new pdf document converting an url
PdfDocument doc = converter.ConvertUrl(url);
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();

37

SelectPdf Html To Pdf Converter for .NET

VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' header settings
converter.Options.DisplayFooter = True
converter.Footer.DisplayOnFirstPage = True
converter.Footer.DisplayOnOddPages = True
converter.Footer.DisplayOnEvenPages = True
converter.Footer.Height = 50
' add some html content to the footer
Dim footerHtml As New PdfHtmlSection(footerUrl)
footerHtml.AutoFitHeight = HtmlToPdfPageFitMode.AutoFit
converter.Footer.Add(footerHtml)
' page numbers can be added using a PdfTextSection object
Dim text As New PdfTextSection(0, 10, "Page: {page_number} of
{total_pages} ", New System.Drawing.Font("Arial", 8))
text.HorizontalAlign = PdfTextHorizontalAlign.Right
converter.Footer.Add(text)
' create a new pdf document converting an url
Dim doc As PdfDocument = converter.ConvertUrl(url)
' save pdf document
doc.Save(Response, False, "Sample.pdf")
' close pdf document
doc.Close()

Setting a Different Header or Footer for a Specific Pdf Page


With Select.Pdf Library for .NET it is possible to customize headers and footers of
the generated pdf document and have different headers and footers on specific
pages. This can be done using CustomHeader and CustomFooter properties of the
PdfPage objects from the generated pdf document.
The following sample code shows how to customize the header of the 3rd page of a
generated pdf document:
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// header settings
converter.Options.DisplayHeader = true;
converter.Header.DisplayOnFirstPage = true;

38

SelectPdf Html To Pdf Converter for .NET


converter.Header.DisplayOnOddPages = true;
converter.Header.DisplayOnEvenPages = true;
converter.Header.Height = 50;
// add some html content to the header
PdfHtmlSection headerHtml = new PdfHtmlSection(headerUrl);
headerHtml.AutoFitHeight = HtmlToPdfPageFitMode.AutoFit;
converter.Header.Add(headerHtml);
// create a new pdf document converting an url
PdfDocument doc = converter.ConvertUrl(url);
// custom header on page 3
if (doc.Pages.Count >= 3)
{
PdfPage page = doc.Pages[2];
PdfTemplate customHeader = doc.AddTemplate(page.PageSize.Width,
headerHeight);
PdfHtmlElement customHtml = new PdfHtmlElement(
"<div><b>This is the custom header that will appear only on
page 3!</b></div>",
string.Empty);
customHeader.Add(customHtml);
page.CustomHeader = customHeader;
}
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' header settings
converter.Options.DisplayHeader = True
converter.Header.DisplayOnFirstPage = True
converter.Header.DisplayOnOddPages = True
converter.Header.DisplayOnEvenPages = True
converter.Header.Height = 50
' add some html content to the header
Dim headerHtml As New PdfHtmlSection(headerUrl)
headerHtml.AutoFitHeight = HtmlToPdfPageFitMode.AutoFit

39

SelectPdf Html To Pdf Converter for .NET


converter.Header.Add(headerHtml)
' create a new pdf document converting an url
Dim doc As PdfDocument = converter.ConvertUrl(url)
' custom header on page 3
If doc.Pages.Count >= 3 Then
Dim page As PdfPage = doc.Pages(2)
Dim customHeader As PdfTemplate =
doc.AddTemplate(page.PageSize.Width, headerHeight)
Dim customHtml As New PdfHtmlElement( _
"<div><b>This is the custom header that will appear only on
page 3!</b></div>", _
String.Empty)
customHeader.Add(customHtml)
page.CustomHeader = customHeader
End If
' save pdf document
doc.Save(Response, False, "Sample.pdf")
' close pdf document
doc.Close()

See Also
Reference
HtmlToPdf
PdfHeader
PdfFooter

40

SelectPdf Html To Pdf Converter for .NET

Page Breaks
By default, the html to pdf converter offered by Select.Pdf Library automatically
pages the content. There are 2 properties that can be used to customize the
content pagination:

KeepTextsTogether - This property instructs the converter whether to try to


avoid cutting off the text lines between pdf pages or not. The default value
for this property is True.

KeepImagesTogether - This property instructs the converter whether to try to


avoid cutting off the images between pdf pages or not. Due to the fact that
images could be large and avoiding cutting them would great large gaps in
the pdf pages, the default value for this property is False.

Manual Paging
Content pagination can be controlled from HTML/CSS. CSS styles can be used to
manually change the pagination:

page-break-before: always
The "page-break-before" property sets whether a page break should occur BEFORE
a specified element. The element can be anything (image, table, table row, div,
text, etc).
HTML
<div style="page-break-before: always">
A page break will be inserted BEFORE this div element because "pagebreak-before" property is set to "always".
</div>

page-break-after: always
The "page-break-after" property sets whether a page break should occur AFTER a
specified element. The element can be anything (image, table, table row, div, text,
etc).
HTML
<div style="page-break-after: always">
A page break will be inserted AFTER this div element because "pagebreak-after" property is set to "always".
</div>

page-break-inside: avoid

41

SelectPdf Html To Pdf Converter for .NET


The "page-break-inside" property sets whether a page break is allowed INSIDE a
specified element. The element can be anything (image, table, table row, div, text,
etc).
HTML
<div style="page-break-inside: avoid">
The content of this div element will not be split into several pages
(if possible) because "page-break-inside" property is set to "avoid".
</div>

See Also
Reference
PdfDocument
HtmlToPdf
HtmlToPdfOptions

42

SelectPdf Html To Pdf Converter for .NET

Repeat Table Headers


Some web pages might contain large html tables that will split over several pages.
Select.Pdf Library can be set to repeat the header of the html table at the top of
every pdf page that contains a part of that table.
This can be done setting a CSS property for the thead element of the html table.
The property that needs to be set is: display: table-header-group.

Sample Code
The following html table will repeat the table header at the top of each pdf page
when converted to pdf.
HTML
<table>
<thead style="display: table-header-group;">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
</thead>
<tbody>
<tr>
<td>January 2009</td>
<td>$100</td>
</tr>
<tr>
<td>February 2009</td>
<td>$80</td>
</tr>
<!--// ..... many table rows that will split over several
pages ...... -->
<tr>
<td>February 2015</td>
<td>$200</td>
</tr>
</tbody>
</table>

43

SelectPdf Html To Pdf Converter for .NET

Media Types
Many web pages define different sets of css styles for browser viewing (@media
screen) and for printing (@media print). Select.Pdf Html to Pdf Converter for .NET
can take advantage of this and generate the pdf using the specified media type.
Media type can be set using the CssMediaType property of the HtmlToPdfOptions
object. The default value is Screen. The other possible value is Print.

Sample Code
This sample code shows how to convert an url to pdf using Select.Pdf Pdf Library
for .NET and also use a media type during the conversion.
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// set css @media print
converter.Options.CssMediaType = HtmlToPdfCssMediaType.Print;
// create a new pdf document converting an url
PdfDocument doc = converter.ConvertUrl(TxtUrl.Text);
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' set css @media print
converter.Options.CssMediaType = HtmlToPdfCssMediaType.Print
' create a new pdf document converting an url
Dim doc As PdfDocument = converter.ConvertUrl(TxtUrl.Text)
' save pdf document
doc.Save(Response, False, "Sample.pdf")
' close pdf document
doc.Close()

See Also
Reference
HtmlToPdfOptions
44

SelectPdf Html To Pdf Converter for .NET


HtmlToPdfCssMediaType

45

SelectPdf Html To Pdf Converter for .NET

Internal and External Links


Select.Pdf Library can convert internal html links to internal pdf links and keep
external html links (hyperlinks to other pages) the same in pdf (external links).
These links can be disabled in pdf if needed.
There are 2 properties that can be used to enable and disable internal and external
links:

InternalLinksEnabled - Controls the conversion of internal html links to


internal pdf links. The default value for this property is True.

ExternalLinksEnabled - Controls the rendering of external hyperlinks in pdf.


The default value for this property is True.

Sample Code
This sample code shows how the html to pdf converter can handle internal and
external links from the web page when converted to pdf using Select.Pdf Pdf Library
for .NET.
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// set links options
converter.Options.InternalLinksEnabled = true;
converter.Options.ExternalLinksEnabled = true;
// create a new pdf document converting an url
PdfDocument doc = converter.ConvertUrl(TxtUrl.Text);
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' set links options
converter.Options.InternalLinksEnabled = True
converter.Options.ExternalLinksEnabled = True
' create a new pdf document converting an url
Dim doc As PdfDocument = converter.ConvertUrl(TxtUrl.Text)
' save pdf document
46

SelectPdf Html To Pdf Converter for .NET


doc.Save(Response, False, "Sample.pdf")
' close pdf document
doc.Close()

See Also
Reference
HtmlToPdfOptions

47

SelectPdf Html To Pdf Converter for .NET

Automatic Bookmarks with Html to Pdf Converter


Select.Pdf Html To Pdf Converter for .NET offers support for pdf bookmarks. It can
automatically generate pdf bookmarks based on some html elements selection.
The elements that will be bookmarked are defined using the PdfBookmarkOptions
property of the HtmlToPdfOptions object. This is an instance of the
PdfBookmarkOptions class, whose single property is CssSelectors.
In other words, the elements that will be bookmarked are defined using CSS
selectors. For example, the selector for all the H1 elements is "H1", the selector for
all the elements with the CSS class name 'myclass' is "*.myclass" and the selector
for the elements with the id 'myid' is "*#myid". Read more about CSS selectors
here.

Sample Code
This sample code shows how the html to pdf converter can automatically generate
pdf bookmarks based on H1 and H2 elements from the web page using Select.Pdf
Pdf Library for .NET.
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// set the css selectors for the automatic bookmarks
converter.Options.PdfBookmarkOptions.CssSelectors = new string[]
{"H1", "H2"};
// display the bookmarks when the document is opened in a viewer
converter.Options.ViewerPreferences.PageMode =
PdfViewerPageMode.UseOutlines;
// create a new pdf document converting an url
PdfDocument doc = converter.ConvertUrl(TxtUrl.Text);
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' set the css selectors for the automatic bookmarks
converter.Options.PdfBookmarkOptions.CssSelectors = New String()
{"H1", "H2"}

48

SelectPdf Html To Pdf Converter for .NET


' display the bookmarks when the document is opened in a viewer
converter.Options.ViewerPreferences.PageMode =
PdfViewerPageMode.UseOutlines
' create a new pdf document converting an url
Dim doc As PdfDocument = converter.ConvertUrl(TxtUrl.Text)
' save pdf document
doc.Save(Response, False, "Sample.pdf")
' close pdf document
doc.Close()

See Also
Reference
HtmlToPdfOptions
PdfBookmarkOptions
Other Resources
CSS Selectors

49

SelectPdf Html To Pdf Converter for .NET

Sending HTTP Headers with Html to Pdf Converter


Select.Pdf Library for .NET can be used to send additional HTTP headers to the web
page that is converted.
This can be done using the HttpHeaders property of the HtmlToPdfOptions object.

Sample Code
This sample code shows how to send HTTP headers to the page that will be
converted using the html to pdf converter from Select.Pdf Pdf Library for .NET.
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// set the HTTP headers
converter.Options.HttpHeaders.Add(TxtName1.Text,
converter.Options.HttpHeaders.Add(TxtName2.Text,
converter.Options.HttpHeaders.Add(TxtName3.Text,
converter.Options.HttpHeaders.Add(TxtName4.Text,

TxtValue1.Text);
TxtValue2.Text);
TxtValue3.Text);
TxtValue4.Text);

// create a new pdf document converting an url


PdfDocument doc = converter.ConvertUrl(TxtUrl.Text);
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' set the HTTP headers
converter.Options.HttpHeaders.Add(TxtName1.Text,
converter.Options.HttpHeaders.Add(TxtName2.Text,
converter.Options.HttpHeaders.Add(TxtName3.Text,
converter.Options.HttpHeaders.Add(TxtName4.Text,

TxtValue1.Text)
TxtValue2.Text)
TxtValue3.Text)
TxtValue4.Text)

' create a new pdf document converting an url


Dim doc As PdfDocument = converter.ConvertUrl(TxtUrl.Text)
' save pdf document
doc.Save(Response, False, "Sample.pdf")
' close pdf document
doc.Close()

50

SelectPdf Html To Pdf Converter for .NET

See Also
Reference
HtmlToPdfOptions

51

SelectPdf Html To Pdf Converter for .NET

Sending HTTP Cookies with Html to Pdf Converter


Select.Pdf Library for .NET can be used to send additional HTTP cookies to the web
page that is converted.
This can be done using the HttpCookies property of the HtmlToPdfOptions object.

Sample Code
This sample code shows how to send HTTP cookies to the page that will be
converted using the html to pdf converter from Select.Pdf Pdf Library for .NET.
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// set the HTTP cookies
converter.Options.HttpCookies.Add(TxtName1.Text,
converter.Options.HttpCookies.Add(TxtName2.Text,
converter.Options.HttpCookies.Add(TxtName3.Text,
converter.Options.HttpCookies.Add(TxtName4.Text,

TxtValue1.Text);
TxtValue2.Text);
TxtValue3.Text);
TxtValue4.Text);

// create a new pdf document converting an url


PdfDocument doc = converter.ConvertUrl(TxtUrl.Text);
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' set the HTTP cookies
converter.Options.HttpCookies.Add(TxtName1.Text,
converter.Options.HttpCookies.Add(TxtName2.Text,
converter.Options.HttpCookies.Add(TxtName3.Text,
converter.Options.HttpCookies.Add(TxtName4.Text,

TxtValue1.Text)
TxtValue2.Text)
TxtValue3.Text)
TxtValue4.Text)

' create a new pdf document converting an url


Dim doc As PdfDocument = converter.ConvertUrl(TxtUrl.Text)
' save pdf document
doc.Save(Response, False, "Sample.pdf")
' close pdf document
doc.Close()

52

SelectPdf Html To Pdf Converter for .NET

See Also
Reference
HtmlToPdfOptions

53

SelectPdf Html To Pdf Converter for .NET

Web Page Authentication


Select.Pdf HTML to PDF Converter can convert any web page a browser can open,
however some web pages may require authentication before access can be granted.
In such cases additional information must be supplied to the converter so that the
converter can login to be granted access to the page.

Authentication Types:

HTTP Authentication
Integrated Windows Authentication
Forms Authentication
Custom Login Page Authentication

HTTP Authentication
HTTP authentication is handled on the HTTP protocol level. When a page that
requires HTTP authentication is accessed, the browser will display a login dialog
where the user can enter an username and password. Once the correct user name
and password is entered, access is granted and the page is displayed.
Select.Pdf HTML to PDF converter can automatically access pages that require HTTP
authentication. To enable this feature, the Username and Password properties of
HtmlToPdfAuthenticationOptions object need to be set with a valid user name and
password for the page. Select.Pdf HTML to PDF converter will automatically use this
information to login and access the page.

The following sample code shows how to convert an url that requires HTTP
authentication:
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// set authentication options
converter.Options.Authentication.Username = username;
converter.Options.Authentication.Password = password;
// create a new pdf document converting an url
PdfDocument doc = converter.ConvertUrl(url);
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();

54

SelectPdf Html To Pdf Converter for .NET


VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
// set authentication options
converter.Options.Authentication.Username = username
converter.Options.Authentication.Password = password
' create a new pdf document converting an url
Dim doc As PdfDocument = converter.ConvertUrl(url)
' save pdf document
doc.Save(Response, False, "Sample.pdf")
' close pdf document
doc.Close()

Integrated Windows Authentication


Select.Pdf HTML to PDF supports Integrated Windows Authentication if the NTML
provider is used. The current user credentials will be used by the converter to
authenticate automatically.
If the automatic windows authentication does not work and the converter cannot
resolve the authentication using the current user credentials, the
HtmlToPdfAuthenticationOptions object can be used to specify an username and a
valid password, like in the above HTTP Authentication section.

Forms Authentication
Select.Pdf Library for .NET can convert web pages that use the ASP.NET Forms
Authentication mechanism to login.
In this case, if the Forms Authentication is set to use cookies to store the formsauthentication ticket, the corresponding cookie (identified by
FormsAuthentication.FormsCookieName) needs to be sent by the converter to the
page that will be converted.

This sample code shows how to convert an url that requires Forms authentication
from a page of the same application:
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// set authentication cookie
converter.Options.HttpCookies.Add(
System.Web.Security.FormsAuthentication.FormsCookieName,
Request.Cookies[FormsAuthentication.FormsCookieName].Value);

55

SelectPdf Html To Pdf Converter for .NET


// create a new pdf document converting an url
PdfDocument doc = converter.ConvertUrl(url);
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
// set authentication cookie
converter.Options.HttpCookies.Add( _
System.Web.Security.FormsAuthentication.FormsCookieName, _
Request.Cookies[FormsAuthentication.FormsCookieName].Value)
' create a new pdf document converting an url
Dim doc As PdfDocument = converter.ConvertUrl(url)
' save pdf document
doc.Save(Response, False, "Sample.pdf")
' close pdf document
doc.Close()

Custom Login Page Authentication


In case the web page to be converted is protected by a general login mechanism,
the Select.Pdf Html To Pdf Converter will not be able to access the page. To work
around this problem, instead of converting the url directly, the page html code
should be retrieve using some other method and that html code should be
converted to pdf instead of the full url.
In ASP.NET, Server.Execute is the method that can be used to get the html code
from an url.
IMPORTANT: If external resources (such as javascript/css files or images) are
referenced in the html code, they must be placed into a location where anonymous
access is granted, otherwise they will have the same authentication problems and
they will not be rendered.

This sample code shows how to get the html code from an url and convert it to pdf:
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();

56

SelectPdf Html To Pdf Converter for .NET

// get html code from url


TextWriter writer = new StringWriter();
Server.Execute(url, writer);
string htmlString = writer.ToString();
// get base url (to resolve relative links to external resources)
string baseUrl = HttpContext.Current.Request.Url.AbsoluteUri;
// create a new pdf document converting the html string
PdfDocument doc = converter.ConvertHtmlString(htmlString, baseUrl);
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' get html code from url
Dim writer as New TextWriter()
Server.Execute(url, writer)
Dim htmlString as String = writer.ToString()
' get base url (to resolve relative links to external resources)
Dim baseUrl as String = HttpContext.Current.Request.Url.AbsoluteUri
' create a new pdf document converting the html string
Dim doc As PdfDocument = converter.ConvertHtmlString(htmlString,
baseUrl)
' save pdf document
doc.Save(Response, False, "Sample.pdf")
' close pdf document
doc.Close()

See Also
Reference
HtmlToPdf
HtmlToPdfOptions
HtmlToPdfAuthenticationOptions

57

SelectPdf Html To Pdf Converter for .NET

Accessing Web Pages through a Proxy with SelectPdf


Library
Sometime a system is setup to be able to access the internet through a proxy.
Select.Pdf Html to Pdf Converter supports this option and can convert web pages
that can be accessed only though a proxy server.
To enable this feature the ProxyOptions property of the HtmlToPdfOptions object
needs to be set. This is an instance of HtmlToPdfProxyOptions class that allows to
set:

Proxy Host Name

Proxy Port Number

Username

Password

Proxy Type

Sample Code
This sample code shows how to convert an url to pdf using Select.Pdf Pdf Library
for .NET and use a proxy to access the web page.
C#
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// set the proxy options
converter.Options.ProxyOptions.HostName = "proxy.server.name";
converter.Options.ProxyOptions.PortNumber = 1122;
converter.Options.ProxyOptions.Username = "proxyuser";
converter.Options.ProxyOptions.Password = "proxypassword";
converter.Options.ProxyOptions.Type = NetworkProxyType.Http;
// create a new pdf document converting an url
PdfDocument doc = converter.ConvertUrl(TxtUrl.Text);
// save pdf document
doc.Save(Response, false, "Sample.pdf");
// close pdf document
doc.Close();
VB
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()

58

SelectPdf Html To Pdf Converter for .NET


' set the proxy options
converter.Options.ProxyOptions.HostName = "proxy.server.name"
converter.Options.ProxyOptions.PortNumber = 1122
converter.Options.ProxyOptions.Username = "proxyuser"
converter.Options.ProxyOptions.Password = "proxypassword"
converter.Options.ProxyOptions.Type = NetworkProxyType.Http
' create a new pdf document converting an url
Dim doc As PdfDocument = converter.ConvertUrl(TxtUrl.Text)
' save pdf document
doc.Save(Response, False, "Sample.pdf")
' close pdf document
doc.Close()

See Also
Reference
HtmlToPdfOptions
HtmlToPdfProxyOptions

59

SelectPdf Html To Pdf Converter for .NET

Current WebPage to Pdf in Asp.Net


Sometimes, there is a need in an ASP.NET application to convert a web page to pdf
with a click of a button, taken into consideration the changes done to the data from
that page (form filling for example).
Select.Pdf Html to Pdf Converter and an ASP.NET trick can be used to achive this
task. Take a look at the sample code below.

Sample Code
This sample code shows how to use Select.Pdf html to pdf converter to convert the
current asp.net page to pdf preserving the values entered in the page controls
before hitting the Convert button.
C#
namespace SelectPdf.Samples
{
public partial class convert_current_page_to_pdf :
System.Web.UI.Page
{
private bool startConversion = false;
protected void BtnCreatePdf_Click(object sender, EventArgs e)
{
startConversion = true;
}
protected override void Render(HtmlTextWriter writer)
{
if (startConversion)
{
// get html of the page
TextWriter myWriter = new StringWriter();
HtmlTextWriter htmlWriter = new
HtmlTextWriter(myWriter);
base.Render(htmlWriter);
// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();
// create a new pdf document converting the html
string of the page
PdfDocument doc = converter.ConvertHtmlString(
myWriter.ToString(), Request.Url.AbsoluteUri);
// save pdf document
doc.Save(Response, false, "Sample.pdf");

60

SelectPdf Html To Pdf Converter for .NET


// close pdf document
doc.Close();
}
else
{
// render web page in browser
base.Render(writer);
}
}
}
}
VB
Namespace SelectPdf.Samples
Partial Public Class convert_current_page_to_pdf
Inherits System.Web.UI.Page
Private startConversion As Boolean = False
Protected Sub BtnCreatePdf_Click(sender As Object, e As
EventArgs)
startConversion = True
End Sub
Protected Overrides Sub Render(writer As HtmlTextWriter)
If startConversion Then
' get html of the page
Dim myWriter As TextWriter = New StringWriter()
Dim htmlWriter As New HtmlTextWriter(myWriter)
MyBase.Render(htmlWriter)
' instantiate a html to pdf converter object
Dim converter As New HtmlToPdf()
' create a new pdf document converting the html
string of the page
Dim doc As PdfDocument =
converter.ConvertHtmlString(myWriter.ToString(), _
Request.Url.AbsoluteUri)
' save pdf document
doc.Save(Response, False, "Sample.pdf")
' close pdf document
doc.Close()
Else
' render web page in browser

61

SelectPdf Html To Pdf Converter for .NET


MyBase.Render(writer)
End If
End Sub
End Class
End Namespace

62

SelectPdf Html To Pdf Converter for .NET

Html To Pdf Converter Options Review


Select.Pdf Html to Pdf Converter for .NET offers a lot of customization options. Most
of them were described in our developer's guide.

Here is a full list with all html to pdf converter options:


Header - controls the properties of the custom header of the generated pdf
document. This was covered in more details in Headers and Footers section.
Footer - controls the properties of the custom footer of the generated pdf document.
This was covered in more details in Headers and Footers section.
Authentication - Handles authentication options if the web page being converted
requires authentication. This was covered in more details in Web Page
Authentication section.
AutoFitHeight - Specifies the html content vertical auto fit mode. This was covered
in more details in Resizing Content During Conversion section.
AutoFitWidth - Specifies the html content horizontal auto fit mode. This was covered
in more details in Resizing Content During Conversion section.
ColorSpace - Gets or sets the color space of the generated pdf document. This is an
instance of PdfColorSpace type.
CssMediaType - Indicates what css styles are used when the web page is rendered.
This was covered in more details in Media Types section.
DisplayFooter - Controls if a custom footer is displayed in the generated pdf
document. This was covered in more details in Headers and Footers section.
DisplayHeader - Controls if a custom header is displayed in the generated pdf
document. This was covered in more details in Headers and Footers section.
EmbedFonts - Instructs the converter to embed all the needed fonts into the pdf
document or not.
ExternalLinksEnabled - Controls the rendering of external hyperlinks in pdf. This was
covered in more details in Internal and External Links section.
HttpCookies - Gets the collection of custom HTTP cookies used for the conversion.
This was covered in more details in HTTP Cookies section.
HttpHeaders - Get the collection of custom HTTP headers used for the conversion.
This was covered in more details in HTTP Headers section.
InternalLinksEnabled - Controls the conversion of internal html links to internal pdf
links. This was covered in more details in Internal and External Links section.
JavaScriptEnabled - Enable scripts when rendering the url or html string.

63

SelectPdf Html To Pdf Converter for .NET


JpegCompressionEnabled - Gets or sets a flag indicating if the JPEG compression is
enabled or not for the images in the generated pdf document.
JpegCompressionLevel - Gets or sets the compression level of images in the
generated pdf document.
KeepImagesTogether - This property instructs the converter whether to try to avoid
cutting off the images between pdf pages or not. This was covered in more details
in Page Breaks section.
KeepTextsTogether - This property instructs the converter whether to try to avoid
cutting off the text lines between pdf pages or not. This was covered in more details
in Page Breaks section.
MarginBottom - The bottom margin of the pdf document. The margin is specified in
points. 1 point is 1/72 inch.
MarginLeft - The left margin of the pdf document. The margin is specified in points.
1 point is 1/72 inch.
MarginRight - The right margin of the pdf document. The margin is specified in
points. 1 point is 1/72 inch.
MarginTop - The top margin of the pdf document. The margin is specified in points. 1
point is 1/72 inch.
MaximumConcurrentConversions - This parameter must be set before the first
conversion performed by the application. When this property is set with a negative
value or zero, the concurrency level is maximum. The default value is 4. If the
maximum number is reached and more conversion requests arrive, they will wait in
a queue for an available spot.
MaxPageLoadTime - The web page navigation timeout in seconds. This was covered
in more details in Conversion Delay and Timeout section.
MinPageLoadTime - An additional time in seconds to wait for asynchronous items to
be loaded before the web page is rendered. This was covered in more details in
Conversion Delay and Timeout section.
PdfBookmarkOptions - Gets a reference to the object that controls the bookmarks
creation for the generated pdf document. This was covered in more details in
Automatic Bookmarks section.
PdfCompressionLevel - This property controls the compression level of the
generated pdf document.
PdfDocumentInformation - Gets a reference to the object that specifies the
generated pdf document properties. This was covered in more details in Pdf
Document Properties section.
PdfPageCustomSize - This property can be used to specify a custom pdf document
page size. This was covered in more details in Setting Pdf Page Properties section.

64

SelectPdf Html To Pdf Converter for .NET


PdfPageOrientation - This property controls the page orientation of the generated
pdf document pages. This was covered in more details in Setting Pdf Page Properties
section.
PdfPageSize - This property controls the size of the generated document pages. This
was covered in more details in Setting Pdf Page Properties section.
PdfStandard - Defines the pdf standard used by the generated pdf document. This is
an instance of PdfStandard type.
PluginsEnabled - A flag indicating if plugins (like Flash players) are enabled in the
converter.
ProxyOptions - Gets a reference to an object containing the proxy settings used to
access the web page that is being converted. This was covered in more details in
Proxy Options section.
SecurityOptions - Gets a reference to the object that specifies the generated pdf
document security settings. This was covered in more details in Pdf Security
Settings section.
ViewerPreferences - Controls how the pdf document will appear in a pdf viewer (like
Adobe Reader). This was covered in more details in Pdf Viewer Preferences section.
WebPageFixedSize - Controls whether the web page is rendered with a fixed size
internal browser or the size automatically extends to make the whole content visible
This was covered in more details in Resizing Content During Conversion section.
WebPageHeight - Gets or sets the height of the converted web page as it would
appear in the internal browser used to render the html. This was covered in more
details in Resizing Content During Conversion section.
WebPageWidth - Gets or sets the width of the converted web page as it would
appear in the internal browser used to render the html. This was covered in more
details in Resizing Content During Conversion section.

See Also
Reference
HtmlToPdf
HtmlToPdfOptions

65

SelectPdf Html To Pdf Converter for .NET

SelectPdf Namespace
SelectPdf Html To Pdf Converter contains a powerful html to pdf converter that
supports modern html5/css3.

Classes
Class
GlobalProperties
HiddenWebElements

HtmlToImage

HtmlToPdf

HtmlToPdfAuthenticationO
ptions

HtmlToPdfDocumentInfor
mation
HtmlToPdfException

HtmlToPdfOptions

HtmlToPdfProxyOptions

HtmlToPdfResult

HtmlToPdfViewerPreferen
ces

Description
Global properties for
SelectPdf SDK.
Helps defining a set of
html elements that will
not be displayed in the
generated pdf document.
Html to Image Converter.
This class offers the API
needed to create images
in various formats from a
specified web page or
html string.
Html To Pdf Converter.
This class offers the API
needed to convert any
web page url or html
string to pdf.
Authentication options
needed when the web
page to be converted
requires authentication.
This class provides the
possibility to control the
pdf document properties.
Exception thrown by the
html to pdf converter
related objects.
This class contains
various options used for
the html to pdf
conversion.
The proxy settings used
to resolve the HTTP
requests.
Offers information about
the html to pdf
conversion process.
The pdf viewer
preferences. Controls how
the pdf document
66

SelectPdf Html To Pdf Converter for .NET

PdfAction
PdfActionGoTo
PdfActionJavaScript
PdfBookmark
PdfBookmarkOptions

PdfBookmarksCollection

PdfCanvas

PdfColor
PdfCustomPageSize
PdfDestination
PdfDocument
PdfDocumentException

PdfDocumentInformation

PdfDocumentOpenAction

PdfDocumentSecurity

PdfFont
PdfFontCollection
PdfFooter

appears in a pdf viewer


(like Adobe Reader).
Base class for the pdf
actions.
Represents a Go To action
in a pdf document.
Represents a JavaScript
action in a pdf document.
Represents a bookmark in
a pdf document.
Helps defining a set of
html elements that will be
associated with
bookmarks in the
generated pdf document.
Represents the collection
of bookmarks in a pdf
document.
Base class for classes
that can render pdf page
elements.
Represents a pdf color.
The pdf page size
expressed in points.
Represents a destination
in a pdf document.
Represents a pdf
document.
Exception thrown by the
pdf document related
objects.
This class provides the
possibility to control the
pdf document properties.
Encapsulates an action to
be performed when the
pdf document is opened.
This class provides the
options to control the pdf
document security.
Represents a font in a pdf
document.
Represents a collection of
fonts in a pdf document.
Handles the properties of
the footer of the
generated pdf document.
67

SelectPdf Html To Pdf Converter for .NET


PdfHeader

PdfHtmlSection

PdfImageSection

PdfMargins
PdfPage
PdfPageCollection

PdfPageElement

PdfRenderingResult

PdfSectionElement

PdfSecurityOptions

PdfTemplate

PdfTemplateCollection

PdfTextSection

Handles the properties of


the header of the
generated pdf document.
Represents a html
element that can be
added to the header or
footer templates of a pdf
document.
Represents an image that
can be added to the
header or footer
templates of a pdf
document.
Represents the settings
for a pdf page margins.
Represents a page in a
pdf document.
Represents the collection
of pages in a pdf
document.
The base class for all
graphic elements from a
pdf document.
The result of adding a pdf
element to a pdf page or
template.
The base class for pdf
elements that can be
added to header and
footer of a pdf document.
This class provides the
options to control the pdf
document security.
Represents a template in
a pdf document. A
template contains
elements that are
repeated on each page of
the pdf document.
Represents the collection
of pages in a pdf
document. A pdf template
is repeated on each page
of the pdf document.
Represents a text that
can be added to the
header or footer
68

SelectPdf Html To Pdf Converter for .NET

PdfViewerPreferences

WebPageInformation

templates of a pdf
document.
The pdf viewer
preferences. Controls how
the pdf document
appears in a pdf viewer
(like Adobe Reader).
This class provides
information about the
converted web page
(title, description,
keywords).

Enumerations
Enumeration
HtmlToPdfCssMediaType

HtmlToPdfPageFitMode

HtmlToPdfStartupMode
NetworkProxyType

PdfBookmarkStyle
PdfColorSpace

PdfCompressionLevel
PdfDestinationFitMode

PdfEncryptionKeySize
PdfFontType
PdfPageOrientation
PdfPageRotation
PdfPageSize

Description
Specifies what css styles
are loaded when the html
is rendered
Specifies how the html
content is rendered in a
pdf page.
Specifies the converter
startup mode.
The list of available proxy
types used by the
converter to resolve HTTP
requests.
The pdf bookmark text
style.
The list of possible color
spaces for the pdf
document.
The pdf document
compression level.
Specifies the auto-fit
mode for a PdfDestination
object.
The length of the pdf
encryption key.
The list of supported fonts
for the header and footer
The list of pdf pages
available orientations.
Standard rotation angles
for pdf pages.
The list of pdf standard

69

SelectPdf Html To Pdf Converter for .NET

PdfStandard
PdfStandardCJKFont

PdfStandardFont
PdfTemplateAnchoring
PdfTemplateDocking
PdfTextHorizontalAlign
PdfTextVerticalAlign
PdfViewerFullScreenExitM
ode
PdfViewerPageLayout

PdfViewerPageMode
PdfViewerTextOrder

page sizes.
The list of pdf standards
available.
The Korean-JapanesseChinese (CJK) predefined
fonts.
Standard PDF font
families.
The anchoring position of
a pdf template.
The docking style of a pdf
template.
Specifies horizontal
alignment of text.
Specifies vertical
alignment of text.
Specifies how to display
the pdf document on
exiting full-screen mode.
Specifies the page layout
to be used when the pdf
document is opened in a
viewer.
Specifies the pdf
document's page mode.
Used in pdf document
viewer preferences to
specify the reading order
for texts.

70

SelectPdf Html To Pdf Converter for .NET

GlobalProperties Class
Global properties for SelectPdf SDK.

Inheritance Hierarchy
System.Object SelectPdf.GlobalProperties
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class GlobalProperties
VB
Public Class GlobalProperties
The GlobalProperties type exposes the following members.

Constructors
Name
GlobalProperties

Description

Name
HtmlEngineFullPath

Description
Gets or sets the full path
of the html rendering
engine helper file.
Internal use only.
Gets or sets the license
key string received when
the library is purchased.

Properties

LFN
LicenseKey

See Also
SelectPdf Namespace

71

SelectPdf Html To Pdf Converter for .NET

GlobalProperties Constructor
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public GlobalProperties()
VB
Public Sub New

See Also
GlobalProperties Class
SelectPdf Namespace

72

SelectPdf Html To Pdf Converter for .NET

GlobalProperties.GlobalProperties Properties
The GlobalProperties type exposes the following members.

Properties
Name
HtmlEngineFullPath

LFN
LicenseKey

Description
Gets or sets the full path
of the html rendering
engine helper file.
Internal use only.
Gets or sets the license
key string received when
the library is purchased.

See Also
GlobalProperties Class
SelectPdf Namespace

73

SelectPdf Html To Pdf Converter for .NET

GlobalProperties.HtmlEngineFullPath Property
Gets or sets the full path of the html rendering engine helper file.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static string HtmlEngineFullPath { get; set; }
VB
Public Shared Property HtmlEngineFullPath As String
Get
Set
Property Value
Type: String

See Also
GlobalProperties Class
SelectPdf Namespace

74

SelectPdf Html To Pdf Converter for .NET

GlobalProperties.LFN Property
Internal use only.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static string LFN { set; }
VB
Public Shared WriteOnly Property LFN As String
Set
Property Value
Type: String

See Also
GlobalProperties Class
SelectPdf Namespace

75

SelectPdf Html To Pdf Converter for .NET

GlobalProperties.LicenseKey Property
Gets or sets the license key string received when the library is purchased.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static string LicenseKey { get; set; }
VB
Public Shared Property LicenseKey As String
Get
Set
Property Value
Type: String

Remarks
If this property is null the converter will automatically enter in evaluation mode and
a demo watermark is displayed on the generated pdf document.

See Also
GlobalProperties Class
SelectPdf Namespace

76

SelectPdf Html To Pdf Converter for .NET

HiddenWebElements Class
Helps defining a set of html elements that will not be displayed in the generated pdf
document.

Inheritance Hierarchy
System.Object SelectPdf.HiddenWebElements
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class HiddenWebElements
VB
Public Class HiddenWebElements
The HiddenWebElements type exposes the following members.

Constructors
Name
HiddenWebElements

Description

Name
CssSelectors

Description
This property is used to
define an array
containing the selectors
of the html elements that
will not be displayed in
the final pdf document.
For example, the selector
for all the image
elements is "img", the
selector for all the
elements with the CSS
class name 'myclass' is
"*.myclass" and the
selector for the elements
with the id 'myid' is
"*#myid".

Properties

See Also
SelectPdf Namespace

77

SelectPdf Html To Pdf Converter for .NET

HiddenWebElements Constructor
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HiddenWebElements()
VB
Public Sub New

See Also
HiddenWebElements Class
SelectPdf Namespace

78

SelectPdf Html To Pdf Converter for .NET

HiddenWebElements.HiddenWebElements Properties
The HiddenWebElements type exposes the following members.

Properties
Name
CssSelectors

Description
This property is used to
define an array
containing the selectors
of the html elements that
will not be displayed in
the final pdf document.
For example, the selector
for all the image
elements is "img", the
selector for all the
elements with the CSS
class name 'myclass' is
"*.myclass" and the
selector for the elements
with the id 'myid' is
"*#myid".

See Also
HiddenWebElements Class
SelectPdf Namespace

79

SelectPdf Html To Pdf Converter for .NET

HiddenWebElements.CssSelectors Property
This property is used to define an array containing the selectors of the html
elements that will not be displayed in the final pdf document. For example, the
selector for all the image elements is "img", the selector for all the elements with
the CSS class name 'myclass' is "*.myclass" and the selector for the elements with
the id 'myid' is "*#myid".
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string[] CssSelectors { get; set; }
VB
Public Property CssSelectors As String()
Get
Set
Property Value
Type: String[]

See Also
HiddenWebElements Class
SelectPdf Namespace

80

SelectPdf Html To Pdf Converter for .NET

HtmlToImage Class
Html to Image Converter. This class offers the API needed to create images in
various formats from a specified web page or html string.

Inheritance Hierarchy
System.Object SelectPdf.HtmlToImage
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class HtmlToImage
VB
Public Class HtmlToImage
The HtmlToImage type exposes the following members.

Constructors
Name
HtmlToImage()

HtmlToImage(Int32)

HtmlToImage(Int32,
Int32)

Description
Creates an html to image
converter. Width and
height of the web page
are automatically
detected.
Creates an html to image
converter. The width of
the web page is specified.
The height of the web
page is automatically
detected.
Creates an html to image
converter for a web page
with the specified width
and height.

Methods
Name
ConvertHtmlString(String)

ConvertHtmlString(String,
String)
ConvertUrl

Description
Gets an Image object
from the specified html
string.
Gets an Image object
from the specified html
string.
Gets an Image object

81

SelectPdf Html To Pdf Converter for .NET


from the specified url.

Properties
Name
AuthenticationPassword

AuthenticationUsername

HttpCookies

HttpHeaders

JavaScriptEnabled

MaxPageLoadTime
MinPageLoadTime

PluginsEnabled

ProxyOptions

StartupMode

StartupScript

VisibleWebElementId

Description
Specifies the password if
the web page being
converted requires
authentication.
Specifies the username if
the web page being
converted requires
authentication.
Gets the collection of
custom HTTP cookies
used for the conversion.
Get the collection of
custom HTTP headers
used for the conversion.
Enable scripts when
rendering the url or html
string.
The web page navigation
timeout in seconds.
An additional time in
seconds to wait for
asynchronous items to be
loaded before the web
page is rendered.
A flag indicating if plugins
(like Flash players) are
enabled in the converter.
Gets a reference to an
object containing the
proxy settings used to
access the web page that
is being converted.
Use this property to
specify how the
conversion starts.
Use this property to
specify some JavaScript
code that will be injected
into the page that is
converted.
Use this property to
convert only a certain

82

SelectPdf Html To Pdf Converter for .NET

WebPageFixedSize

WebPageHeight

WebPageWidth

section of the web page,


specified by the html
element ID.
Controls whether the web
page is rendered with a
fixed size internal browser
or the size automatically
extends to make the
whole content visible.
Gets or sets the web page
height. If the width was
not set, this property has
no effect.
Gets or sets the web page
width.

See Also
SelectPdf Namespace

83

SelectPdf Html To Pdf Converter for .NET

HtmlToImage Constructor
Overload List
Name
HtmlToImage()

HtmlToImage(Int32)

HtmlToImage(Int32,
Int32)

Description
Creates an html to image
converter. Width and
height of the web page
are automatically
detected.
Creates an html to image
converter. The width of
the web page is specified.
The height of the web
page is automatically
detected.
Creates an html to image
converter for a web page
with the specified width
and height.

See Also
HtmlToImage Class
SelectPdf Namespace

84

SelectPdf Html To Pdf Converter for .NET

HtmlToImage Constructor
Creates an html to image converter. Width and height of the web page are
automatically detected.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToImage()
VB
Public Sub New

See Also
HtmlToImage Class
HtmlToImage Overload
SelectPdf Namespace

85

SelectPdf Html To Pdf Converter for .NET

HtmlToImage Constructor (Int32)


Creates an html to image converter. The width of the web page is specified. The
height of the web page is automatically detected.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToImage(
int webPageWidth
)
VB
Public Sub New (
webPageWidth As Integer
)
Parameters
webPageWidth
Type: System.Int32
The web page width.

See Also
HtmlToImage Class
HtmlToImage Overload
SelectPdf Namespace

86

SelectPdf Html To Pdf Converter for .NET

HtmlToImage Constructor (Int32, Int32)


Creates an html to image converter for a web page with the specified width and
height.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToImage(
int webPageWidth,
int webPageHeight
)
VB
Public Sub New (
webPageWidth As Integer,
webPageHeight As Integer
)
Parameters
webPageWidth
Type: System.Int32
The web page width.
webPageHeight
Type: System.Int32
The web page height.

See Also
HtmlToImage Class
HtmlToImage Overload
SelectPdf Namespace

87

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.HtmlToImage Methods
The HtmlToImage type exposes the following members.

Methods
Name
ConvertHtmlString(String)

ConvertHtmlString(String,
String)
ConvertUrl

Description
Gets an Image object
from the specified html
string.
Gets an Image object
from the specified html
string.
Gets an Image object
from the specified url.

See Also
HtmlToImage Class
SelectPdf Namespace

88

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.ConvertHtmlString Method
Overload List
Name
ConvertHtmlString(String)

ConvertHtmlString(String,
String)

Description
Gets an Image object
from the specified html
string.
Gets an Image object
from the specified html
string.

See Also
HtmlToImage Class
SelectPdf Namespace

89

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.ConvertHtmlString Method (String)


Gets an Image object from the specified html string.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public Image ConvertHtmlString(
string htmlString
)
VB
Public Function ConvertHtmlString (
htmlString As String
) As Image
Parameters
htmlString
Type: System.String
The html string to be converted to image.
Return Value
Type: ImageThe rendered Image object.

Remarks
The Image object can be further manipulated to have the format changed, saved to
disk, etc.

See Also
HtmlToImage Class
ConvertHtmlString Overload
SelectPdf Namespace

90

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.ConvertHtmlString Method (String, String)


Gets an Image object from the specified html string.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public Image ConvertHtmlString(
string htmlString,
string baseUrl
)
VB
Public Function ConvertHtmlString (
htmlString As String,
baseUrl As String
) As Image
Parameters
htmlString
Type: System.String
The html string to be converted to image.
baseUrl
Type: System.String
This parameter allows the converter to resolve relative urls. Basically, baseUrl +
relative image/css url = full absolute url.
Return Value
Type: ImageThe rendered Image object.

Remarks
The baseUrl parameter allows the converter to determine the full absolute urls from
relative urls for images and css files appearing in the html string.

The Image object can be further manipulated to have the format changed, saved to
disk, etc.

See Also
HtmlToImage Class
ConvertHtmlString Overload
SelectPdf Namespace

91

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.ConvertUrl Method
Gets an Image object from the specified url.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public Image ConvertUrl(
string url
)
VB
Public Function ConvertUrl (
url As String
) As Image
Parameters
url
Type: System.String
The full url of the web page to be converted to image. The url can be also the full
path of a html file from the local file system.
Return Value
Type: ImageThe rendered Image object.

Remarks
The Image object can be further manipulated to have the format changed, saved to
disk, etc.

See Also
HtmlToImage Class
SelectPdf Namespace

92

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.HtmlToImage Properties
The HtmlToImage type exposes the following members.

Properties
Name
AuthenticationPassword

AuthenticationUsername

HttpCookies

HttpHeaders

JavaScriptEnabled

MaxPageLoadTime
MinPageLoadTime

PluginsEnabled

ProxyOptions

StartupMode

StartupScript

VisibleWebElementId

Description
Specifies the password if
the web page being
converted requires
authentication.
Specifies the username if
the web page being
converted requires
authentication.
Gets the collection of
custom HTTP cookies
used for the conversion.
Get the collection of
custom HTTP headers
used for the conversion.
Enable scripts when
rendering the url or html
string.
The web page navigation
timeout in seconds.
An additional time in
seconds to wait for
asynchronous items to be
loaded before the web
page is rendered.
A flag indicating if plugins
(like Flash players) are
enabled in the converter.
Gets a reference to an
object containing the
proxy settings used to
access the web page that
is being converted.
Use this property to
specify how the
conversion starts.
Use this property to
specify some JavaScript
code that will be injected
into the page that is
converted.
Use this property to
93

SelectPdf Html To Pdf Converter for .NET

WebPageFixedSize

WebPageHeight

WebPageWidth

convert only a certain


section of the web page,
specified by the html
element ID.
Controls whether the web
page is rendered with a
fixed size internal browser
or the size automatically
extends to make the
whole content visible.
Gets or sets the web page
height. If the width was
not set, this property has
no effect.
Gets or sets the web page
width.

See Also
HtmlToImage Class
SelectPdf Namespace

94

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.AuthenticationPassword Property
Specifies the password if the web page being converted requires authentication.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string AuthenticationPassword { get; set; }
VB
Public Property AuthenticationPassword As String
Get
Set
Property Value
Type: String

See Also
HtmlToImage Class
SelectPdf Namespace

95

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.AuthenticationUsername Property
Specifies the username if the web page being converted requires authentication.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string AuthenticationUsername { get; set; }
VB
Public Property AuthenticationUsername As String
Get
Set
Property Value
Type: String

See Also
HtmlToImage Class
SelectPdf Namespace

96

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.HttpCookies Property
Gets the collection of custom HTTP cookies used for the conversion.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public NameValueCollection HttpCookies { get; }
VB
Public ReadOnly Property HttpCookies As NameValueCollection
Get
Property Value
Type: NameValueCollection

Remarks
This property returns a reference to the collection of custom HTTP cookies to be
sent by the converter to the web server when the web page is rendered. A cookie is
defined by a name/value pair that can be added to the collection using the
Add(String, String) method of the HttpCookies property.

See Also
HtmlToImage Class
SelectPdf Namespace

97

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.HttpHeaders Property
Get the collection of custom HTTP headers used for the conversion.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public NameValueCollection HttpHeaders { get; }
VB
Public ReadOnly Property HttpHeaders As NameValueCollection
Get
Property Value
Type: NameValueCollection

Remarks
This property returns a reference to the collection of custom HTTP headers to be
sent by the converter to the web server when the web page is rendered. A custom
HTTP header is defined by a name/value pair that can be added to the collection
using the Add(String, String) method of the HttpHeaders property.

See Also
HtmlToImage Class
SelectPdf Namespace

98

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.JavaScriptEnabled Property
Enable scripts when rendering the url or html string.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool JavaScriptEnabled { get; set; }
VB
Public Property JavaScriptEnabled As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value of this property is true and the converter will run any javascript
available when the page loads.

Note: If the javascript requires some time to load, MinPageLoadTime property should
be set to delay the conversion with the specified number of seconds and allow the
javascript to run.

See Also
HtmlToImage Class
SelectPdf Namespace

99

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.MaxPageLoadTime Property
The web page navigation timeout in seconds.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int MaxPageLoadTime { get; set; }
VB
Public Property MaxPageLoadTime As Integer
Get
Set
Property Value
Type: Int32

Remarks
Default value is 60 seconds. This value should be increased if large web pages are
loaded.

See Also
HtmlToImage Class
SelectPdf Namespace

100

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.MinPageLoadTime Property
An additional time in seconds to wait for asynchronous items to be loaded before
the web page is rendered.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int MinPageLoadTime { get; set; }
VB
Public Property MinPageLoadTime As Integer
Get
Set
Property Value
Type: Int32

Remarks
A delay of this type could be necessary if javascripts are loaded when the page is
rendered or if Flash movies are played.

See Also
HtmlToImage Class
SelectPdf Namespace

101

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.PluginsEnabled Property
A flag indicating if plugins (like Flash players) are enabled in the converter.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool PluginsEnabled { get; set; }
VB
Public Property PluginsEnabled As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is true.

See Also
HtmlToImage Class
SelectPdf Namespace

102

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.ProxyOptions Property
Gets a reference to an object containing the proxy settings used to access the web
page that is being converted.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfProxyOptions ProxyOptions { get; }
VB
Public ReadOnly Property ProxyOptions As HtmlToPdfProxyOptions
Get
Property Value
Type: HtmlToPdfProxyOptions

See Also
HtmlToImage Class
SelectPdf Namespace

103

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.StartupMode Property
Use this property to specify how the conversion starts.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfStartupMode StartupMode { get; set; }
VB
Public Property StartupMode As HtmlToPdfStartupMode
Get
Set
Property Value
Type: HtmlToPdfStartupMode

Remarks
By default this is set to Automatic and the conversion is started as soon as the page
loads (and MinPageLoadTime elapses). If set to Manual, the conversion is started
only by a javascript call to SelectPdf.startConversion() from within the web page.

See Also
HtmlToImage Class
SelectPdf Namespace

104

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.StartupScript Property
Use this property to specify some JavaScript code that will be injected into the page
that is converted.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string StartupScript { get; set; }
VB
Public Property StartupScript As String
Get
Set
Property Value
Type: String

Remarks
The JavaScript code specified here will run before any other script on the page.

See Also
HtmlToImage Class
SelectPdf Namespace

105

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.VisibleWebElementId Property
Use this property to convert only a certain section of the web page, specified by the
html element ID.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string VisibleWebElementId { set; }
VB
Public WriteOnly Property VisibleWebElementId As String
Set
Property Value
Type: String

See Also
HtmlToImage Class
SelectPdf Namespace

106

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.WebPageFixedSize Property
Controls whether the web page is rendered with a fixed size internal browser or the
size automatically extends to make the whole content visible.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool WebPageFixedSize { get; set; }
VB
Public Property WebPageFixedSize As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
If the html content is not entirely visible in the web page viewer (browser) at the
specified width, this property will control whether the html content is clipped or the
web page browser width is automatically extended to make visible the whole html
content.

The html browser width is given by the WebPageWidth property.

The default value of this property is false.

See Also
HtmlToImage Class
SelectPdf Namespace

107

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.WebPageHeight Property
Gets or sets the web page height. If the width was not set, this property has no
effect.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int WebPageHeight { get; set; }
VB
Public Property WebPageHeight As Integer
Get
Set
Property Value
Type: Int32

See Also
HtmlToImage Class
SelectPdf Namespace

108

SelectPdf Html To Pdf Converter for .NET

HtmlToImage.WebPageWidth Property
Gets or sets the web page width.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int WebPageWidth { get; set; }
VB
Public Property WebPageWidth As Integer
Get
Set
Property Value
Type: Int32

See Also
HtmlToImage Class
SelectPdf Namespace

109

SelectPdf Html To Pdf Converter for .NET

HtmlToPdf Class
Html To Pdf Converter. This class offers the API needed to convert any web page url
or html string to pdf.

Inheritance Hierarchy
System.Object SelectPdf.HtmlToPdf
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class HtmlToPdf
VB
Public Class HtmlToPdf
The HtmlToPdf type exposes the following members.

Constructors
Name
HtmlToPdf()
HtmlToPdf(Int32)
HtmlToPdf(Int32, Int32)

Description
Initializes an instance of
the HtmlToPdf Converter.
Initializes an instance of
the HtmlToPdf Converter.
Initializes an instance of
the HtmlToPdf Converter.

Methods
Name
ConvertHtmlString(String)

ConvertHtmlString(String,
String)

ConvertUrl

Description
Gets a PdfDocument
object representing the
result of the conversion of
the specified html string
to pdf.
Gets a PdfDocument
object representing the
result of the conversion of
the specified html string
to pdf.
Gets a PdfDocument
object representing the
result of the conversion of
the specified url to pdf.

110

SelectPdf Html To Pdf Converter for .NET

Properties
Name
ConversionResult

Footer

Header

Options

Description
Gets a reference to an
object that offers
information about the
result of the html to pdf
conversion process.
Gets a reference to an
object that controls the
properties of the custom
footer of the generated
pdf document.
Gets a reference to an
object that controls the
properties of the custom
header of the generated
pdf document.
Gets a reference to an
object that controls the
html to pdf conversion
process and the
generated pdf document
properties.

Remarks
The result of conversion is a PdfDocument object that can be further modified,
saved to memory or into a file on the disk.

Examples
The following sample code shows how an HtmlToPdf Converter can be instantiated
and a basic conversion performed.
C#
using SelectPdf;
HtmlToPdf converter = new HtmlToPdf();
PdfDocument doc = converter.ConvertUrl(url);
doc.Save(file);
doc.Close();
VB
Imports SelectPdf
Dim converter as HtmlToPdf = New HtmlToPdf()
Dim doc as PdfDocument = converter.ConvertUrl(url)
doc.Save(file)
doc.Close()

111

SelectPdf Html To Pdf Converter for .NET

See Also
SelectPdf Namespace

112

SelectPdf Html To Pdf Converter for .NET

HtmlToPdf Constructor
Overload List
Name
HtmlToPdf()
HtmlToPdf(Int32)
HtmlToPdf(Int32, Int32)

Description
Initializes an instance of
the HtmlToPdf Converter.
Initializes an instance of
the HtmlToPdf Converter.
Initializes an instance of
the HtmlToPdf Converter.

See Also
HtmlToPdf Class
SelectPdf Namespace

113

SelectPdf Html To Pdf Converter for .NET

HtmlToPdf Constructor
Initializes an instance of the HtmlToPdf Converter.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdf()
VB
Public Sub New

Remarks
The web page is rendered by an internal browser having the default width of
1024px. The height of the page is automatically calculated. The width and height
can be set using WebPageWidth and WebPageHeight properties of Options property.
Usually, the web page width and height do not need to be set and the converter
automatically calculates them, but there are some situations (web pages with
frames for example) when the converter cannot calculate the page size correctly. In
this case, the web page width and height needs to be set, otherwise no content will
appear in the generated pdf document.

Examples
The following sample code shows how an HtmlToPdf Converter can be instantiated
and a basic conversion performed.
C#
HtmlToPdf converter = new HtmlToPdf();
PdfDocument doc = converter.ConvertUrl(url);
doc.Save(file);
doc.Close();
VB
Dim converter as HtmlToPdf = New HtmlToPdf()
Dim doc as PdfDocument = converter.ConvertUrl(url)
doc.Save(file)
doc.Close()

See Also
HtmlToPdf Class
HtmlToPdf Overload
SelectPdf Namespace
HtmlToPdfOptions.WebPageWidth
HtmlToPdfOptions.WebPageHeight

114

SelectPdf Html To Pdf Converter for .NET

HtmlToPdf Constructor (Int32)


Initializes an instance of the HtmlToPdf Converter.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdf(
int webPageWidth
)
VB
Public Sub New (
webPageWidth As Integer
)
Parameters
webPageWidth
Type: System.Int32
Width in pixels of the internal browser that renders the web page.

Remarks
The web page is rendered by an internal browser having the width specified by the
webPageWidth parameter and the height automatically calculated. The width and
height can be also set using WebPageWidth and WebPageHeight properties of
Options property.
Usually, the web page height does not need to be set and the converter
automatically calculates it, but there are some situations (web pages with frames
for example) when the converter cannot calculate the page height correctly. In this
case, the web page needs to be set, otherwise no content will appear in the
generated pdf document.

Examples
The following sample code shows how an HtmlToPdf Converter can be instantiated
and a basic conversion performed.
C#
HtmlToPdf converter = new HtmlToPdf(width);
PdfDocument doc = converter.ConvertUrl(url);
doc.Save(file);
doc.Close();
VB
Dim converter as HtmlToPdf = New HtmlToPdf(width)
Dim doc as PdfDocument = converter.ConvertUrl(url)
doc.Save(file)
115

SelectPdf Html To Pdf Converter for .NET


doc.Close()

See Also
HtmlToPdf Class
HtmlToPdf Overload
SelectPdf Namespace
HtmlToPdfOptions.WebPageWidth
HtmlToPdfOptions.WebPageHeight

116

SelectPdf Html To Pdf Converter for .NET

HtmlToPdf Constructor (Int32, Int32)


Initializes an instance of the HtmlToPdf Converter.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdf(
int webPageWidth,
int webPageHeight
)
VB
Public Sub New (
webPageWidth As Integer,
webPageHeight As Integer
)
Parameters
webPageWidth
Type: System.Int32
Width in pixels of the internal browser that renders the web page.
webPageHeight
Type: System.Int32
Height in pixels of the internal browser that renders the web page.

Remarks
The web page is rendered by an internal browser having the width specified by the
webPageWidth parameter and the height of the page specified by the webPageHeight
parameter. The width and height can be also set using WebPageWidth and
WebPageHeight properties of Options property.
If webPageHeight is set, the web page will be truncated to the specified height.
Usually, webPageHeight should be set to 0 to determine the converter to
automatically calculate the page height, but there are some situations (web pages
with frames for example) when the converter cannot calculate the page height
correctly. In this case, webPageHeight needs to be set, otherwise no content will
appear in the generated pdf document.

Examples
The following sample code shows how an HtmlToPdf Converter can be instantiated
and a basic conversion performed.
C#
HtmlToPdf converter = new HtmlToPdf(width, height);
PdfDocument doc = converter.ConvertUrl(url);

117

SelectPdf Html To Pdf Converter for .NET


doc.Save(file);
doc.Close();
VB
Dim converter as HtmlToPdf = New HtmlToPdf(width, height)
Dim doc as PdfDocument = converter.ConvertUrl(url)
doc.Save(file)
doc.Close()

See Also
HtmlToPdf Class
HtmlToPdf Overload
SelectPdf Namespace
HtmlToPdfOptions.WebPageWidth
HtmlToPdfOptions.WebPageHeight

118

SelectPdf Html To Pdf Converter for .NET

HtmlToPdf.HtmlToPdf Methods
The HtmlToPdf type exposes the following members.

Methods
Name
ConvertHtmlString(String)

ConvertHtmlString(String,
String)

ConvertUrl

Description
Gets a PdfDocument
object representing the
result of the conversion of
the specified html string
to pdf.
Gets a PdfDocument
object representing the
result of the conversion of
the specified html string
to pdf.
Gets a PdfDocument
object representing the
result of the conversion of
the specified url to pdf.

See Also
HtmlToPdf Class
SelectPdf Namespace

119

SelectPdf Html To Pdf Converter for .NET

HtmlToPdf.ConvertHtmlString Method
Overload List
Name
ConvertHtmlString(String)

ConvertHtmlString(String,
String)

Description
Gets a PdfDocument
object representing the
result of the conversion of
the specified html string
to pdf.
Gets a PdfDocument
object representing the
result of the conversion of
the specified html string
to pdf.

See Also
HtmlToPdf Class
SelectPdf Namespace

120

SelectPdf Html To Pdf Converter for .NET

HtmlToPdf.ConvertHtmlString Method (String)


Gets a PdfDocument object representing the result of the conversion of the
specified html string to pdf.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfDocument ConvertHtmlString(
string htmlString
)
VB
Public Function ConvertHtmlString (
htmlString As String
) As PdfDocument
Parameters
htmlString
Type: System.String
The html string to be converted to pdf.
Return Value
Type: PdfDocumentThe PdfDocument object that can be modified and saved to a
file, to a stream, to a memory buffer or to a HTTP response.

Remarks
The resulted PdfDocument object can be modified and saved to a file, to a stream,
to a memory buffer or to a HTTP response. The PdfDocument object must be closed
after save to release the system resources used during conversion.
This method does not use any base url and therefore the images or css files
referenced by relative urls in the html string cannot be resolved by the converter to
an absolute url. If there are external resources referenced by relative urls, the
ConvertHtmlString(String, String) method with the baseUrl additional parameter
should be used.

Examples
The following sample code shows how an HtmlToPdf Converter can be instantiated
and a basic conversion performed.
C#
HtmlToPdf converter = new HtmlToPdf();
PdfDocument doc = converter.ConvertHtmlString(html);
doc.Save(file);
doc.Close();

121

SelectPdf Html To Pdf Converter for .NET


VB
Dim converter as HtmlToPdf = New HtmlToPdf()
Dim doc as PdfDocument = converter.ConvertString(html)
doc.Save(file)
doc.Close()

See Also
HtmlToPdf Class
ConvertHtmlString Overload
SelectPdf Namespace

122

SelectPdf Html To Pdf Converter for .NET

HtmlToPdf.ConvertHtmlString Method (String, String)


Gets a PdfDocument object representing the result of the conversion of the
specified html string to pdf.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfDocument ConvertHtmlString(
string htmlString,
string baseUrl
)
VB
Public Function ConvertHtmlString (
htmlString As String,
baseUrl As String
) As PdfDocument
Parameters
htmlString
Type: System.String
The html string to be converted to pdf.
baseUrl
Type: System.String
This parameter allows the converter to resolve relative urls. Basically, baseUrl +
relative image/css url = full absolute url.
Return Value
Type: PdfDocumentThe PdfDocument object that can be modified and saved to a
file, to a stream, to a memory buffer or to a HTTP response.

Remarks
The resulted PdfDocument object can be modified and saved to a file, to a stream,
to a memory buffer or to a HTTP response. The PdfDocument object must be closed
after save to release the system resources used during conversion.
The baseUrl parameter allows the converter to determine the full absolute urls from
relative urls for images and css files appearing in the html string.

Examples
The following sample code shows how an HtmlToPdf Converter can be instantiated
and a basic conversion performed.
C#
HtmlToPdf converter = new HtmlToPdf();

123

SelectPdf Html To Pdf Converter for .NET


PdfDocument doc = converter.ConvertHtmlString(html, baseUrl);
doc.Save(file);
doc.Close();
VB
Dim converter as HtmlToPdf = New HtmlToPdf()
Dim doc as PdfDocument = converter.ConvertString(html, baseUrl)
doc.Save(file)
doc.Close()

See Also
HtmlToPdf Class
ConvertHtmlString Overload
SelectPdf Namespace

124

SelectPdf Html To Pdf Converter for .NET

HtmlToPdf.ConvertUrl Method
Gets a PdfDocument object representing the result of the conversion of the
specified url to pdf.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfDocument ConvertUrl(
string url
)
VB
Public Function ConvertUrl (
url As String
) As PdfDocument
Parameters
url
Type: System.String
The full url of the web page to be converted to pdf. The url can be also the full path
of a html file from the local file system.
Return Value
Type: PdfDocumentThe PdfDocument object that can be modified and saved to a
file, to a stream, to a memory buffer or to a HTTP response.

Remarks
The resulted PdfDocument object can be modified and saved to a file, to a stream,
to a memory buffer or to a HTTP response. The PdfDocument object must be closed
after save to release the system resources used during conversion.

Examples
The following sample code shows how an HtmlToPdf Converter can be instantiated
and a basic conversion performed.
C#
HtmlToPdf converter = new HtmlToPdf();
PdfDocument doc = converter.ConvertUrl(url);
doc.Save(file);
doc.Close();
VB
Dim converter as HtmlToPdf = New HtmlToPdf()
Dim doc as PdfDocument = converter.ConvertUrl(url)
doc.Save(file)
doc.Close()
125

SelectPdf Html To Pdf Converter for .NET

See Also
HtmlToPdf Class
SelectPdf Namespace

126

SelectPdf Html To Pdf Converter for .NET

HtmlToPdf.HtmlToPdf Properties
The HtmlToPdf type exposes the following members.

Properties
Name
ConversionResult

Footer

Header

Options

Description
Gets a reference to an
object that offers
information about the
result of the html to pdf
conversion process.
Gets a reference to an
object that controls the
properties of the custom
footer of the generated
pdf document.
Gets a reference to an
object that controls the
properties of the custom
header of the generated
pdf document.
Gets a reference to an
object that controls the
html to pdf conversion
process and the
generated pdf document
properties.

See Also
HtmlToPdf Class
SelectPdf Namespace

127

SelectPdf Html To Pdf Converter for .NET

HtmlToPdf.ConversionResult Property
Gets a reference to an object that offers information about the result of the html to
pdf conversion process.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfResult ConversionResult { get; }
VB
Public ReadOnly Property ConversionResult As HtmlToPdfResult
Get
Property Value
Type: HtmlToPdfResult

Remarks
After a successful conversion this property is initialized with an instance of the
HtmlToPdfResult class. If the conversion failed this property returns a null value.

See Also
HtmlToPdf Class
SelectPdf Namespace

128

SelectPdf Html To Pdf Converter for .NET

HtmlToPdf.Footer Property
Gets a reference to an object that controls the properties of the custom footer of the
generated pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfFooter Footer { get; }
VB
Public ReadOnly Property Footer As PdfFooter
Get
Property Value
Type: PdfFooter

Remarks
The footer is displayed in the generated pdf document only if the DisplayFooter
property is set to true.

See Also
HtmlToPdf Class
SelectPdf Namespace

129

SelectPdf Html To Pdf Converter for .NET

HtmlToPdf.Header Property
Gets a reference to an object that controls the properties of the custom header of
the generated pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfHeader Header { get; }
VB
Public ReadOnly Property Header As PdfHeader
Get
Property Value
Type: PdfHeader

Remarks
The header is displayed in the generated pdf document only if the DisplayHeader
property is set to true.

See Also
HtmlToPdf Class
SelectPdf Namespace

130

SelectPdf Html To Pdf Converter for .NET

HtmlToPdf.Options Property
Gets a reference to an object that controls the html to pdf conversion process and
the generated pdf document properties.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfOptions Options { get; }
VB
Public ReadOnly Property Options As HtmlToPdfOptions
Get
Property Value
Type: HtmlToPdfOptions

Remarks
This property can be used to control the generated pdf header, footer, margins,
page size and orientation, compression level, content resizing and many more.
Check HtmlToPdfOptions for complete details.

See Also
HtmlToPdf Class
SelectPdf Namespace

131

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfAuthenticationOptions Class
Authentication options needed when the web page to be converted requires
authentication.

Inheritance Hierarchy
System.Object SelectPdf.HtmlToPdfAuthenticationOptions
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class HtmlToPdfAuthenticationOptions
VB
Public Class HtmlToPdfAuthenticationOptions
The HtmlToPdfAuthenticationOptions type exposes the following members.

Constructors
Name
HtmlToPdfAuthenticationO
ptions

Description

Name
Password

Description
Specifies the password if
the web page to be
converted requires
authentication.
Specifies the user name if
the web page to be
converted requires
authentication.

Properties

Username

See Also
SelectPdf Namespace

132

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfAuthenticationOptions Constructor
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfAuthenticationOptions()
VB
Public Sub New

See Also
HtmlToPdfAuthenticationOptions Class
SelectPdf Namespace

133

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfAuthenticationOptions.HtmlToPdfAuthentication
Options Properties
The HtmlToPdfAuthenticationOptions type exposes the following members.

Properties
Name
Password

Username

Description
Specifies the password if
the web page to be
converted requires
authentication.
Specifies the user name if
the web page to be
converted requires
authentication.

See Also
HtmlToPdfAuthenticationOptions Class
SelectPdf Namespace

134

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfAuthenticationOptions.Password Property
Specifies the password if the web page to be converted requires authentication.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string Password { get; set; }
VB
Public Property Password As String
Get
Set
Property Value
Type: String

See Also
HtmlToPdfAuthenticationOptions Class
SelectPdf Namespace

135

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfAuthenticationOptions.Username Property
Specifies the user name if the web page to be converted requires authentication.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string Username { get; set; }
VB
Public Property Username As String
Get
Set
Property Value
Type: String

See Also
HtmlToPdfAuthenticationOptions Class
SelectPdf Namespace

136

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfCssMediaType Enumeration
Specifies what css styles are loaded when the html is rendered
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum HtmlToPdfCssMediaType
VB
Public Enumeration HtmlToPdfCssMediaType

Members
Member name
Screen

Value
0

Print

Description
Default (screen)
css styles are
loaded
Print css styles are
loaded

See Also
SelectPdf Namespace

137

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfDocumentInformation Class
This class provides the possibility to control the pdf document properties.

Inheritance Hierarchy
System.Object SelectPdf.HtmlToPdfDocumentInformation
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class HtmlToPdfDocumentInformation
VB
Public Class HtmlToPdfDocumentInformation
The HtmlToPdfDocumentInformation type exposes the following members.

Constructors
Name
HtmlToPdfDocumentInfor
mation

Description

Name
Author

Description
Gets or sets the name of
the pdf document author.
Gets or sets the date and
time when the pdf
document was created.
Gets or sets the pdf
document keywords.
Gets the name of the
application that
generated the pdf
document (Select.Pdf
SDK).
Gets or sets the subject
of the pdf document.
Gets or sets the pdf
document title.

Properties

CreationDate

Keywords
Producer

Subject
Title

Remarks
Using this class, the pdf document properties (author, title, keywords, etc) can be
controlled. The HtmlToPdfOptions class defines a reference to an object of this type.

138

SelectPdf Html To Pdf Converter for .NET

See Also
SelectPdf Namespace

139

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfDocumentInformation Constructor
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfDocumentInformation()
VB
Public Sub New

See Also
HtmlToPdfDocumentInformation Class
SelectPdf Namespace

140

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfDocumentInformation.HtmlToPdfDocumentInfor
mation Properties
The HtmlToPdfDocumentInformation type exposes the following members.

Properties
Name
Author
CreationDate

Keywords
Producer

Subject
Title

Description
Gets or sets the name of
the pdf document author.
Gets or sets the date and
time when the pdf
document was created.
Gets or sets the pdf
document keywords.
Gets the name of the
application that
generated the pdf
document (Select.Pdf
SDK).
Gets or sets the subject
of the pdf document.
Gets or sets the pdf
document title.

See Also
HtmlToPdfDocumentInformation Class
SelectPdf Namespace

141

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfDocumentInformation.Author Property
Gets or sets the name of the pdf document author.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string Author { get; set; }
VB
Public Property Author As String
Get
Set
Property Value
Type: String

See Also
HtmlToPdfDocumentInformation Class
SelectPdf Namespace

142

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfDocumentInformation.CreationDate Property
Gets or sets the date and time when the pdf document was created.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public DateTime CreationDate { get; set; }
VB
Public Property CreationDate As DateTime
Get
Set
Property Value
Type: DateTime

See Also
HtmlToPdfDocumentInformation Class
SelectPdf Namespace

143

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfDocumentInformation.Keywords Property
Gets or sets the pdf document keywords.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string Keywords { get; set; }
VB
Public Property Keywords As String
Get
Set
Property Value
Type: String

See Also
HtmlToPdfDocumentInformation Class
SelectPdf Namespace

144

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfDocumentInformation.Producer Property
Gets the name of the application that generated the pdf document (Select.Pdf SDK).
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string Producer { get; }
VB
Public ReadOnly Property Producer As String
Get
Property Value
Type: String

See Also
HtmlToPdfDocumentInformation Class
SelectPdf Namespace

145

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfDocumentInformation.Subject Property
Gets or sets the subject of the pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string Subject { get; set; }
VB
Public Property Subject As String
Get
Set
Property Value
Type: String

See Also
HtmlToPdfDocumentInformation Class
SelectPdf Namespace

146

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfDocumentInformation.Title Property
Gets or sets the pdf document title.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string Title { get; set; }
VB
Public Property Title As String
Get
Set
Property Value
Type: String

See Also
HtmlToPdfDocumentInformation Class
SelectPdf Namespace

147

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfException Class
Exception thrown by the html to pdf converter related objects.

Inheritance Hierarchy
System.Object System.Exception

SelectPdf.HtmlToPdfException

Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)


Version: 1.0

Syntax
C#
public class HtmlToPdfException : Exception
VB
Public Class HtmlToPdfException
Inherits Exception

Constructors
Name
HtmlToPdfException(Strin
g)
HtmlToPdfException(Strin
g, Exception)

Description
Initializes a
HtmlToPdfException
object.
Initializes a
HtmlToPdfException
object.

See Also
SelectPdf Namespace

148

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfException Constructor
Overload List
Name
HtmlToPdfException(Strin
g)
HtmlToPdfException(Strin
g, Exception)

Description
Initializes a
HtmlToPdfException
object.
Initializes a
HtmlToPdfException
object.

See Also
HtmlToPdfException Class
SelectPdf Namespace

149

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfException Constructor (String)


Initializes a HtmlToPdfException object.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfException(
string message
)
VB
Public Sub New (
message As String
)
Parameters
message
Type: System.String
The exception message.

See Also
HtmlToPdfException Class
HtmlToPdfException Overload
SelectPdf Namespace

150

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfException Constructor (String, Exception)


Initializes a HtmlToPdfException object.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfException(
string message,
Exception innerException
)
VB
Public Sub New (
message As String,
innerException As Exception
)
Parameters
message
Type: System.String
The exception message.
innerException
Type: System.Exception
The inner exception that triggered this exception.

See Also
HtmlToPdfException Class
HtmlToPdfException Overload
SelectPdf Namespace

151

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions Class
This class contains various options used for the html to pdf conversion.

Inheritance Hierarchy
System.Object SelectPdf.HtmlToPdfOptions
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class HtmlToPdfOptions
VB
Public Class HtmlToPdfOptions
The HtmlToPdfOptions type exposes the following members.

Constructors
Name
HtmlToPdfOptions

Description

Name
Authentication

Description
Handles authentication
options if the web page
being converted requires
authentication.
Specifies the html
content vertical auto fit
mode.
Specifies the html
content horizontal auto fit
mode.
Gets or sets the color
space of the generated
pdf document.
Indicates what css styles
are used when the web
page is rendered.
Controls if a custom
footer is displayed in the
generated pdf document.
Controls if a custom
header is displayed in the
generated pdf document.

Properties

AutoFitHeight

AutoFitWidth

ColorSpace

CssMediaType

DisplayFooter

DisplayHeader

152

SelectPdf Html To Pdf Converter for .NET


DrawBackground

EmbedFonts

ExternalLinksEnabled
HttpCookies

HttpHeaders

InternalLinksEnabled

JavaScriptEnabled

JpegCompressionEnabled

JpegCompressionLevel

KeepImagesTogether

KeepTextsTogether

MarginBottom
MarginLeft
MarginRight

Gets or sets a flag


indicating if the web page
background is rendered in
pdf.
Instructs the converter to
embed all the needed
fonts into the pdf
document or not.
Controls the rendering of
external hyperlinks in pdf.
Gets the collection of
custom HTTP cookies
used for the conversion.
Get the collection of
custom HTTP headers
used for the conversion.
Controls the conversion of
internal html links to
internal pdf links.
Enable scripts when
rendering the url or html
string.
Gets or sets a flag
indicating if the JPEG
compression is enabled or
not for the images in the
generated pdf document.
Gets or sets the
compression level of
images in the generated
pdf document.
This property instructs
the converter whether to
try to avoid cutting off
the images between pdf
pages or not.
This property instructs
the converter whether to
try to avoid cutting off
the text lines between pdf
pages or not.
The bottom margin of the
pdf document.
The left margin of the pdf
document.
The right margin of the
pdf document.
153

SelectPdf Html To Pdf Converter for .NET


MarginTop
MaximumConcurrentConv
ersions

MaxPageLoadTime
MinPageLoadTime

PdfBookmarkOptions

PdfCompressionLevel

PdfDocumentInformation

PdfPageCustomSize

PdfPageOrientation

PdfPageSize

PdfStandard

PluginsEnabled

ProxyOptions

SecurityOptions

The top margin of the pdf


document.
Maximum number of html
to pdf conversions that
can be performed
simultaneously.
The web page navigation
timeout in seconds.
An additional time in
seconds to wait for
asynchronous items to be
loaded before the web
page is rendered.
Gets a reference to the
object that controls the
bookmarks creation for
the generated pdf
document.
This property controls the
compression level of the
generated pdf document.
Gets a reference to the
object that specifies the
generated pdf document
properties.
This property can be used
to specify a custom pdf
document page size.
This property controls the
page orientation of the
generated pdf document
pages.
This property controls the
size of the generated
document pages.
Defines the pdf standard
used by the generated
pdf document.
A flag indicating if plugins
(like Flash players) are
enabled in the converter.
Gets a reference to an
object containing the
proxy settings used to
access the web page that
is being converted.
Gets a reference to the
154

SelectPdf Html To Pdf Converter for .NET

ViewerPreferences

WebPageFixedSize

WebPageHeight

WebPageWidth

object that specifies the


generated pdf document
security settings.
Controls how the pdf
document will appear in a
pdf viewer (like Adobe
Reader).
Controls whether the web
page is rendered with a
fixed size internal browser
or the size automatically
extends to make the
whole content visible.
Gets or sets the height of
the converted web page
as it would appear in the
internal browser used to
render the html.
Gets or sets the width of
the converted web page
as it would appear in the
internal browser used to
render the html.

Remarks
The HtmlToPdf class defines a reference to an object of this type.

See Also
SelectPdf Namespace

155

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions Constructor
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfOptions()
VB
Public Sub New

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

156

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.HtmlToPdfOptions Properties
The HtmlToPdfOptions type exposes the following members.

Properties
Name
Authentication

AutoFitHeight

AutoFitWidth

ColorSpace

CssMediaType

DisplayFooter

DisplayHeader

DrawBackground

EmbedFonts

ExternalLinksEnabled
HttpCookies

HttpHeaders

InternalLinksEnabled

Description
Handles authentication
options if the web page
being converted requires
authentication.
Specifies the html
content vertical auto fit
mode.
Specifies the html
content horizontal auto fit
mode.
Gets or sets the color
space of the generated
pdf document.
Indicates what css styles
are used when the web
page is rendered.
Controls if a custom
footer is displayed in the
generated pdf document.
Controls if a custom
header is displayed in the
generated pdf document.
Gets or sets a flag
indicating if the web page
background is rendered in
pdf.
Instructs the converter to
embed all the needed
fonts into the pdf
document or not.
Controls the rendering of
external hyperlinks in pdf.
Gets the collection of
custom HTTP cookies
used for the conversion.
Get the collection of
custom HTTP headers
used for the conversion.
Controls the conversion of
internal html links to
internal pdf links.
157

SelectPdf Html To Pdf Converter for .NET


JavaScriptEnabled

JpegCompressionEnabled

JpegCompressionLevel

KeepImagesTogether

KeepTextsTogether

MarginBottom
MarginLeft
MarginRight
MarginTop
MaximumConcurrentConv
ersions

MaxPageLoadTime
MinPageLoadTime

PdfBookmarkOptions

PdfCompressionLevel

Enable scripts when


rendering the url or html
string.
Gets or sets a flag
indicating if the JPEG
compression is enabled or
not for the images in the
generated pdf document.
Gets or sets the
compression level of
images in the generated
pdf document.
This property instructs
the converter whether to
try to avoid cutting off
the images between pdf
pages or not.
This property instructs
the converter whether to
try to avoid cutting off
the text lines between pdf
pages or not.
The bottom margin of the
pdf document.
The left margin of the pdf
document.
The right margin of the
pdf document.
The top margin of the pdf
document.
Maximum number of html
to pdf conversions that
can be performed
simultaneously.
The web page navigation
timeout in seconds.
An additional time in
seconds to wait for
asynchronous items to be
loaded before the web
page is rendered.
Gets a reference to the
object that controls the
bookmarks creation for
the generated pdf
document.
This property controls the
158

SelectPdf Html To Pdf Converter for .NET

PdfDocumentInformation

PdfPageCustomSize

PdfPageOrientation

PdfPageSize

PdfStandard

PluginsEnabled

ProxyOptions

SecurityOptions

ViewerPreferences

WebPageFixedSize

WebPageHeight

WebPageWidth

compression level of the


generated pdf document.
Gets a reference to the
object that specifies the
generated pdf document
properties.
This property can be used
to specify a custom pdf
document page size.
This property controls the
page orientation of the
generated pdf document
pages.
This property controls the
size of the generated
document pages.
Defines the pdf standard
used by the generated
pdf document.
A flag indicating if plugins
(like Flash players) are
enabled in the converter.
Gets a reference to an
object containing the
proxy settings used to
access the web page that
is being converted.
Gets a reference to the
object that specifies the
generated pdf document
security settings.
Controls how the pdf
document will appear in a
pdf viewer (like Adobe
Reader).
Controls whether the web
page is rendered with a
fixed size internal browser
or the size automatically
extends to make the
whole content visible.
Gets or sets the height of
the converted web page
as it would appear in the
internal browser used to
render the html.
Gets or sets the width of
159

SelectPdf Html To Pdf Converter for .NET


the converted web page
as it would appear in the
internal browser used to
render the html.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

160

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.Authentication Property
Handles authentication options if the web page being converted requires
authentication.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfAuthenticationOptions Authentication { get; }
VB
Public ReadOnly Property Authentication As
HtmlToPdfAuthenticationOptions
Get
Property Value
Type: HtmlToPdfAuthenticationOptions

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

161

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.AutoFitHeight Property
Specifies the html content vertical auto fit mode.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfPageFitMode AutoFitHeight { get; set; }
VB
Public Property AutoFitHeight As HtmlToPdfPageFitMode
Get
Set
Property Value
Type: HtmlToPdfPageFitMode

Remarks
The converter considers both AutoFitWidth and AutoFitHeight when the html
content is rendered in the pdf page or specified rectangle.

If this property is set to NoAdjustment, the html content is not resized vertically in
any way to fit the available space. If the content is larger, it will be cut and not all of
it will be displayed in the generated pdf file.

If this property is set to ShrinkOnly, the html content is resized only if the content
height is larger than the destination space (pdf page or rectangle) height. In this
case, the content is shrunk to fit the destination space height and the elements that
it contains (texts, images) will appear smaller in the generated pdf document than
in the original web page. If the original content height is smaller than the
destination height, no adjustments will be done and the content will be rendered
exactly as it is, even though some additional white space might appear at the
bottom.

If this property is set to AutoFit, the converter will treat it like ShrinkOnly.
The default value of this property is NoAdjustment and for rendering, the converter
will only take AutoFitWidth into consideration.

See Also
HtmlToPdfOptions Class

162

SelectPdf Html To Pdf Converter for .NET


SelectPdf Namespace

163

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.AutoFitWidth Property
Specifies the html content horizontal auto fit mode.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfPageFitMode AutoFitWidth { get; set; }
VB
Public Property AutoFitWidth As HtmlToPdfPageFitMode
Get
Set
Property Value
Type: HtmlToPdfPageFitMode

Remarks
The converter considers both AutoFitWidth and AutoFitHeight when the html
content is rendered in the pdf page or specified rectangle.

If this property is set to NoAdjustment, the html content is not resized horizontally
in any way to fit the available space. If the content is larger, it will be cut and not all
of it will be displayed in the generated pdf file.

If this property is set to ShrinkOnly, the html content is resized only if the content
width is larger than the destination space (pdf page or rectangle) width. In this case,
the content is shrunk to fit the destination space width and the elements that it
contains (texts, images) will appear smaller in the generated pdf document than in
the original web page. If the original content width is smaller than the destination
width, no adjustments will be done and the content will be rendered exactly as it is,
even though some additional white space might appear to its right.

If this property is set to AutoFit, the html content is resized to fit the available width
of the destination space. If the original content width is smaller than the destination
width, the elements rendered (texts, images) will appear larger in the generated pdf
document. If the original content width is larger than the destination width, the
elements rendered (texts, images) will appear smaller in the generated pdf
document.
The default value of this property is ShrinkOnly.
164

SelectPdf Html To Pdf Converter for .NET

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

165

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.ColorSpace Property
Gets or sets the color space of the generated pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfColorSpace ColorSpace { get; set; }
VB
Public Property ColorSpace As PdfColorSpace
Get
Set
Property Value
Type: PdfColorSpace

Remarks
The possible values are RGB, CMYK or GrayScale. The default color space is RGB.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

166

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.CssMediaType Property
Indicates what css styles are used when the web page is rendered.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfCssMediaType CssMediaType { get; set; }
VB
Public Property CssMediaType As HtmlToPdfCssMediaType
Get
Set
Property Value
Type: HtmlToPdfCssMediaType

Remarks
The default value is Screen and the page is rendered like in a regular web browser.
If the page contains printer specific styles, the property should be set to Print to
have the page rendered using those css styles.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

167

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.DisplayFooter Property
Controls if a custom footer is displayed in the generated pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool DisplayFooter { get; set; }
VB
Public Property DisplayFooter As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The footer properties can be customized using the PdfFooter object exposed by
Footer property of the HtmlToPdf converter class.
Note: The default value of this property is false and the generated pdf document will
not have a custom footer.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

168

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.DisplayHeader Property
Controls if a custom header is displayed in the generated pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool DisplayHeader { get; set; }
VB
Public Property DisplayHeader As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The header properties can be customized using the PdfHeader object exposed by
Header property of the HtmlToPdf converter class.
Note: The default value of this property is false and the generated pdf document will
not have a custom header.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

169

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.DrawBackground Property
Gets or sets a flag indicating if the web page background is rendered in pdf.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool DrawBackground { get; set; }
VB
Public Property DrawBackground As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is true and the page background is rendered into
the generated pdf. Even though it might be white, it will still make invisible any pdf
element that was rendered behind it. Setting this property to false can make visible
the existing pdf elements behind this html element.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

170

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.EmbedFonts Property
Instructs the converter to embed all the needed fonts into the pdf document or not.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool EmbedFonts { get; set; }
VB
Public Property EmbedFonts As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is false and the fonts are not automatically
embedded.
This property does not control the web fonts (fonts that are downloaded with the
web page). The web fonts are always embedded because they are not installed on
the machine.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

171

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.ExternalLinksEnabled Property
Controls the rendering of external hyperlinks in pdf.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool ExternalLinksEnabled { get; set; }
VB
Public Property ExternalLinksEnabled As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is true and in this case all external hyperlinks
from the web page will be rendered in the generated pdf document.
When this property is set to false, external links are ignore and they do not appear
in the generated pdf document.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

172

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.HttpCookies Property
Gets the collection of custom HTTP cookies used for the conversion.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public NameValueCollection HttpCookies { get; }
VB
Public ReadOnly Property HttpCookies As NameValueCollection
Get
Property Value
Type: NameValueCollection

Remarks
This property returns a reference to the collection of custom HTTP cookies to be
sent by the converter to the web server when the web page is rendered. A cookie is
defined by a name/value pair that can be added to the collection using the
Add(String, String) method of the HttpCookies property.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

173

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.HttpHeaders Property
Get the collection of custom HTTP headers used for the conversion.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public NameValueCollection HttpHeaders { get; }
VB
Public ReadOnly Property HttpHeaders As NameValueCollection
Get
Property Value
Type: NameValueCollection

Remarks
This property returns a reference to the collection of custom HTTP headers to be
sent by the converter to the web server when the web page is rendered. A custom
HTTP header is defined by a name/value pair that can be added to the collection
using the Add(String, String) method of the HttpHeaders property.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

174

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.InternalLinksEnabled Property
Controls the conversion of internal html links to internal pdf links.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool InternalLinksEnabled { get; set; }
VB
Public Property InternalLinksEnabled As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is true and in this case all internal hyperlinks
from the web page (links that point within the web page) will be rendered in the
generated pdf document as internal pdf links (clicking one of them will jump within
the pdf document).

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

175

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.JavaScriptEnabled Property
Enable scripts when rendering the url or html string.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool JavaScriptEnabled { get; set; }
VB
Public Property JavaScriptEnabled As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value of this property is true and the converter will run any javascript
available when the page loads.

Note: If the javascript requires some time to load, MinPageLoadTime property should
be set to delay the conversion with the specified number of seconds and allow the
javascript to run.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

176

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.JpegCompressionEnabled Property
Gets or sets a flag indicating if the JPEG compression is enabled or not for the
images in the generated pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool JpegCompressionEnabled { get; set; }
VB
Public Property JpegCompressionEnabled As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
By default the JPEG compression is enabled to reduce the size of the generated pdf
document. When the JPEG compression is enabled the quality of the images in the
generated pdf is lower than the quality of the original images from the web page,
and this quality depends on the JpegCompressionLevel parameter. When the
JpegCompressionLevel is increased, the quality of the images in pdf decreases.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

177

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.JpegCompressionLevel Property
Gets or sets the compression level of images in the generated pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int JpegCompressionLevel { get; set; }
VB
Public Property JpegCompressionLevel As Integer
Get
Set
Property Value
Type: Int32

Remarks
This property can take values between 0 and 100. It has effect only when the
JpegCompressionEnabled is set to true. When the JpegCompressionLevel is 0, the
compression rate is the lowest and the quality of the images is the best. When the
JpegCompressionLevel is 100, the compression rate is the highest and quality of
the images in PDF is the worst.

The default JPEG compression level is 10, which should offer a good balance
between the compression rate and the quality of the images in pdf.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

178

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.KeepImagesTogether Property
This property instructs the converter whether to try to avoid cutting off the images
between pdf pages or not.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool KeepImagesTogether { get; set; }
VB
Public Property KeepImagesTogether As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value is false and the converter does not try to avoid images cutting
between pdf pages.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

179

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.KeepTextsTogether Property
This property instructs the converter whether to try to avoid cutting off the text
lines between pdf pages or not.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool KeepTextsTogether { get; set; }
VB
Public Property KeepTextsTogether As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value is true and the converter tries to avoid text cutting between pdf
pages.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

180

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.MarginBottom Property
The bottom margin of the pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int MarginBottom { get; set; }
VB
Public Property MarginBottom As Integer
Get
Set
Property Value
Type: Int32

Remarks
The margin is specified in points. 1 point is 1/72 inch.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

181

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.MarginLeft Property
The left margin of the pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int MarginLeft { get; set; }
VB
Public Property MarginLeft As Integer
Get
Set
Property Value
Type: Int32

Remarks
The margin is specified in points. 1 point is 1/72 inch.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

182

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.MarginRight Property
The right margin of the pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int MarginRight { get; set; }
VB
Public Property MarginRight As Integer
Get
Set
Property Value
Type: Int32

Remarks
The margin is specified in points. 1 point is 1/72 inch.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

183

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.MarginTop Property
The top margin of the pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int MarginTop { get; set; }
VB
Public Property MarginTop As Integer
Get
Set
Property Value
Type: Int32

Remarks
The margin is specified in points. 1 point is 1/72 inch.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

184

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.MaximumConcurrentConversions
Property
Maximum number of html to pdf conversions that can be performed simultaneously.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static int MaximumConcurrentConversions { get; set; }
VB
Public Shared Property MaximumConcurrentConversions As Integer
Get
Set
Property Value
Type: Int32

Remarks
This parameter must be set before the first conversion performed by the
application. When this property is set with a negative value or zero, the concurrency
level is maximum. The default value is 4.
If the maximum number is reached and more conversion requests arrive, they will
wait in a queue for an available spot.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

185

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.MaxPageLoadTime Property
The web page navigation timeout in seconds.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int MaxPageLoadTime { get; set; }
VB
Public Property MaxPageLoadTime As Integer
Get
Set
Property Value
Type: Int32

Remarks
Default value is 60 seconds. This value should be increased if large web pages are
loaded.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

186

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.MinPageLoadTime Property
An additional time in seconds to wait for asynchronous items to be loaded before
the web page is rendered.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int MinPageLoadTime { get; set; }
VB
Public Property MinPageLoadTime As Integer
Get
Set
Property Value
Type: Int32

Remarks
A delay of this type could be necessary if javascripts are loaded when the page is
rendered or if Flash movies are played.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

187

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.PdfBookmarkOptions Property
Gets a reference to the object that controls the bookmarks creation for the
generated pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfBookmarkOptions PdfBookmarkOptions { get; }
VB
Public ReadOnly Property PdfBookmarkOptions As PdfBookmarkOptions
Get
Property Value
Type: PdfBookmarkOptions

Remarks
This property needs to be set to instruct the html to pdf converter to automatically
generate some bookmarks in the pdf document. The converter will create
bookmarks for the web elements specified by the CssSelectors of the
PdfBookmarkOptions property.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

188

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.PdfCompressionLevel Property
This property controls the compression level of the generated pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfCompressionLevel PdfCompressionLevel { get; set; }
VB
Public Property PdfCompressionLevel As PdfCompressionLevel
Get
Set
Property Value
Type: PdfCompressionLevel

Remarks
The default value is Normal.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

189

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.PdfDocumentInformation Property
Gets a reference to the object that specifies the generated pdf document properties.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfDocumentInformation PdfDocumentInformation { get; }
VB
Public ReadOnly Property PdfDocumentInformation As
HtmlToPdfDocumentInformation
Get
Property Value
Type: HtmlToPdfDocumentInformation

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

190

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.PdfPageCustomSize Property
This property can be used to specify a custom pdf document page size.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public SizeF PdfPageCustomSize { get; set; }
VB
Public Property PdfPageCustomSize As SizeF
Get
Set
Property Value
Type: SizeF

Remarks
The property is taken into account only when PdfPageSize property is set to Custom.
The custom width and height of the pdf page is specified in points. 1 point is 1/72
inch.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

191

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.PdfPageOrientation Property
This property controls the page orientation of the generated pdf document pages.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfPageOrientation PdfPageOrientation { get; set; }
VB
Public Property PdfPageOrientation As PdfPageOrientation
Get
Set
Property Value
Type: PdfPageOrientation

Remarks
The default pdf page orientation is Portrait.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

192

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.PdfPageSize Property
This property controls the size of the generated document pages.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfPageSize PdfPageSize { get; set; }
VB
Public Property PdfPageSize As PdfPageSize
Get
Set
Property Value
Type: PdfPageSize

Remarks
The default size of the pdf document pages is A4. When this property is set to
Custom, a custom size can be specified for the generated pdf document pages
using the PdfPageCustomSize property.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

193

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.PdfStandard Property
Defines the pdf standard used by the generated pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfStandard PdfStandard { get; set; }
VB
Public Property PdfStandard As PdfStandard
Get
Set
Property Value
Type: PdfStandard

Remarks
The default value is Full and in this case the full set of pdf features can be used in
the generated document. This property can be used to instruct the converter to
generate PDF/A, PDF/X or PDF/SiqQ compliant documents.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

194

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.PluginsEnabled Property
A flag indicating if plugins (like Flash players) are enabled in the converter.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool PluginsEnabled { get; set; }
VB
Public Property PluginsEnabled As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is true.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

195

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.ProxyOptions Property
Gets a reference to an object containing the proxy settings used to access the web
page that is being converted.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfProxyOptions ProxyOptions { get; }
VB
Public ReadOnly Property ProxyOptions As HtmlToPdfProxyOptions
Get
Property Value
Type: HtmlToPdfProxyOptions

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

196

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.SecurityOptions Property
Gets a reference to the object that specifies the generated pdf document security
settings.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfSecurityOptions SecurityOptions { get; }
VB
Public ReadOnly Property SecurityOptions As PdfSecurityOptions
Get
Property Value
Type: PdfSecurityOptions

Remarks
This property returns a reference to a PdfSecurityOptions object that can be used to
control the generated pdf document security settings (like password, printing or
editing restrictions).

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

197

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.ViewerPreferences Property
Controls how the pdf document will appear in a pdf viewer (like Adobe Reader).
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfViewerPreferences ViewerPreferences { get; }
VB
Public ReadOnly Property ViewerPreferences As
HtmlToPdfViewerPreferences
Get
Property Value
Type: HtmlToPdfViewerPreferences

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

198

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.WebPageFixedSize Property
Controls whether the web page is rendered with a fixed size internal browser or the
size automatically extends to make the whole content visible.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool WebPageFixedSize { get; set; }
VB
Public Property WebPageFixedSize As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value of this property is false.

If the web page does not fit the dimensions specified by the WebPageWidth and
WebPageHeight properties and WebPageFixedSize is set to false, the converter
will try to automatically calculate a larger width and height to be able to display the
whole html content.
If WebPageFixedSize is set to true, this will indicate the converter not to calculate
another width and height, but use width and height specified by WebPageWidth and
WebPageHeight. These dimensions with be used even though the content will not fit
the available space and it will be truncated.
Note: If WebPageFixedSize is set to true, a page height needs to be set using
WebPageHeight, because the default value (0) will make the converter fail (cannot
render a web page with no height).

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

199

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.WebPageHeight Property
Gets or sets the height of the converted web page as it would appear in the internal
browser used to render the html.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int WebPageHeight { get; set; }
VB
Public Property WebPageHeight As Integer
Get
Set
Property Value
Type: Int32

Remarks
The web page height is specified in pixels and the default value is 0px. This means
that the converter will automatically calculate the page height.
Generally this property does not need to be changed, but there are situations when
the converter cannot calculate correctly the web page height (for example for web
pages with frames) and in that case, WebPageHeight needs to be set, otherwise
no content might appear in the generated pdf.
Note: If the WebPageHeight is set, the content that exceeds this page height is
truncated and will not appear in the generated pdf document. Only using the
default 0 value will allow the whole page content to be rendered all the time in the
generated pdf document.
This property can also be set directly in the constructor of HtmlToPdf class.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

200

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfOptions.WebPageWidth Property
Gets or sets the width of the converted web page as it would appear in the internal
browser used to render the html.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int WebPageWidth { get; set; }
VB
Public Property WebPageWidth As Integer
Get
Set
Property Value
Type: Int32

Remarks
The web page width is specified in pixels and the default value is 1024px. The page
width is only an indication of the minimum page width recommended for
conversion. If the content does not fit this width, the converter will automatically
resize the internal browser to fit the whole html content. To avoid this, the
WebPageFixedSize property needs to be set to true. When WebPageFixedSize is true,
the web page will be rendered with the specified WebPageWidth and
WebPageHeight even though the content might be truncated.

If WebPageWidth is set to 0, the converter will automatically determine the page


width, finding the width that will fit the html content.
This property can also be set directly in the constructor of HtmlToPdf class.

See Also
HtmlToPdfOptions Class
SelectPdf Namespace

201

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfPageFitMode Enumeration
Specifies how the html content is rendered in a pdf page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum HtmlToPdfPageFitMode
VB
Public Enumeration HtmlToPdfPageFitMode

Members
Member name
NoAdjustment

Value
0

ShrinkOnly

AutoFit

Description
The html content
is rendered as it is.
No size
adjustments are
performed, even
though the
destination space
might be smaller
than needed.
The html content
is shrunk if
necessary to fit
the available
destination space.
This option does
not expand the
content if it's
smaller than the
available space.
The html content
is automatically
adjusted to fit the
entire available
space. Unlike
ShrinkOnly, the
content can be
either shrunk or
stretched.

See Also
SelectPdf Namespace
202

SelectPdf Html To Pdf Converter for .NET

203

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfProxyOptions Class
The proxy settings used to resolve the HTTP requests.

Inheritance Hierarchy
System.Object SelectPdf.HtmlToPdfProxyOptions
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class HtmlToPdfProxyOptions
VB
Public Class HtmlToPdfProxyOptions
The HtmlToPdfProxyOptions type exposes the following members.

Constructors
Name
HtmlToPdfProxyOptions

Description

Name
HostName

Description
Gets or sets the host
name of the proxy host.
Gets or sets the password
used for authentication.
Gets or sets the port
number of the proxy host.
Gets or sets the proxy
type.
Gets or sets the user
name used for
authentication.

Properties

Password
PortNumber
Type
Username

See Also
SelectPdf Namespace

204

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfProxyOptions Constructor
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfProxyOptions()
VB
Public Sub New

See Also
HtmlToPdfProxyOptions Class
SelectPdf Namespace

205

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfProxyOptions.HtmlToPdfProxyOptions Properties
The HtmlToPdfProxyOptions type exposes the following members.

Properties
Name
HostName
Password
PortNumber
Type
Username

Description
Gets or sets the host
name of the proxy host.
Gets or sets the password
used for authentication.
Gets or sets the port
number of the proxy host.
Gets or sets the proxy
type.
Gets or sets the user
name used for
authentication.

See Also
HtmlToPdfProxyOptions Class
SelectPdf Namespace

206

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfProxyOptions.HostName Property
Gets or sets the host name of the proxy host.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string HostName { get; set; }
VB
Public Property HostName As String
Get
Set
Property Value
Type: String

See Also
HtmlToPdfProxyOptions Class
SelectPdf Namespace

207

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfProxyOptions.Password Property
Gets or sets the password used for authentication.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string Password { get; set; }
VB
Public Property Password As String
Get
Set
Property Value
Type: String

See Also
HtmlToPdfProxyOptions Class
SelectPdf Namespace

208

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfProxyOptions.PortNumber Property
Gets or sets the port number of the proxy host.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int PortNumber { get; set; }
VB
Public Property PortNumber As Integer
Get
Set
Property Value
Type: Int32

See Also
HtmlToPdfProxyOptions Class
SelectPdf Namespace

209

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfProxyOptions.Type Property
Gets or sets the proxy type.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public NetworkProxyType Type { get; set; }
VB
Public Property Type As NetworkProxyType
Get
Set
Property Value
Type: NetworkProxyType

See Also
HtmlToPdfProxyOptions Class
SelectPdf Namespace

210

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfProxyOptions.Username Property
Gets or sets the user name used for authentication.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string Username { get; set; }
VB
Public Property Username As String
Get
Set
Property Value
Type: String

See Also
HtmlToPdfProxyOptions Class
SelectPdf Namespace

211

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfResult Class
Offers information about the html to pdf conversion process.

Inheritance Hierarchy
System.Object SelectPdf.HtmlToPdfResult
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class HtmlToPdfResult
VB
Public Class HtmlToPdfResult
The HtmlToPdfResult type exposes the following members.

Properties
Name
PdfPageCount

PdfPageLastIndex

PdfPageLastRectangle

PdfPageScaleFactor

PdfPageSize

PdfPagesRectangles

WebPageInformation

Description
The number of pages in
the generated pdf
document.
The index of the pdf page
where the rendering of
the html content ended in
the generated pdf
document.
The size and position of
the html content
rendered on the last page
in the generated pdf
document.
The factor used to scale
the html content to fit the
pdf page.
The size of the page in
the generated pdf
document.
The size and position of
the html content
rendered in all pages of
the pdf document.
Gets an object populated
after conversion with the
title, keywords and
description of the
212

SelectPdf Html To Pdf Converter for .NET

WebPageSize

converted web page.


The size of the web page
in pixels.

Remarks
After a successful conversion the ConversionResult property is initialized with an
instance of this class.

See Also
SelectPdf Namespace

213

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfResult.HtmlToPdfResult Properties
The HtmlToPdfResult type exposes the following members.

Properties
Name
PdfPageCount

PdfPageLastIndex

PdfPageLastRectangle

PdfPageScaleFactor

PdfPageSize

PdfPagesRectangles

WebPageInformation

WebPageSize

Description
The number of pages in
the generated pdf
document.
The index of the pdf page
where the rendering of
the html content ended in
the generated pdf
document.
The size and position of
the html content
rendered on the last page
in the generated pdf
document.
The factor used to scale
the html content to fit the
pdf page.
The size of the page in
the generated pdf
document.
The size and position of
the html content
rendered in all pages of
the pdf document.
Gets an object populated
after conversion with the
title, keywords and
description of the
converted web page.
The size of the web page
in pixels.

See Also
HtmlToPdfResult Class
SelectPdf Namespace

214

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfResult.PdfPageCount Property
The number of pages in the generated pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int PdfPageCount { get; }
VB
Public ReadOnly Property PdfPageCount As Integer
Get
Property Value
Type: Int32

See Also
HtmlToPdfResult Class
SelectPdf Namespace

215

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfResult.PdfPageLastIndex Property
The index of the pdf page where the rendering of the html content ended in the
generated pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int PdfPageLastIndex { get; set; }
VB
Public Property PdfPageLastIndex As Integer
Get
Set
Property Value
Type: Int32

Remarks
This information is useful when other pdf elements are added after conversion using
the PdfDocument object.

See Also
HtmlToPdfResult Class
SelectPdf Namespace

216

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfResult.PdfPageLastRectangle Property
The size and position of the html content rendered on the last page in the
generated pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public RectangleF PdfPageLastRectangle { get; set; }
VB
Public Property PdfPageLastRectangle As RectangleF
Get
Set
Property Value
Type: RectangleF

Remarks
This information is useful when other pdf elements are added after conversion using
the PdfDocument object.
Note: The last page is specified by the PdfPageLastIndex property.

See Also
HtmlToPdfResult Class
SelectPdf Namespace

217

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfResult.PdfPageScaleFactor Property
The factor used to scale the html content to fit the pdf page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float PdfPageScaleFactor { get; }
VB
Public ReadOnly Property PdfPageScaleFactor As Single
Get
Property Value
Type: Single

Remarks
This property offers the factor used to scale the html content when rendered into
the pdf document. When AutoFitWidth is ShrinkOnly or AutoFit, the html content
might be resized to fit the pdf page width if necessary.

See Also
HtmlToPdfResult Class
SelectPdf Namespace

218

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfResult.PdfPageSize Property
The size of the page in the generated pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public SizeF PdfPageSize { get; }
VB
Public ReadOnly Property PdfPageSize As SizeF
Get
Property Value
Type: SizeF

Remarks
This size is in points. 1 point is 1/72 inch.

See Also
HtmlToPdfResult Class
SelectPdf Namespace

219

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfResult.PdfPagesRectangles Property
The size and position of the html content rendered in all pages of the pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public RectangleF[] PdfPagesRectangles { get; }
VB
Public ReadOnly Property PdfPagesRectangles As RectangleF()
Get
Property Value
Type: RectangleF[]

Remarks
This information is useful when other pdf elements are added after conversion using
the PdfDocument object.

See Also
HtmlToPdfResult Class
SelectPdf Namespace

220

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfResult.WebPageInformation Property
Gets an object populated after conversion with the title, keywords and description of
the converted web page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public WebPageInformation WebPageInformation { get; }
VB
Public ReadOnly Property WebPageInformation As WebPageInformation
Get
Property Value
Type: WebPageInformation

Remarks
This information can be used to set the properties of the pdf document after the
conversion.

See Also
HtmlToPdfResult Class
SelectPdf Namespace

221

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfResult.WebPageSize Property
The size of the web page in pixels.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public SizeF WebPageSize { get; }
VB
Public ReadOnly Property WebPageSize As SizeF
Get
Property Value
Type: SizeF

Remarks
1px is 1/96 inch at 96 DPI.

See Also
HtmlToPdfResult Class
SelectPdf Namespace

222

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfStartupMode Enumeration
Specifies the converter startup mode.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum HtmlToPdfStartupMode
VB
Public Enumeration HtmlToPdfStartupMode

Members
Member name
Automatic

Value
0

Manual

Description
The conversion
starts right after
the page loads.
The conversion
starts only when
called from
JavaScript.

See Also
SelectPdf Namespace

223

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfViewerPreferences Class
The pdf viewer preferences. Controls how the pdf document appears in a pdf viewer
(like Adobe Reader).

Inheritance Hierarchy
System.Object SelectPdf.HtmlToPdfViewerPreferences
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class HtmlToPdfViewerPreferences
VB
Public Class HtmlToPdfViewerPreferences
The HtmlToPdfViewerPreferences type exposes the following members.

Constructors
Name
HtmlToPdfViewerPreferen
ces

Description

Name
CenterWindow

Description
Gets or sets a flag
specifying whether to
position the document's
window in the center of
the screen.
Gets or sets a flag
specifying whether the
window's title bar should
display the document title
taken from
PdfDocumentInformation
property.
Gets or sets a flag
specifying whether to
resize the document's
window to fit the size of
the first displayed page.
Gets or sets a flag
specifying whether to
hide the pdf viewer

Properties

DisplayDocTitle

FitWindow

HideMenuBar

224

SelectPdf Html To Pdf Converter for .NET

HideToolbar

HideWindowUI

NonFullScreenPageMode

PageLayout

PageMode

application's menu bar


when the document is
active.
Gets or sets a flag
specifying whether to
hide the pdf viewer
application's tool bars
when the document is
active.
Gets or sets a flag
specifying whether to
hide user interface
elements in the
document's window (such
as scroll bars and
navigation controls),
leaving only the
document's contents
displayed.
Gets or sets the
document page mode
when the pdf viewer
application exits the full
screen mode.
Gets or sets the page
layout to be used when
the document is opened.
Gets or sets the
document page mode
when the pdf document is
opened in a pdf viewer.

See Also
SelectPdf Namespace

225

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfViewerPreferences Constructor
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfViewerPreferences()
VB
Public Sub New

See Also
HtmlToPdfViewerPreferences Class
SelectPdf Namespace

226

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfViewerPreferences.HtmlToPdfViewerPreferences
Properties
The HtmlToPdfViewerPreferences type exposes the following members.

Properties
Name
CenterWindow

DisplayDocTitle

FitWindow

HideMenuBar

HideToolbar

HideWindowUI

Description
Gets or sets a flag
specifying whether to
position the document's
window in the center of
the screen.
Gets or sets a flag
specifying whether the
window's title bar should
display the document title
taken from
PdfDocumentInformation
property.
Gets or sets a flag
specifying whether to
resize the document's
window to fit the size of
the first displayed page.
Gets or sets a flag
specifying whether to
hide the pdf viewer
application's menu bar
when the document is
active.
Gets or sets a flag
specifying whether to
hide the pdf viewer
application's tool bars
when the document is
active.
Gets or sets a flag
specifying whether to
hide user interface
elements in the
document's window (such
as scroll bars and
navigation controls),
leaving only the
document's contents
displayed.

227

SelectPdf Html To Pdf Converter for .NET


NonFullScreenPageMode

PageLayout

PageMode

Gets or sets the


document page mode
when the pdf viewer
application exits the full
screen mode.
Gets or sets the page
layout to be used when
the document is opened.
Gets or sets the
document page mode
when the pdf document is
opened in a pdf viewer.

See Also
HtmlToPdfViewerPreferences Class
SelectPdf Namespace

228

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfViewerPreferences.CenterWindow Property
Gets or sets a flag specifying whether to position the document's window in the
center of the screen.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool CenterWindow { get; set; }
VB
Public Property CenterWindow As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is false.

See Also
HtmlToPdfViewerPreferences Class
SelectPdf Namespace

229

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfViewerPreferences.DisplayDocTitle Property
Gets or sets a flag specifying whether the window's title bar should display the
document title taken from PdfDocumentInformation property.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool DisplayDocTitle { get; set; }
VB
Public Property DisplayDocTitle As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is false.

See Also
HtmlToPdfViewerPreferences Class
SelectPdf Namespace

230

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfViewerPreferences.FitWindow Property
Gets or sets a flag specifying whether to resize the document's window to fit the
size of the first displayed page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool FitWindow { get; set; }
VB
Public Property FitWindow As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is false.

See Also
HtmlToPdfViewerPreferences Class
SelectPdf Namespace

231

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfViewerPreferences.HideMenuBar Property
Gets or sets a flag specifying whether to hide the pdf viewer application's menu bar
when the document is active.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool HideMenuBar { get; set; }
VB
Public Property HideMenuBar As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is false.

See Also
HtmlToPdfViewerPreferences Class
SelectPdf Namespace

232

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfViewerPreferences.HideToolbar Property
Gets or sets a flag specifying whether to hide the pdf viewer application's tool bars
when the document is active.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool HideToolbar { get; set; }
VB
Public Property HideToolbar As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is false.

See Also
HtmlToPdfViewerPreferences Class
SelectPdf Namespace

233

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfViewerPreferences.HideWindowUI Property
Gets or sets a flag specifying whether to hide user interface elements in the
document's window (such as scroll bars and navigation controls), leaving only the
document's contents displayed.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool HideWindowUI { get; set; }
VB
Public Property HideWindowUI As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is false.

See Also
HtmlToPdfViewerPreferences Class
SelectPdf Namespace

234

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfViewerPreferences.NonFullScreenPageMode
Property
Gets or sets the document page mode when the pdf viewer application exits the full
screen mode.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfViewerFullScreenExitMode NonFullScreenPageMode { get;
set; }
VB
Public Property NonFullScreenPageMode As PdfViewerFullScreenExitMode
Get
Set
Property Value
Type: PdfViewerFullScreenExitMode

Remarks
This property is taken into account only if PageMode is set to FullScreen. Otherwise
it is ignored.
The default value for this property is UseNone.

See Also
HtmlToPdfViewerPreferences Class
SelectPdf Namespace

235

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfViewerPreferences.PageLayout Property
Gets or sets the page layout to be used when the document is opened.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfViewerPageLayout PageLayout { get; set; }
VB
Public Property PageLayout As PdfViewerPageLayout
Get
Set
Property Value
Type: PdfViewerPageLayout

Remarks
The default value for this property is OneColumn.

See Also
HtmlToPdfViewerPreferences Class
SelectPdf Namespace

236

SelectPdf Html To Pdf Converter for .NET

HtmlToPdfViewerPreferences.PageMode Property
Gets or sets the document page mode when the pdf document is opened in a pdf
viewer.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfViewerPageMode PageMode { get; set; }
VB
Public Property PageMode As PdfViewerPageMode
Get
Set
Property Value
Type: PdfViewerPageMode

Remarks
The default value for this property is UseNone.

See Also
HtmlToPdfViewerPreferences Class
SelectPdf Namespace

237

SelectPdf Html To Pdf Converter for .NET

NetworkProxyType Enumeration
The list of available proxy types used by the converter to resolve HTTP requests.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum NetworkProxyType
VB
Public Enumeration NetworkProxyType

Members
Member name
Socks5
None
Http
HttpCaching

Value
1
2
3
4

Description
Socks5
None
Http
HttpCaching

See Also
SelectPdf Namespace

238

SelectPdf Html To Pdf Converter for .NET

PdfAction Class
Base class for the pdf actions.

Inheritance Hierarchy
System.Object SelectPdf.PdfAction
avaScript

SelectPdf.PdfActionGoTo

SelectPdf.PdfActionJ

Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)


Version: 1.0

Syntax
C#
public abstract class PdfAction
VB
Public MustInherit Class PdfAction
The PdfAction type exposes the following members.

Constructors
Name
PdfAction

Description

Remarks
The pdf document can perform 2 types of actions when it is opened:

PdfActionGoTo
- The pdf document opens at a specific PdfDestination.

PdfActionJavaScript
- The pdf document will run a specific javascript.

See Also
SelectPdf Namespace

239

SelectPdf Html To Pdf Converter for .NET

PdfAction Constructor
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
protected PdfAction()
VB
Protected Sub New

See Also
PdfAction Class
SelectPdf Namespace

240

SelectPdf Html To Pdf Converter for .NET

PdfActionGoTo Class
Represents a Go To action in a pdf document.

Inheritance Hierarchy
System.Object SelectPdf.PdfAction

SelectPdf.PdfActionGoTo

Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)


Version: 1.0

Syntax
C#
public class PdfActionGoTo : PdfAction
VB
Public Class PdfActionGoTo
Inherits PdfAction
The PdfActionGoTo type exposes the following members.

Constructors
Name
PdfActionGoTo

Description
Creates a Go To action
based on the specified
pdf destination.

Name
Destination

Description
Gets or sets the pdf
destination of the Go To
action.

Properties

See Also
SelectPdf Namespace

241

SelectPdf Html To Pdf Converter for .NET

PdfActionGoTo Constructor
Creates a Go To action based on the specified pdf destination.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfActionGoTo(
PdfDestination destination
)
VB
Public Sub New (
destination As PdfDestination
)
Parameters
destination
Type: SelectPdf.PdfDestination
The destination of the Go To action.

See Also
PdfActionGoTo Class
SelectPdf Namespace

242

SelectPdf Html To Pdf Converter for .NET

PdfActionGoTo.PdfActionGoTo Properties
The PdfActionGoTo type exposes the following members.

Properties
Name
Destination

Description
Gets or sets the pdf
destination of the Go To
action.

See Also
PdfActionGoTo Class
SelectPdf Namespace

243

SelectPdf Html To Pdf Converter for .NET

PdfActionGoTo.Destination Property
Gets or sets the pdf destination of the Go To action.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfDestination Destination { get; set; }
VB
Public Property Destination As PdfDestination
Get
Set
Property Value
Type: PdfDestination

See Also
PdfActionGoTo Class
SelectPdf Namespace

244

SelectPdf Html To Pdf Converter for .NET

PdfActionJavaScript Class
Represents a JavaScript action in a pdf document.

Inheritance Hierarchy
System.Object SelectPdf.PdfAction

SelectPdf.PdfActionJavaScript

Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)


Version: 1.0

Syntax
C#
public class PdfActionJavaScript : PdfAction
VB
Public Class PdfActionJavaScript
Inherits PdfAction
The PdfActionJavaScript type exposes the following members.

Constructors
Name
PdfActionJavaScript

Description
Creates a JavaScript
action based on a
JavaScript code.

Name
JavaScript

Description
Gets or sets the
JavaScript code executed
by this action.

Properties

See Also
SelectPdf Namespace

245

SelectPdf Html To Pdf Converter for .NET

PdfActionJavaScript Constructor
Creates a JavaScript action based on a JavaScript code.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfActionJavaScript(
string javaScript
)
VB
Public Sub New (
javaScript As String
)
Parameters
javaScript
Type: System.String
The JavaScript code.

See Also
PdfActionJavaScript Class
SelectPdf Namespace

246

SelectPdf Html To Pdf Converter for .NET

PdfActionJavaScript.PdfActionJavaScript Properties
The PdfActionJavaScript type exposes the following members.

Properties
Name
JavaScript

Description
Gets or sets the
JavaScript code executed
by this action.

See Also
PdfActionJavaScript Class
SelectPdf Namespace

247

SelectPdf Html To Pdf Converter for .NET

PdfActionJavaScript.JavaScript Property
Gets or sets the JavaScript code executed by this action.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string JavaScript { get; set; }
VB
Public Property JavaScript As String
Get
Set
Property Value
Type: String

See Also
PdfActionJavaScript Class
SelectPdf Namespace

248

SelectPdf Html To Pdf Converter for .NET

PdfBookmark Class
Represents a bookmark in a pdf document.

Inheritance Hierarchy
System.Object SelectPdf.PdfBookmark
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class PdfBookmark
VB
Public Class PdfBookmark
The PdfBookmark type exposes the following members.

Properties
Name
ChildNodes
Color
Destination
Parent

Style
Text

Description
Gets the child bookmark
collection.
Gets or sets the
bookmark text color.
Gets or sets the
bookmark destination.
Gets the parent of the
current bookmark or null
if the bookmark has no
parent.
Gets or sets the
bookmark text style.
Gets or sets the
bookmark text.

See Also
SelectPdf Namespace

249

SelectPdf Html To Pdf Converter for .NET

PdfBookmark.PdfBookmark Properties
The PdfBookmark type exposes the following members.

Properties
Name
ChildNodes
Color
Destination
Parent

Style
Text

Description
Gets the child bookmark
collection.
Gets or sets the
bookmark text color.
Gets or sets the
bookmark destination.
Gets the parent of the
current bookmark or null
if the bookmark has no
parent.
Gets or sets the
bookmark text style.
Gets or sets the
bookmark text.

See Also
PdfBookmark Class
SelectPdf Namespace

250

SelectPdf Html To Pdf Converter for .NET

PdfBookmark.ChildNodes Property
Gets the child bookmark collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfBookmarksCollection ChildNodes { get; }
VB
Public ReadOnly Property ChildNodes As PdfBookmarksCollection
Get
Property Value
Type: PdfBookmarksCollection

See Also
PdfBookmark Class
SelectPdf Namespace

251

SelectPdf Html To Pdf Converter for .NET

PdfBookmark.Color Property
Gets or sets the bookmark text color.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfColor Color { get; set; }
VB
Public Property Color As PdfColor
Get
Set
Property Value
Type: PdfColor

See Also
PdfBookmark Class
SelectPdf Namespace

252

SelectPdf Html To Pdf Converter for .NET

PdfBookmark.Destination Property
Gets or sets the bookmark destination.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfDestination Destination { get; set; }
VB
Public Property Destination As PdfDestination
Get
Set
Property Value
Type: PdfDestination

See Also
PdfBookmark Class
SelectPdf Namespace

253

SelectPdf Html To Pdf Converter for .NET

PdfBookmark.Parent Property
Gets the parent of the current bookmark or null if the bookmark has no parent.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfBookmark Parent { get; }
VB
Public ReadOnly Property Parent As PdfBookmark
Get
Property Value
Type: PdfBookmark

See Also
PdfBookmark Class
SelectPdf Namespace

254

SelectPdf Html To Pdf Converter for .NET

PdfBookmark.Style Property
Gets or sets the bookmark text style.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfBookmarkStyle Style { get; set; }
VB
Public Property Style As PdfBookmarkStyle
Get
Set
Property Value
Type: PdfBookmarkStyle

See Also
PdfBookmark Class
SelectPdf Namespace

255

SelectPdf Html To Pdf Converter for .NET

PdfBookmark.Text Property
Gets or sets the bookmark text.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string Text { get; set; }
VB
Public Property Text As String
Get
Set
Property Value
Type: String

See Also
PdfBookmark Class
SelectPdf Namespace

256

SelectPdf Html To Pdf Converter for .NET

PdfBookmarkOptions Class
Helps defining a set of html elements that will be associated with bookmarks in the
generated pdf document.

Inheritance Hierarchy
System.Object SelectPdf.PdfBookmarkOptions
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class PdfBookmarkOptions
VB
Public Class PdfBookmarkOptions
The PdfBookmarkOptions type exposes the following members.

Constructors
Name
PdfBookmarkOptions

Description

Name
CssSelectors

Description
Gets or sets the selectors
of the html elements to
be bookmarked. For
example, the selector for
all the H1 elements is
"H1", the selector for all
the elements with the
CSS class name 'myclass'
is "*.myclass" and the
selector for the elements
with the id 'myid' is
"*#myid".

Properties

See Also
SelectPdf Namespace

257

SelectPdf Html To Pdf Converter for .NET

PdfBookmarkOptions Constructor
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfBookmarkOptions()
VB
Public Sub New

See Also
PdfBookmarkOptions Class
SelectPdf Namespace

258

SelectPdf Html To Pdf Converter for .NET

PdfBookmarkOptions.PdfBookmarkOptions Properties
The PdfBookmarkOptions type exposes the following members.

Properties
Name
CssSelectors

Description
Gets or sets the selectors
of the html elements to
be bookmarked. For
example, the selector for
all the H1 elements is
"H1", the selector for all
the elements with the
CSS class name 'myclass'
is "*.myclass" and the
selector for the elements
with the id 'myid' is
"*#myid".

See Also
PdfBookmarkOptions Class
SelectPdf Namespace

259

SelectPdf Html To Pdf Converter for .NET

PdfBookmarkOptions.CssSelectors Property
Gets or sets the selectors of the html elements to be bookmarked. For example, the
selector for all the H1 elements is "H1", the selector for all the elements with the
CSS class name 'myclass' is "*.myclass" and the selector for the elements with the
id 'myid' is "*#myid".
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string[] CssSelectors { get; set; }
VB
Public Property CssSelectors As String()
Get
Set
Property Value
Type: String[]

See Also
PdfBookmarkOptions Class
SelectPdf Namespace

260

SelectPdf Html To Pdf Converter for .NET

PdfBookmarksCollection Class
Represents the collection of bookmarks in a pdf document.

Inheritance Hierarchy
System.Object SelectPdf.PdfBookmarksCollection
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class PdfBookmarksCollection : IEnumerable
VB
Public Class PdfBookmarksCollection
Implements IEnumerable
The PdfBookmarksCollection type exposes the following members.

Methods
Name
Add
GetEnumerator
Insert

Remove
RemoveAt

Description
Adds a new bookmark to
the bookmarks collection.
Gets the collection
enumerator.
Creates a new bookmark
and inserts it at the
specified zero based
index in the bookmarks
collection.
Removes the specified
pdf bookmark.
Removes the pdf
bookmark at the specified
index in the bookmarks
collection.

Properties
Name
Count

Document

Item

Description
The number of
bookmarks in the pdf
bookmarks collection.
The parent pdf document
of the bookmarks
collection.
Gets or sets the

261

SelectPdf Html To Pdf Converter for .NET


bookmark at the specified
zero based index in the
bookmarks collection.

See Also
SelectPdf Namespace

262

SelectPdf Html To Pdf Converter for .NET

PdfBookmarksCollection.PdfBookmarksCollection Methods
The PdfBookmarksCollection type exposes the following members.

Methods
Name
Add
GetEnumerator
Insert

Remove
RemoveAt

Description
Adds a new bookmark to
the bookmarks collection.
Gets the collection
enumerator.
Creates a new bookmark
and inserts it at the
specified zero based
index in the bookmarks
collection.
Removes the specified
pdf bookmark.
Removes the pdf
bookmark at the specified
index in the bookmarks
collection.

See Also
PdfBookmarksCollection Class
SelectPdf Namespace

263

SelectPdf Html To Pdf Converter for .NET

PdfBookmarksCollection.Add Method
Adds a new bookmark to the bookmarks collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfBookmark Add(
string text,
PdfDestination destination
)
VB
Public Function Add (
text As String,
destination As PdfDestination
) As PdfBookmark
Parameters
text
Type: System.String
The bookmark text.
destination
Type: SelectPdf.PdfDestination
The bookmark destination.
Return Value
Type: PdfBookmarkThe newly created pdf bookmark.

See Also
PdfBookmarksCollection Class
SelectPdf Namespace

264

SelectPdf Html To Pdf Converter for .NET

PdfBookmarksCollection.GetEnumerator Method
Gets the collection enumerator.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public IEnumerator GetEnumerator()
VB
Public Function GetEnumerator As IEnumerator
Return Value
Type: IEnumeratorThe collection enumerator.
Implements
IEnumerable.GetEnumerator()

See Also
PdfBookmarksCollection Class
SelectPdf Namespace

265

SelectPdf Html To Pdf Converter for .NET

PdfBookmarksCollection.Insert Method
Creates a new bookmark and inserts it at the specified zero based index in the
bookmarks collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfBookmark Insert(
int index,
string text,
PdfDestination destination
)
VB
Public Function Insert (
index As Integer,
text As String,
destination As PdfDestination
) As PdfBookmark
Parameters
index
Type: System.Int32
The zero based index where to insert the bookmark.
text
Type: System.String
The bookmark text.
destination
Type: SelectPdf.PdfDestination
The bookmark destination.
Return Value
Type: PdfBookmarkThe newly created pdf bookmark.

See Also
PdfBookmarksCollection Class
SelectPdf Namespace

266

SelectPdf Html To Pdf Converter for .NET

PdfBookmarksCollection.Remove Method
Removes the specified pdf bookmark.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void Remove(
PdfBookmark bookmark
)
VB
Public Sub Remove (
bookmark As PdfBookmark
)
Parameters
bookmark
Type: SelectPdf.PdfBookmark
The pdf bookmark to be removed.

See Also
PdfBookmarksCollection Class
SelectPdf Namespace

267

SelectPdf Html To Pdf Converter for .NET

PdfBookmarksCollection.RemoveAt Method
Removes the pdf bookmark at the specified index in the bookmarks collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void RemoveAt(
int index
)
VB
Public Sub RemoveAt (
index As Integer
)
Parameters
index
Type: System.Int32
The zero based index of the pdf bookmark to be removed.

See Also
PdfBookmarksCollection Class
SelectPdf Namespace

268

SelectPdf Html To Pdf Converter for .NET

PdfBookmarksCollection.PdfBookmarksCollection
Properties
The PdfBookmarksCollection type exposes the following members.

Properties
Name
Count

Document

Item

Description
The number of
bookmarks in the pdf
bookmarks collection.
The parent pdf document
of the bookmarks
collection.
Gets or sets the
bookmark at the specified
zero based index in the
bookmarks collection.

See Also
PdfBookmarksCollection Class
SelectPdf Namespace

269

SelectPdf Html To Pdf Converter for .NET

PdfBookmarksCollection.Count Property
The number of bookmarks in the pdf bookmarks collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int Count { get; }
VB
Public ReadOnly Property Count As Integer
Get
Property Value
Type: Int32

See Also
PdfBookmarksCollection Class
SelectPdf Namespace

270

SelectPdf Html To Pdf Converter for .NET

PdfBookmarksCollection.Document Property
The parent pdf document of the bookmarks collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfDocument Document { get; }
VB
Public ReadOnly Property Document As PdfDocument
Get
Property Value
Type: PdfDocument

See Also
PdfBookmarksCollection Class
SelectPdf Namespace

271

SelectPdf Html To Pdf Converter for .NET

PdfBookmarksCollection.Item Property
Gets or sets the bookmark at the specified zero based index in the bookmarks
collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfBookmark this[
int index
] { get; }
VB
Public ReadOnly Default Property Item (
index As Integer
) As PdfBookmark
Get
Parameters
index
Type: System.Int32
The zero based bookmark index in the pdf bookmarks collection.
Return Value
Type: PdfBookmarkThe pdf bookmark at the specified index.

See Also
PdfBookmarksCollection Class
SelectPdf Namespace

272

SelectPdf Html To Pdf Converter for .NET

PdfBookmarkStyle Enumeration
The pdf bookmark text style.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
[FlagsAttribute]
public enum PdfBookmarkStyle
VB
<FlagsAttribute>
Public Enumeration PdfBookmarkStyle

Members
Member name
Normal
Italic
Bold

Value
0
1
2

Description
Normal text style.
The text is italic.
The text is bold.

See Also
SelectPdf Namespace

273

SelectPdf Html To Pdf Converter for .NET

PdfCanvas Class
Base class for classes that can render pdf page elements.

Inheritance Hierarchy
System.Object SelectPdf.PdfCanvas

SelectPdf.PdfPage

SelectPdf.PdfTemplate

Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)


Version: 1.0

Syntax
C#
public abstract class PdfCanvas
VB
Public MustInherit Class PdfCanvas
The PdfCanvas type exposes the following members.

Constructors
Name
PdfCanvas

Description

Name
Add

Description
Adds a pdf page element
to the canvas.
Measures the size of the
specified string when
rendered with the
specified font.

Methods

MeasureString

Properties
Name
ClientRectangle

Description
Gets the drawable area of
the canvas. The margins,
pdf document header and
footer are excluded.

Remarks
PdfCanvas
is the base class for PdfPage and PdfTemplate. PdfPage should be used to add
elements to the pdf document only in a certain page at a certain position.
PdfTemplate should be used to add elements to the pdf document that will appear in
more than one page.

274

SelectPdf Html To Pdf Converter for .NET

See Also
SelectPdf Namespace

275

SelectPdf Html To Pdf Converter for .NET

PdfCanvas Constructor
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
protected PdfCanvas()
VB
Protected Sub New

See Also
PdfCanvas Class
SelectPdf Namespace

276

SelectPdf Html To Pdf Converter for .NET

PdfCanvas.PdfCanvas Methods
The PdfCanvas type exposes the following members.

Methods
Name
Add
MeasureString

Description
Adds a pdf page element
to the canvas.
Measures the size of the
specified string when
rendered with the
specified font.

See Also
PdfCanvas Class
SelectPdf Namespace

277

SelectPdf Html To Pdf Converter for .NET

PdfCanvas.Add Method
Adds a pdf page element to the canvas.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public abstract PdfRenderingResult Add(
PdfPageElement element
)
VB
Public MustOverride Function Add (
element As PdfPageElement
) As PdfRenderingResult
Parameters
element
Type: SelectPdf.PdfPageElement
The page element to be rendered
Return Value
Type: PdfRenderingResultThe result of adding the element

See Also
PdfCanvas Class
SelectPdf Namespace

278

SelectPdf Html To Pdf Converter for .NET

PdfCanvas.MeasureString Method
Measures the size of the specified string when rendered with the specified font.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public SizeF MeasureString(
string text,
PdfFont font
)
VB
Public Function MeasureString (
text As String,
font As PdfFont
) As SizeF
Parameters
text
Type: System.String
String to measure.
font
Type: SelectPdf.PdfFont
The font used to render the string.
Return Value
Type: SizeFThe size of the string.

See Also
PdfCanvas Class
SelectPdf Namespace

279

SelectPdf Html To Pdf Converter for .NET

PdfCanvas.PdfCanvas Properties
The PdfCanvas type exposes the following members.

Properties
Name
ClientRectangle

Description
Gets the drawable area of
the canvas. The margins,
pdf document header and
footer are excluded.

See Also
PdfCanvas Class
SelectPdf Namespace

280

SelectPdf Html To Pdf Converter for .NET

PdfCanvas.ClientRectangle Property
Gets the drawable area of the canvas. The margins, pdf document header and
footer are excluded.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public RectangleF ClientRectangle { get; }
VB
Public ReadOnly Property ClientRectangle As RectangleF
Get
Property Value
Type: RectangleF

See Also
PdfCanvas Class
SelectPdf Namespace

281

SelectPdf Html To Pdf Converter for .NET

PdfColor Class
Represents a pdf color.

Inheritance Hierarchy
System.Object SelectPdf.PdfColor
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class PdfColor
VB
Public Class PdfColor
The PdfColor type exposes the following members.

Constructors
Name
PdfColor(Color)
PdfColor(Single)

PdfColor(Byte, Byte, Byte)


PdfColor(Single, Single,
Single, Single)

Description
Creates a pdf color based
on a .NET system color.
Creates a Gray-scale
color based on a gray
level.
Creates a pdf color based
on RGB values.
Creates a pdf color based
on GMYK values.

Operators
Name
Implicit(Color to PdfColor)

Implicit(PdfColor to Color)

Description
Implicit operator to
convert a .NET system
color to a pdf color.
Implicit operator to
convert a pdf color to a
.NET system color.

Properties
Name
Blue
Cyan
Empty

Description
Gets or sets the Blue
value of this pdf color.
Gets or sets the Cyan
value of this pdf color.
An empty color.

282

SelectPdf Html To Pdf Converter for .NET


Gray
Green
Key
Magenta
Red
Yellow

Gets or sets the Gray


level of this pdf color.
Gets or sets the Green
value of this pdf color.
Gets or sets the Key value
of this pdf color.
Gets or sets the Magenta
value of this pdf color.
Gets or sets the Red
value of this pdf color.
Gets or sets the Yellow
value of this pdf color.

See Also
SelectPdf Namespace

283

SelectPdf Html To Pdf Converter for .NET

PdfColor Constructor
Overload List
Name
PdfColor(Color)
PdfColor(Single)

PdfColor(Byte, Byte, Byte)


PdfColor(Single, Single,
Single, Single)

Description
Creates a pdf color based
on a .NET system color.
Creates a Gray-scale
color based on a gray
level.
Creates a pdf color based
on RGB values.
Creates a pdf color based
on GMYK values.

See Also
PdfColor Class
SelectPdf Namespace

284

SelectPdf Html To Pdf Converter for .NET

PdfColor Constructor (Color)


Creates a pdf color based on a .NET system color.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfColor(
Color color
)
VB
Public Sub New (
color As Color
)
Parameters
color
Type: System.Drawing.Color
The .NET system color.

See Also
PdfColor Class
PdfColor Overload
SelectPdf Namespace

285

SelectPdf Html To Pdf Converter for .NET

PdfColor Constructor (Single)


Creates a Gray-scale color based on a gray level.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfColor(
float gray
)
VB
Public Sub New (
gray As Single
)
Parameters
gray
Type: System.Single
A value between 0 and 1 to specify the gray level.

See Also
PdfColor Class
PdfColor Overload
SelectPdf Namespace

286

SelectPdf Html To Pdf Converter for .NET

PdfColor Constructor (Byte, Byte, Byte)


Creates a pdf color based on RGB values.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfColor(
byte red,
byte green,
byte blue
)
VB
Public Sub New (
red As Byte,
green As Byte,
blue As Byte
)
Parameters
red
Type: System.Byte
Red value.
green
Type: System.Byte
Green value.
blue
Type: System.Byte
Blue value.

See Also
PdfColor Class
PdfColor Overload
SelectPdf Namespace

287

SelectPdf Html To Pdf Converter for .NET

PdfColor Constructor (Single, Single, Single, Single)


Creates a pdf color based on GMYK values.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfColor(
float cyan,
float magenta,
float yellow,
float key
)
VB
Public Sub New (
cyan As Single,
magenta As Single,
yellow As Single,
key As Single
)
Parameters
cyan
Type: System.Single
Cyan value.
magenta
Type: System.Single
Magenta value.
yellow
Type: System.Single
Yellow value.
key
Type: System.Single
Key value.

See Also
PdfColor Class
PdfColor Overload
SelectPdf Namespace

288

SelectPdf Html To Pdf Converter for .NET

PdfColor.PdfColor Type Conversions


Operators
Name
Implicit(Color to PdfColor)

Implicit(PdfColor to Color)

Description
Implicit operator to
convert a .NET system
color to a pdf color.
Implicit operator to
convert a pdf color to a
.NET system color.

See Also
PdfColor Class
SelectPdf Namespace

289

SelectPdf Html To Pdf Converter for .NET

PdfColor Implicit Conversion Operators


Overload List
Name
Implicit(Color to PdfColor)

Implicit(PdfColor to Color)

Description
Implicit operator to
convert a .NET system
color to a pdf color.
Implicit operator to
convert a pdf color to a
.NET system color.

See Also
PdfColor Class
SelectPdf Namespace

290

SelectPdf Html To Pdf Converter for .NET

PdfColor Implicit Conversion (Color to PdfColor)


Implicit operator to convert a .NET system color to a pdf color.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static implicit operator PdfColor (
Color color
)
VB
Public Shared Widening Operator CType (
color As Color
) As PdfColor
Parameters
color
Type: System.Drawing.Color
The .NET system color.
Return Value
Type: PdfColorThe pdf color.

See Also
PdfColor Class
Implicit Overload
SelectPdf Namespace

291

SelectPdf Html To Pdf Converter for .NET

PdfColor Implicit Conversion (PdfColor to Color)


Implicit operator to convert a pdf color to a .NET system color.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static implicit operator Color (
PdfColor color
)
VB
Public Shared Widening Operator CType (
color As PdfColor
) As Color
Parameters
color
Type: SelectPdf.PdfColor
The pdf color.
Return Value
Type: ColorThe .NET system color.

See Also
PdfColor Class
Implicit Overload
SelectPdf Namespace

292

SelectPdf Html To Pdf Converter for .NET

PdfColor.PdfColor Properties
The PdfColor type exposes the following members.

Properties
Name
Blue
Cyan
Empty
Gray
Green
Key
Magenta
Red
Yellow

Description
Gets or sets the Blue
value of this pdf color.
Gets or sets the Cyan
value of this pdf color.
An empty color.
Gets or sets the Gray
level of this pdf color.
Gets or sets the Green
value of this pdf color.
Gets or sets the Key value
of this pdf color.
Gets or sets the Magenta
value of this pdf color.
Gets or sets the Red
value of this pdf color.
Gets or sets the Yellow
value of this pdf color.

See Also
PdfColor Class
SelectPdf Namespace

293

SelectPdf Html To Pdf Converter for .NET

PdfColor.Blue Property
Gets or sets the Blue value of this pdf color.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public byte Blue { get; set; }
VB
Public Property Blue As Byte
Get
Set
Property Value
Type: Byte

See Also
PdfColor Class
SelectPdf Namespace

294

SelectPdf Html To Pdf Converter for .NET

PdfColor.Cyan Property
Gets or sets the Cyan value of this pdf color.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Cyan { get; set; }
VB
Public Property Cyan As Single
Get
Set
Property Value
Type: Single

See Also
PdfColor Class
SelectPdf Namespace

295

SelectPdf Html To Pdf Converter for .NET

PdfColor.Empty Property
An empty color.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static PdfColor Empty { get; }
VB
Public Shared ReadOnly Property Empty As PdfColor
Get
Property Value
Type: PdfColor

See Also
PdfColor Class
SelectPdf Namespace

296

SelectPdf Html To Pdf Converter for .NET

PdfColor.Gray Property
Gets or sets the Gray level of this pdf color.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Gray { get; set; }
VB
Public Property Gray As Single
Get
Set
Property Value
Type: Single

See Also
PdfColor Class
SelectPdf Namespace

297

SelectPdf Html To Pdf Converter for .NET

PdfColor.Green Property
Gets or sets the Green value of this pdf color.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public byte Green { get; set; }
VB
Public Property Green As Byte
Get
Set
Property Value
Type: Byte

See Also
PdfColor Class
SelectPdf Namespace

298

SelectPdf Html To Pdf Converter for .NET

PdfColor.Key Property
Gets or sets the Key value of this pdf color.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Key { get; set; }
VB
Public Property Key As Single
Get
Set
Property Value
Type: Single

See Also
PdfColor Class
SelectPdf Namespace

299

SelectPdf Html To Pdf Converter for .NET

PdfColor.Magenta Property
Gets or sets the Magenta value of this pdf color.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Magenta { get; set; }
VB
Public Property Magenta As Single
Get
Set
Property Value
Type: Single

See Also
PdfColor Class
SelectPdf Namespace

300

SelectPdf Html To Pdf Converter for .NET

PdfColor.Red Property
Gets or sets the Red value of this pdf color.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public byte Red { get; set; }
VB
Public Property Red As Byte
Get
Set
Property Value
Type: Byte

See Also
PdfColor Class
SelectPdf Namespace

301

SelectPdf Html To Pdf Converter for .NET

PdfColor.Yellow Property
Gets or sets the Yellow value of this pdf color.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Yellow { get; set; }
VB
Public Property Yellow As Single
Get
Set
Property Value
Type: Single

See Also
PdfColor Class
SelectPdf Namespace

302

SelectPdf Html To Pdf Converter for .NET

PdfColorSpace Enumeration
The list of possible color spaces for the pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum PdfColorSpace
VB
Public Enumeration PdfColorSpace

Members
Member name
RGB
CMYK
GrayScale

Value
0
1
2

Description
RGB color space.
CMYK color space.
Gray scale color
space.

See Also
SelectPdf Namespace

303

SelectPdf Html To Pdf Converter for .NET

PdfCompressionLevel Enumeration
The pdf document compression level.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum PdfCompressionLevel
VB
Public Enumeration PdfCompressionLevel

Members
Member name
NoCompression
Normal

Value
0
1

Best

Description
No compression.
Normal
compression level.
Best compression.
Produces the
smallest pdf
document but it
takes longer to
compress it.

See Also
SelectPdf Namespace

304

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize Class
The pdf page size expressed in points.

Inheritance Hierarchy
System.Object SelectPdf.PdfCustomPageSize
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public sealed class PdfCustomPageSize
VB
Public NotInheritable Class PdfCustomPageSize
The PdfCustomPageSize type exposes the following members.

Constructors
Name
PdfCustomPageSize()
PdfCustomPageSize(Singl
e, Single)

Description
Default constructor
constructs a A4 page size
Constructs a custom page
size

Name
A0
A1
A10
A2
A3
A4
A5
A6
A7
A8
A9
ArchA
ArchB
ArchC
ArchD
ArchE
B0
B1
B2
B3

Description
A0
A1
A10
A2
A3
A4
A5
A6
A7
A8
A9
ArchA
ArchB
ArchC
ArchD
ArchE
B0
B1
B2
B3

Fields

305

SelectPdf Html To Pdf Converter for .NET


B4
B5
Flsa
HalfLetter
Ledger
Legal
Letter
Letter11x17
Note

B4
B5
Flsa
HalfLetter
Ledger
Legal
Letter
11x17
Note

Name
Height

Description
Gets or sets the page
height
Gets or sets the page
width

Properties

Width

Remarks
1 point is 1/72 inch.

See Also
SelectPdf Namespace

306

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize Constructor
Overload List
Name
PdfCustomPageSize()
PdfCustomPageSize(Singl
e, Single)

Description
Default constructor
constructs a A4 page size
Constructs a custom page
size

See Also
PdfCustomPageSize Class
SelectPdf Namespace

307

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize Constructor
Default constructor constructs a A4 page size
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfCustomPageSize()
VB
Public Sub New

See Also
PdfCustomPageSize Class
PdfCustomPageSize Overload
SelectPdf Namespace

308

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize Constructor (Single, Single)


Constructs a custom page size
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfCustomPageSize(
float width,
float height
)
VB
Public Sub New (
width As Single,
height As Single
)
Parameters
width
Type: System.Single
The page width in points
height
Type: System.Single
The page height in points

See Also
PdfCustomPageSize Class
PdfCustomPageSize Overload
SelectPdf Namespace

309

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.PdfCustomPageSize Fields
The PdfCustomPageSize type exposes the following members.

Fields
Name
A0
A1
A10
A2
A3
A4
A5
A6
A7
A8
A9
ArchA
ArchB
ArchC
ArchD
ArchE
B0
B1
B2
B3
B4
B5
Flsa
HalfLetter
Ledger
Legal
Letter
Letter11x17
Note

Description
A0
A1
A10
A2
A3
A4
A5
A6
A7
A8
A9
ArchA
ArchB
ArchC
ArchD
ArchE
B0
B1
B2
B3
B4
B5
Flsa
HalfLetter
Ledger
Legal
Letter
11x17
Note

See Also
PdfCustomPageSize Class
SelectPdf Namespace

310

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.A0 Field
A0
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize A0
VB
Public Shared ReadOnly A0 As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

311

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.A1 Field
A1
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize A1
VB
Public Shared ReadOnly A1 As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

312

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.A10 Field
A10
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize A10
VB
Public Shared ReadOnly A10 As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

313

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.A2 Field
A2
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize A2
VB
Public Shared ReadOnly A2 As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

314

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.A3 Field
A3
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize A3
VB
Public Shared ReadOnly A3 As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

315

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.A4 Field
A4
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize A4
VB
Public Shared ReadOnly A4 As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

316

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.A5 Field
A5
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize A5
VB
Public Shared ReadOnly A5 As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

317

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.A6 Field
A6
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize A6
VB
Public Shared ReadOnly A6 As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

318

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.A7 Field
A7
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize A7
VB
Public Shared ReadOnly A7 As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

319

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.A8 Field
A8
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize A8
VB
Public Shared ReadOnly A8 As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

320

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.A9 Field
A9
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize A9
VB
Public Shared ReadOnly A9 As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

321

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.ArchA Field
ArchA
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize ArchA
VB
Public Shared ReadOnly ArchA As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

322

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.ArchB Field
ArchB
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize ArchB
VB
Public Shared ReadOnly ArchB As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

323

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.ArchC Field
ArchC
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize ArchC
VB
Public Shared ReadOnly ArchC As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

324

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.ArchD Field
ArchD
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize ArchD
VB
Public Shared ReadOnly ArchD As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

325

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.ArchE Field
ArchE
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize ArchE
VB
Public Shared ReadOnly ArchE As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

326

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.B0 Field
B0
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize B0
VB
Public Shared ReadOnly B0 As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

327

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.B1 Field
B1
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize B1
VB
Public Shared ReadOnly B1 As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

328

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.B2 Field
B2
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize B2
VB
Public Shared ReadOnly B2 As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

329

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.B3 Field
B3
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize B3
VB
Public Shared ReadOnly B3 As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

330

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.B4 Field
B4
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize B4
VB
Public Shared ReadOnly B4 As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

331

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.B5 Field
B5
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize B5
VB
Public Shared ReadOnly B5 As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

332

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.Flsa Field
Flsa
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize Flsa
VB
Public Shared ReadOnly Flsa As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

333

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.HalfLetter Field
HalfLetter
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize HalfLetter
VB
Public Shared ReadOnly HalfLetter As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

334

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.Ledger Field
Ledger
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize Ledger
VB
Public Shared ReadOnly Ledger As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

335

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.Legal Field
Legal
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize Legal
VB
Public Shared ReadOnly Legal As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

336

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.Letter Field
Letter
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize Letter
VB
Public Shared ReadOnly Letter As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

337

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.Letter11x17 Field
11x17
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize Letter11x17
VB
Public Shared ReadOnly Letter11x17 As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

338

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.Note Field
Note
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static readonly PdfCustomPageSize Note
VB
Public Shared ReadOnly Note As PdfCustomPageSize
Field Value
Type: PdfCustomPageSize

See Also
PdfCustomPageSize Class
SelectPdf Namespace

339

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.PdfCustomPageSize Properties
The PdfCustomPageSize type exposes the following members.

Properties
Name
Height
Width

Description
Gets or sets the page
height
Gets or sets the page
width

See Also
PdfCustomPageSize Class
SelectPdf Namespace

340

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.Height Property
Gets or sets the page height
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Height { get; set; }
VB
Public Property Height As Single
Get
Set
Property Value
Type: Single

See Also
PdfCustomPageSize Class
SelectPdf Namespace

341

SelectPdf Html To Pdf Converter for .NET

PdfCustomPageSize.Width Property
Gets or sets the page width
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Width { get; set; }
VB
Public Property Width As Single
Get
Set
Property Value
Type: Single

See Also
PdfCustomPageSize Class
SelectPdf Namespace

342

SelectPdf Html To Pdf Converter for .NET

PdfDestination Class
Represents a destination in a pdf document.

Inheritance Hierarchy
System.Object SelectPdf.PdfDestination
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class PdfDestination
VB
Public Class PdfDestination
The PdfDestination type exposes the following members.

Constructors
Name
PdfDestination(PdfPage)

PdfDestination(PdfPage,
PointF)

PdfDestination(PdfPage,
PointF,
PdfDestinationFitMode)

Description
Constructs a pdf
destination to the
specified pdf page.
Constructs a pdf
destination to the
specified location in the
specified page.
Constructs a destination
to the specified location
in the specified page and
with the specified fit
mode in the destination
page.

Properties
Name
FitMode

Location

Page
ZoomFactor

Description
Gets or sets the auto-fit
mode in the destination
page.
Gets or sets the location
point in the destination
page.
Gets or sets the
destination page.
Gets or sets the zoom
factor of the destination

343

SelectPdf Html To Pdf Converter for .NET


page when viewed in a
pdf viewer.

Remarks
The pdf destination is used by links, bookmarks or open actions to jump at a
specified position in the pdf document.

See Also
SelectPdf Namespace

344

SelectPdf Html To Pdf Converter for .NET

PdfDestination Constructor
Overload List
Name
PdfDestination(PdfPage)

PdfDestination(PdfPage,
PointF)

PdfDestination(PdfPage,
PointF,
PdfDestinationFitMode)

Description
Constructs a pdf
destination to the
specified pdf page.
Constructs a pdf
destination to the
specified location in the
specified page.
Constructs a destination
to the specified location
in the specified page and
with the specified fit
mode in the destination
page.

See Also
PdfDestination Class
SelectPdf Namespace

345

SelectPdf Html To Pdf Converter for .NET

PdfDestination Constructor (PdfPage)


Constructs a pdf destination to the specified pdf page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfDestination(
PdfPage page
)
VB
Public Sub New (
page As PdfPage
)
Parameters
page
Type: SelectPdf.PdfPage
The destination page.

See Also
PdfDestination Class
PdfDestination Overload
SelectPdf Namespace

346

SelectPdf Html To Pdf Converter for .NET

PdfDestination Constructor (PdfPage, PointF)


Constructs a pdf destination to the specified location in the specified page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfDestination(
PdfPage page,
PointF location
)
VB
Public Sub New (
page As PdfPage,
location As PointF
)
Parameters
page
Type: SelectPdf.PdfPage
The destination page.
location
Type: System.Drawing.PointF
The location in the destination pdf page.

See Also
PdfDestination Class
PdfDestination Overload
SelectPdf Namespace

347

SelectPdf Html To Pdf Converter for .NET

PdfDestination Constructor (PdfPage, PointF,


PdfDestinationFitMode)
Constructs a destination to the specified location in the specified page and with the
specified fit mode in the destination page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfDestination(
PdfPage page,
PointF location,
PdfDestinationFitMode fitMode
)
VB
Public Sub New (
page As PdfPage,
location As PointF,
fitMode As PdfDestinationFitMode
)
Parameters
page
Type: SelectPdf.PdfPage
The destination page.
location
Type: System.Drawing.PointF
The location in the destination page.
fitMode
Type: SelectPdf.PdfDestinationFitMode
The destination fit mode.

See Also
PdfDestination Class
PdfDestination Overload
SelectPdf Namespace

348

SelectPdf Html To Pdf Converter for .NET

PdfDestination.PdfDestination Properties
The PdfDestination type exposes the following members.

Properties
Name
FitMode

Location

Page
ZoomFactor

Description
Gets or sets the auto-fit
mode in the destination
page.
Gets or sets the location
point in the destination
page.
Gets or sets the
destination page.
Gets or sets the zoom
factor of the destination
page when viewed in a
pdf viewer.

See Also
PdfDestination Class
SelectPdf Namespace

349

SelectPdf Html To Pdf Converter for .NET

PdfDestination.FitMode Property
Gets or sets the auto-fit mode in the destination page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfDestinationFitMode FitMode { get; set; }
VB
Public Property FitMode As PdfDestinationFitMode
Get
Set
Property Value
Type: PdfDestinationFitMode

See Also
PdfDestination Class
SelectPdf Namespace

350

SelectPdf Html To Pdf Converter for .NET

PdfDestination.Location Property
Gets or sets the location point in the destination page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PointF Location { get; set; }
VB
Public Property Location As PointF
Get
Set
Property Value
Type: PointF

See Also
PdfDestination Class
SelectPdf Namespace

351

SelectPdf Html To Pdf Converter for .NET

PdfDestination.Page Property
Gets or sets the destination page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfPage Page { get; set; }
VB
Public Property Page As PdfPage
Get
Set
Property Value
Type: PdfPage

See Also
PdfDestination Class
SelectPdf Namespace

352

SelectPdf Html To Pdf Converter for .NET

PdfDestination.ZoomFactor Property
Gets or sets the zoom factor of the destination page when viewed in a pdf viewer.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int ZoomFactor { get; set; }
VB
Public Property ZoomFactor As Integer
Get
Set
Property Value
Type: Int32

Remarks
This only works when FitMode is None.

This zoom factor is a percentage. A value of 100 will not zoom the page.

See Also
PdfDestination Class
SelectPdf Namespace

353

SelectPdf Html To Pdf Converter for .NET

PdfDestinationFitMode Enumeration
Specifies the auto-fit mode for a PdfDestination object.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum PdfDestinationFitMode
VB
Public Enumeration PdfDestinationFitMode

Members
Member name
None

Value
0

EntirePage

EntirePageWidth

EntirePageHeigh
t

BoundingBox

BoundingBoxWid
th

BoundingBoxHei
ght

Description
Does not try to
automatically fit
the page.
Automatically fits
the entire page.
Automatically fits
the entire width of
the page.
Automatically fits
the entire height
of the page.
Automatically fits
the bounding box.
Automatically fits
the entire
bounding box
width of the page.
Automatically fits
the entire
bounding box
height of the page.

See Also
SelectPdf Namespace

354

SelectPdf Html To Pdf Converter for .NET

PdfDocument Class
Represents a pdf document.

Inheritance Hierarchy
System.Object SelectPdf.PdfDocument
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class PdfDocument
VB
Public Class PdfDocument
The PdfDocument type exposes the following members.

Constructors
Name
PdfDocument

Description
Creates an empty pdf
document object.

Name
AddBookmark(String,
PdfDestination)

Description
Creates a root bookmark
in the current pdf
document.
Creates a child bookmark
in the current pdf
document under the
specified parent
bookmark.
Adds a system font to the
pdf fonts collection.
Adds a system font to the
pdf fonts collection. The
font is loaded from the
specified file.
Adds a standard CJK font
to the pdf fonts collection.
Adds a standard font to
the pdf fonts collection.
Adds a system font to the
pdf fonts collection.
Creates a new pdf page

Methods

AddBookmark(String,
PdfDestination,
PdfBookmark)

AddFont(Font)
AddFont(String)

AddFont(PdfStandardCJKF
ont)
AddFont(PdfStandardFont
)
AddFont(Font, Boolean)
AddPage()

355

SelectPdf Html To Pdf Converter for .NET

AddPage(PdfMargins)

AddPage(PdfPage)

AddPage(PdfCustomPage
Size, PdfMargins)

AddPage(PdfCustomPage
Size, PdfMargins,
PdfPageOrientation)

AddTemplate(RectangleF)

AddTemplate(Single,
Single)

Append

Close
DetachStream

GetPagesCount(Stream)

GetPagesCount(String)

and adds it to the pdf


document pages
collection.
Creates a new pdf page
with the specified
margins and adds it to
the pdf document pages
collection.
Adds the specified page
to the pdf document
pages collection.
Creates a new pdf page
with the specified size
and margins and adds it
to the pdf document
pages collection.
Creates a new pdf page
with the specified size,
margins and orientation
and adds it to the pdf
document pages
collection.
Adds a new template with
the specified bounds to
the pdf document
templates collection.
Adds a new template with
the specified width and
height to the pdf
document templates
collection.
Appends all pages from
another pdf document to
the current pdf
document.
Closes the current pdf
document.
Detaches the stream that
was used to load the pdf
document, leaving it open
in case the current pdf
document is closed.
Returns the number of
pages in a specified pdf
document.
Returns the number of
pages in a specified pdf
356

SelectPdf Html To Pdf Converter for .NET

InsertPage(Int32,
PdfPage)

InsertPage(Int32,
PdfCustomPageSize,
PdfMargins,
PdfPageOrientation)

RemovePage

RemovePageAt

Save()
Save(Stream)
Save(String)
Save(HttpResponse,
Boolean, String)

document.
Inserts the specified page
into the pdf document
pages collection at the
specified index.
Creates a new pdf page
with the specified size,
margins and orientation
and inserts it into the pdf
document pages
collection at the specified
index.
Removes the specified
page from the pdf
document pages
collection.
Removes the pdf page at
the specified index in pdf
document pages
collection.
Saves the pdf document
as byte array.
Saves the pdf document
to the specified stream.
Saves the pdf document
to the specified file.
Saves the pdf document
to a HTTP stream.

Properties
Name
Bookmarks

CompressionLevel

DocumentInformation

Fonts
Footer

Header

Description
Gets the bookmarks
collection of the pdf
document.
Gets or sets the pdf
document compression
level.
Gets a reference to the
object that specifies the
pdf document properties.
Gets the pdf document
fonts collection.
Represents the default
pdf document footer
template.
Represents the default

357

SelectPdf Html To Pdf Converter for .NET

JpegCompressionEnabled

JpegCompressionLevel

Margins
Pages
Security

Templates
ViewerPreferences

pdf document header


template.
Gets or sets a flag
indicating if the JPEG
compression is enabled or
not for the images in the
generated pdf document.
Gets or sets the
compression level of
images in the generated
pdf document.
The default pdf document
margins.
Gets the pdf document
pages collection.
Gets a reference to the
object that specifies the
pdf document security
settings.
Gets the pdf document
templates collection.
Controls how the pdf
document will appear in a
pdf viewer (like Adobe
Reader).

Remarks
This class provides the API to create, load, modify and save a pdf document.

See Also
SelectPdf Namespace

358

SelectPdf Html To Pdf Converter for .NET

PdfDocument Constructor
Creates an empty pdf document object.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfDocument()
VB
Public Sub New

Remarks
New pdf pages can be added to the document and new pdf elements can be added
to these new document pages.

See Also
PdfDocument Class
SelectPdf Namespace

359

SelectPdf Html To Pdf Converter for .NET

PdfDocument.PdfDocument Methods
The PdfDocument type exposes the following members.

Methods
Name
AddBookmark(String,
PdfDestination)
AddBookmark(String,
PdfDestination,
PdfBookmark)

AddFont(Font)
AddFont(String)

AddFont(PdfStandardCJKF
ont)
AddFont(PdfStandardFont
)
AddFont(Font, Boolean)
AddPage()

AddPage(PdfMargins)

AddPage(PdfPage)

AddPage(PdfCustomPage
Size, PdfMargins)

AddPage(PdfCustomPage
Size, PdfMargins,
PdfPageOrientation)

Description
Creates a root bookmark
in the current pdf
document.
Creates a child bookmark
in the current pdf
document under the
specified parent
bookmark.
Adds a system font to the
pdf fonts collection.
Adds a system font to the
pdf fonts collection. The
font is loaded from the
specified file.
Adds a standard CJK font
to the pdf fonts collection.
Adds a standard font to
the pdf fonts collection.
Adds a system font to the
pdf fonts collection.
Creates a new pdf page
and adds it to the pdf
document pages
collection.
Creates a new pdf page
with the specified
margins and adds it to
the pdf document pages
collection.
Adds the specified page
to the pdf document
pages collection.
Creates a new pdf page
with the specified size
and margins and adds it
to the pdf document
pages collection.
Creates a new pdf page
with the specified size,
margins and orientation
and adds it to the pdf
360

SelectPdf Html To Pdf Converter for .NET

AddTemplate(RectangleF)

AddTemplate(Single,
Single)

Append

Close
DetachStream

GetPagesCount(Stream)

GetPagesCount(String)

InsertPage(Int32,
PdfPage)

InsertPage(Int32,
PdfCustomPageSize,
PdfMargins,
PdfPageOrientation)

RemovePage

RemovePageAt

document pages
collection.
Adds a new template with
the specified bounds to
the pdf document
templates collection.
Adds a new template with
the specified width and
height to the pdf
document templates
collection.
Appends all pages from
another pdf document to
the current pdf
document.
Closes the current pdf
document.
Detaches the stream that
was used to load the pdf
document, leaving it open
in case the current pdf
document is closed.
Returns the number of
pages in a specified pdf
document.
Returns the number of
pages in a specified pdf
document.
Inserts the specified page
into the pdf document
pages collection at the
specified index.
Creates a new pdf page
with the specified size,
margins and orientation
and inserts it into the pdf
document pages
collection at the specified
index.
Removes the specified
page from the pdf
document pages
collection.
Removes the pdf page at
the specified index in pdf
document pages
collection.
361

SelectPdf Html To Pdf Converter for .NET


Save()
Save(Stream)
Save(String)
Save(HttpResponse,
Boolean, String)

Saves the pdf document


as byte array.
Saves the pdf document
to the specified stream.
Saves the pdf document
to the specified file.
Saves the pdf document
to a HTTP stream.

See Also
PdfDocument Class
SelectPdf Namespace

362

SelectPdf Html To Pdf Converter for .NET

PdfDocument.AddBookmark Method
Overload List
Name
AddBookmark(String,
PdfDestination)
AddBookmark(String,
PdfDestination,
PdfBookmark)

Description
Creates a root bookmark
in the current pdf
document.
Creates a child bookmark
in the current pdf
document under the
specified parent
bookmark.

See Also
PdfDocument Class
SelectPdf Namespace

363

SelectPdf Html To Pdf Converter for .NET

PdfDocument.AddBookmark Method (String,


PdfDestination)
Creates a root bookmark in the current pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfBookmark AddBookmark(
string text,
PdfDestination destination
)
VB
Public Function AddBookmark (
text As String,
destination As PdfDestination
) As PdfBookmark
Parameters
text
Type: System.String
The bookmark text.
destination
Type: SelectPdf.PdfDestination
The bookmark destination.
Return Value
Type: PdfBookmarkThe newly added bookmark.

See Also
PdfDocument Class
AddBookmark Overload
SelectPdf Namespace

364

SelectPdf Html To Pdf Converter for .NET

PdfDocument.AddBookmark Method (String,


PdfDestination, PdfBookmark)
Creates a child bookmark in the current pdf document under the specified parent
bookmark.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfBookmark AddBookmark(
string text,
PdfDestination destination,
PdfBookmark parent
)
VB
Public Function AddBookmark (
text As String,
destination As PdfDestination,
parent As PdfBookmark
) As PdfBookmark
Parameters
text
Type: System.String
The bookmark text.
destination
Type: SelectPdf.PdfDestination
The bookmark destination.
parent
Type: SelectPdf.PdfBookmark
The parent bookmark.
Return Value
Type: PdfBookmarkThe newly added bookmark.

See Also
PdfDocument Class
AddBookmark Overload
SelectPdf Namespace

365

SelectPdf Html To Pdf Converter for .NET

PdfDocument.AddFont Method
Overload List
Name
AddFont(Font)
AddFont(String)

AddFont(PdfStandardCJKF
ont)
AddFont(PdfStandardFont
)
AddFont(Font, Boolean)

Description
Adds a system font to the
pdf fonts collection.
Adds a system font to the
pdf fonts collection. The
font is loaded from the
specified file.
Adds a standard CJK font
to the pdf fonts collection.
Adds a standard font to
the pdf fonts collection.
Adds a system font to the
pdf fonts collection.

See Also
PdfDocument Class
SelectPdf Namespace

366

SelectPdf Html To Pdf Converter for .NET

PdfDocument.AddFont Method (Font)


Adds a system font to the pdf fonts collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfFont AddFont(
Font font
)
VB
Public Function AddFont (
font As Font
) As PdfFont
Parameters
font
Type: System.Drawing.Font
The system font to be added to the fonts collection.
Return Value
Type: PdfFontThe pdf font added to the fonts collection.

Remarks
If the font was already added, the method returns the existing font. By default the
font is embedded into the pdf document in order to support Unicode texts.

See Also
PdfDocument Class
AddFont Overload
SelectPdf Namespace

367

SelectPdf Html To Pdf Converter for .NET

PdfDocument.AddFont Method (String)


Adds a system font to the pdf fonts collection. The font is loaded from the specified
file.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfFont AddFont(
string fontFileName
)
VB
Public Function AddFont (
fontFileName As String
) As PdfFont
Parameters
fontFileName
Type: System.String
The file name of the font to be added.
Return Value
Type: PdfFontThe pdf font added to the fonts collection.

Remarks
If the font was already added, the method returns the existing pdf font.

See Also
PdfDocument Class
AddFont Overload
SelectPdf Namespace

368

SelectPdf Html To Pdf Converter for .NET

PdfDocument.AddFont Method (PdfStandardCJKFont)


Adds a standard CJK font to the pdf fonts collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfFont AddFont(
PdfStandardCJKFont stdCJKFont
)
VB
Public Function AddFont (
stdCJKFont As PdfStandardCJKFont
) As PdfFont
Parameters
stdCJKFont
Type: SelectPdf.PdfStandardCJKFont
The standard CJK font to add to the pdf document fonts collection.
Return Value
Type: PdfFontThe pdf font added to the fonts collection.

Remarks
If the font was already added, the method returns the existing pdf font.

See Also
PdfDocument Class
AddFont Overload
SelectPdf Namespace

369

SelectPdf Html To Pdf Converter for .NET

PdfDocument.AddFont Method (PdfStandardFont)


Adds a standard font to the pdf fonts collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfFont AddFont(
PdfStandardFont stdFont
)
VB
Public Function AddFont (
stdFont As PdfStandardFont
) As PdfFont
Parameters
stdFont
Type: SelectPdf.PdfStandardFont
The standard font family.
Return Value
Type: PdfFontThe pdf font added to the fonts collection.

Remarks
If the font was already added, the method returns the existing pdf font.

See Also
PdfDocument Class
AddFont Overload
SelectPdf Namespace

370

SelectPdf Html To Pdf Converter for .NET

PdfDocument.AddFont Method (Font, Boolean)


Adds a system font to the pdf fonts collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfFont AddFont(
Font font,
bool embedFont
)
VB
Public Function AddFont (
font As Font,
embedFont As Boolean
) As PdfFont
Parameters
font
Type: System.Drawing.Font
Font for adding.The system font to be added to the fonts collection.
embedFont
Type: System.Boolean
Specifies if the font will be embedded into the pdf document or not.
Return Value
Type: PdfFontThe pdf font added to the fonts collection.

Remarks
If the font was already added, the method returns the existing font. The embedFont
parameter indicates if the added font will be embedded into the pdf document or
not.

See Also
PdfDocument Class
AddFont Overload
SelectPdf Namespace

371

SelectPdf Html To Pdf Converter for .NET

PdfDocument.AddPage Method
Overload List
Name
AddPage()

AddPage(PdfMargins)

AddPage(PdfPage)

AddPage(PdfCustomPage
Size, PdfMargins)

AddPage(PdfCustomPage
Size, PdfMargins,
PdfPageOrientation)

Description
Creates a new pdf page
and adds it to the pdf
document pages
collection.
Creates a new pdf page
with the specified
margins and adds it to
the pdf document pages
collection.
Adds the specified page
to the pdf document
pages collection.
Creates a new pdf page
with the specified size
and margins and adds it
to the pdf document
pages collection.
Creates a new pdf page
with the specified size,
margins and orientation
and adds it to the pdf
document pages
collection.

See Also
PdfDocument Class
SelectPdf Namespace

372

SelectPdf Html To Pdf Converter for .NET

PdfDocument.AddPage Method
Creates a new pdf page and adds it to the pdf document pages collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfPage AddPage()
VB
Public Function AddPage As PdfPage
Return Value
Type: PdfPageThe newly created pdf page.

Remarks
If there is a previous page in the pages collection, the orientation and size are
inherited from that page, otherwise a first page with the default A4 size and Portrait
orientation is created.

The page margins are inherited from the default pdf document margins specified in
Margins property.

See Also
PdfDocument Class
AddPage Overload
SelectPdf Namespace

373

SelectPdf Html To Pdf Converter for .NET

PdfDocument.AddPage Method (PdfMargins)


Creates a new pdf page with the specified margins and adds it to the pdf document
pages collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfPage AddPage(
PdfMargins pageMargins
)
VB
Public Function AddPage (
pageMargins As PdfMargins
) As PdfPage
Parameters
pageMargins
Type: SelectPdf.PdfMargins
The pdf page margins.
Return Value
Type: PdfPageThe newly created pdf page.

Remarks
If there is a previous page in the pages collection, the orientation and size are
inherited from that page, otherwise a first page with the default A4 size and Portrait
orientation is created.

See Also
PdfDocument Class
AddPage Overload
SelectPdf Namespace

374

SelectPdf Html To Pdf Converter for .NET

PdfDocument.AddPage Method (PdfPage)


Adds the specified page to the pdf document pages collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void AddPage(
PdfPage pdfPage
)
VB
Public Sub AddPage (
pdfPage As PdfPage
)
Parameters
pdfPage
Type: SelectPdf.PdfPage
The page to be added to the collection.

Remarks
The specified page can belong to another pdf document.

Important
The source pdf document must remain opened until the current document is
saved.

See Also
PdfDocument Class
AddPage Overload
SelectPdf Namespace

375

SelectPdf Html To Pdf Converter for .NET

PdfDocument.AddPage Method (PdfCustomPageSize,


PdfMargins)
Creates a new pdf page with the specified size and margins and adds it to the pdf
document pages collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfPage AddPage(
PdfCustomPageSize pageSize,
PdfMargins pageMargins
)
VB
Public Function AddPage (
pageSize As PdfCustomPageSize,
pageMargins As PdfMargins
) As PdfPage
Parameters
pageSize
Type: SelectPdf.PdfCustomPageSize
The pdf page size.
pageMargins
Type: SelectPdf.PdfMargins
The pdf page margins.
Return Value
Type: PdfPageThe newly created pdf page.

Remarks
If there is a previous page in the pages collection, the orientation is inherited from
that page, otherwise a first page with the default Portrait orientation is created.

See Also
PdfDocument Class
AddPage Overload
SelectPdf Namespace

376

SelectPdf Html To Pdf Converter for .NET

PdfDocument.AddPage Method (PdfCustomPageSize,


PdfMargins, PdfPageOrientation)
Creates a new pdf page with the specified size, margins and orientation and adds it
to the pdf document pages collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfPage AddPage(
PdfCustomPageSize pageSize,
PdfMargins pageMargins,
PdfPageOrientation pageOrientation
)
VB
Public Function AddPage (
pageSize As PdfCustomPageSize,
pageMargins As PdfMargins,
pageOrientation As PdfPageOrientation
) As PdfPage
Parameters
pageSize
Type: SelectPdf.PdfCustomPageSize
The pdf page size.
pageMargins
Type: SelectPdf.PdfMargins
The pdf page margins.
pageOrientation
Type: SelectPdf.PdfPageOrientation
The pdf page orientation.
Return Value
Type: PdfPageThe newly created pdf page.

See Also
PdfDocument Class
AddPage Overload
SelectPdf Namespace

377

SelectPdf Html To Pdf Converter for .NET

PdfDocument.AddTemplate Method
Overload List
Name
AddTemplate(RectangleF)

AddTemplate(Single,
Single)

Description
Adds a new template with
the specified bounds to
the pdf document
templates collection.
Adds a new template with
the specified width and
height to the pdf
document templates
collection.

See Also
PdfDocument Class
SelectPdf Namespace

378

SelectPdf Html To Pdf Converter for .NET

PdfDocument.AddTemplate Method (RectangleF)


Adds a new template with the specified bounds to the pdf document templates
collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTemplate AddTemplate(
RectangleF bounds
)
VB
Public Function AddTemplate (
bounds As RectangleF
) As PdfTemplate
Parameters
bounds
Type: System.Drawing.RectangleF
The template element bounds.
Return Value
Type: PdfTemplateThe newly added pdf template.

See Also
PdfDocument Class
AddTemplate Overload
SelectPdf Namespace

379

SelectPdf Html To Pdf Converter for .NET

PdfDocument.AddTemplate Method (Single, Single)


Adds a new template with the specified width and height to the pdf document
templates collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTemplate AddTemplate(
float width,
float height
)
VB
Public Function AddTemplate (
width As Single,
height As Single
) As PdfTemplate
Parameters
width
Type: System.Single
The pdf template width.
height
Type: System.Single
The pdf template height.
Return Value
Type: PdfTemplateThe newly added pdf template.

Remarks
The template location is top left corner of the pdf page. Use
AddTemplate(RectangleF) to specify another location for the template.

See Also
PdfDocument Class
AddTemplate Overload
SelectPdf Namespace

380

SelectPdf Html To Pdf Converter for .NET

PdfDocument.Append Method
Appends all pages from another pdf document to the current pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void Append(
PdfDocument doc
)
VB
Public Sub Append (
doc As PdfDocument
)
Parameters
doc
Type: SelectPdf.PdfDocument
The document to be appended.

Remarks
A custom range of pages from another document can be appended to the current
document calling the Add(PdfPage) method on the Pages collection for each page to
be appended.

Important

The appended document must remain opened until the current document is saved.

See Also
PdfDocument Class
SelectPdf Namespace

381

SelectPdf Html To Pdf Converter for .NET

PdfDocument.Close Method
Closes the current pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void Close()
VB
Public Sub Close

Remarks
Calling this method will release all the resources allocated by the pdf document.

Important
Always call this method after the document was saved.

Note
If the document was created from a stream, the stream will be closed if it was not
explicitly detached by calling the DetachStream() before the document is closed.

See Also
PdfDocument Class
SelectPdf Namespace

382

SelectPdf Html To Pdf Converter for .NET

PdfDocument.DetachStream Method
Detaches the stream that was used to load the pdf document, leaving it open in
case the current pdf document is closed.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void DetachStream()
VB
Public Sub DetachStream

Remarks
Call this method to detach the stream from which the pdf document was created.
When this method is called before calling Close(), the Close() method will not close
the detached stream.

See Also
PdfDocument Class
SelectPdf Namespace

383

SelectPdf Html To Pdf Converter for .NET

PdfDocument.GetPagesCount Method
Overload List
Name
GetPagesCount(Stream)

GetPagesCount(String)

Description
Returns the number of
pages in a specified pdf
document.
Returns the number of
pages in a specified pdf
document.

See Also
PdfDocument Class
SelectPdf Namespace

384

SelectPdf Html To Pdf Converter for .NET

PdfDocument.GetPagesCount Method (Stream)


Returns the number of pages in a specified pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static int GetPagesCount(
Stream stream
)
VB
Public Shared Function GetPagesCount (
stream As Stream
) As Integer
Parameters
stream
Type: System.IO.Stream
The stream containing the pdf document.
Return Value
Type: Int32The number of pages in the specified pdf document.

See Also
PdfDocument Class
GetPagesCount Overload
SelectPdf Namespace

385

SelectPdf Html To Pdf Converter for .NET

PdfDocument.GetPagesCount Method (String)


Returns the number of pages in a specified pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static int GetPagesCount(
string fileName
)
VB
Public Shared Function GetPagesCount (
fileName As String
) As Integer
Parameters
fileName
Type: System.String
The pdf file.
Return Value
Type: Int32The number of pages in the specified pdf document.

See Also
PdfDocument Class
GetPagesCount Overload
SelectPdf Namespace

386

SelectPdf Html To Pdf Converter for .NET

PdfDocument.InsertPage Method
Overload List
Name
InsertPage(Int32,
PdfPage)

InsertPage(Int32,
PdfCustomPageSize,
PdfMargins,
PdfPageOrientation)

Description
Inserts the specified page
into the pdf document
pages collection at the
specified index.
Creates a new pdf page
with the specified size,
margins and orientation
and inserts it into the pdf
document pages
collection at the specified
index.

See Also
PdfDocument Class
SelectPdf Namespace

387

SelectPdf Html To Pdf Converter for .NET

PdfDocument.InsertPage Method (Int32, PdfPage)


Inserts the specified page into the pdf document pages collection at the specified
index.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void InsertPage(
int pageIndex,
PdfPage pdfPage
)
VB
Public Sub InsertPage (
pageIndex As Integer,
pdfPage As PdfPage
)
Parameters
pageIndex
Type: System.Int32
The index where the pdf page will be inserted.
pdfPage
Type: SelectPdf.PdfPage
The pdf page to be inserted into the collection.

Remarks
The specified page can belong to another pdf document.

Note
The source pdf document must remain opened until the current document is
saved.

See Also
PdfDocument Class
InsertPage Overload
SelectPdf Namespace

388

SelectPdf Html To Pdf Converter for .NET

PdfDocument.InsertPage Method (Int32,


PdfCustomPageSize, PdfMargins, PdfPageOrientation)
Creates a new pdf page with the specified size, margins and orientation and inserts
it into the pdf document pages collection at the specified index.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfPage InsertPage(
int index,
PdfCustomPageSize pageSize,
PdfMargins pageMargins,
PdfPageOrientation pageOrientation
)
VB
Public Function InsertPage (
index As Integer,
pageSize As PdfCustomPageSize,
pageMargins As PdfMargins,
pageOrientation As PdfPageOrientation
) As PdfPage
Parameters
index
Type: System.Int32
The index where the new pdf page will be inserted.
pageSize
Type: SelectPdf.PdfCustomPageSize
The pdf page size.
pageMargins
Type: SelectPdf.PdfMargins
The pdf page margins.
pageOrientation
Type: SelectPdf.PdfPageOrientation
The pdf page orientation.
Return Value
Type: PdfPageThe newly created pdf page.

See Also
PdfDocument Class
InsertPage Overload
389

SelectPdf Html To Pdf Converter for .NET


SelectPdf Namespace

390

SelectPdf Html To Pdf Converter for .NET

PdfDocument.RemovePage Method
Removes the specified page from the pdf document pages collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void RemovePage(
PdfPage pdfPage
)
VB
Public Sub RemovePage (
pdfPage As PdfPage
)
Parameters
pdfPage
Type: SelectPdf.PdfPage
The pdf page to be removed.

See Also
PdfDocument Class
SelectPdf Namespace

391

SelectPdf Html To Pdf Converter for .NET

PdfDocument.RemovePageAt Method
Removes the pdf page at the specified index in pdf document pages collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void RemovePageAt(
int index
)
VB
Public Sub RemovePageAt (
index As Integer
)
Parameters
index
Type: System.Int32
The zero based index of the pdf page to be removed.

See Also
PdfDocument Class
SelectPdf Namespace

392

SelectPdf Html To Pdf Converter for .NET

PdfDocument.Save Method
Overload List
Name
Save()
Save(Stream)
Save(String)
Save(HttpResponse,
Boolean, String)

Description
Saves the pdf document
as byte array.
Saves the pdf document
to the specified stream.
Saves the pdf document
to the specified file.
Saves the pdf document
to a HTTP stream.

See Also
PdfDocument Class
SelectPdf Namespace

393

SelectPdf Html To Pdf Converter for .NET

PdfDocument.Save Method
Saves the pdf document as byte array.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public byte[] Save()
VB
Public Function Save As Byte()
Return Value
Type: Byte[]The byte array representation of the document.

Remarks
The byte array can be further saved to a file or sent over HTTP as a response to the
browser.

See Also
PdfDocument Class
Save Overload
SelectPdf Namespace

394

SelectPdf Html To Pdf Converter for .NET

PdfDocument.Save Method (Stream)


Saves the pdf document to the specified stream.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void Save(
Stream stream
)
VB
Public Sub Save (
stream As Stream
)
Parameters
stream
Type: System.IO.Stream
The stream where to save the pdf document.

See Also
PdfDocument Class
Save Overload
SelectPdf Namespace

395

SelectPdf Html To Pdf Converter for .NET

PdfDocument.Save Method (String)


Saves the pdf document to the specified file.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void Save(
string fileName
)
VB
Public Sub Save (
fileName As String
)
Parameters
fileName
Type: System.String
The name of the file where to save the document. It can be a full path or a relative
path.

See Also
PdfDocument Class
Save Overload
SelectPdf Namespace

396

SelectPdf Html To Pdf Converter for .NET

PdfDocument.Save Method (HttpResponse, Boolean,


String)
Saves the pdf document to a HTTP stream.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void Save(
HttpResponse httpResponse,
bool displayInline,
string fileName
)
VB
Public Sub Save (
httpResponse As HttpResponse,
displayInline As Boolean,
fileName As String
)
Parameters
httpResponse
Type: System.Web.HttpResponse
The HTTP response object.
displayInline
Type: System.Boolean
If this is true, the pdf document will be automatically opened in browser, otherwise
the user will be asked to save or open the downloaded pdf document.
fileName
Type: System.String
The name of the pdf document. This name is used by the browser when it opens the
pdf document inline or the name suggested for saving the document when the
document is sent as an attachment.

See Also
PdfDocument Class
Save Overload
SelectPdf Namespace

397

SelectPdf Html To Pdf Converter for .NET

PdfDocument.PdfDocument Properties
The PdfDocument type exposes the following members.

Properties
Name
Bookmarks

CompressionLevel

DocumentInformation

Fonts
Footer

Header

JpegCompressionEnabled

JpegCompressionLevel

Margins
Pages
Security

Templates
ViewerPreferences

Description
Gets the bookmarks
collection of the pdf
document.
Gets or sets the pdf
document compression
level.
Gets a reference to the
object that specifies the
pdf document properties.
Gets the pdf document
fonts collection.
Represents the default
pdf document footer
template.
Represents the default
pdf document header
template.
Gets or sets a flag
indicating if the JPEG
compression is enabled or
not for the images in the
generated pdf document.
Gets or sets the
compression level of
images in the generated
pdf document.
The default pdf document
margins.
Gets the pdf document
pages collection.
Gets a reference to the
object that specifies the
pdf document security
settings.
Gets the pdf document
templates collection.
Controls how the pdf
document will appear in a
pdf viewer (like Adobe
Reader).

398

SelectPdf Html To Pdf Converter for .NET

See Also
PdfDocument Class
SelectPdf Namespace

399

SelectPdf Html To Pdf Converter for .NET

PdfDocument.Bookmarks Property
Gets the bookmarks collection of the pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfBookmarksCollection Bookmarks { get; }
VB
Public ReadOnly Property Bookmarks As PdfBookmarksCollection
Get
Property Value
Type: PdfBookmarksCollection

See Also
PdfDocument Class
SelectPdf Namespace

400

SelectPdf Html To Pdf Converter for .NET

PdfDocument.CompressionLevel Property
Gets or sets the pdf document compression level.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfCompressionLevel CompressionLevel { get; set; }
VB
Public Property CompressionLevel As PdfCompressionLevel
Get
Set
Property Value
Type: PdfCompressionLevel

See Also
PdfDocument Class
SelectPdf Namespace

401

SelectPdf Html To Pdf Converter for .NET

PdfDocument.DocumentInformation Property
Gets a reference to the object that specifies the pdf document properties.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfDocumentInformation DocumentInformation { get; }
VB
Public ReadOnly Property DocumentInformation As
PdfDocumentInformation
Get
Property Value
Type: PdfDocumentInformation

See Also
PdfDocument Class
SelectPdf Namespace

402

SelectPdf Html To Pdf Converter for .NET

PdfDocument.Fonts Property
Gets the pdf document fonts collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfFontCollection Fonts { get; }
VB
Public ReadOnly Property Fonts As PdfFontCollection
Get
Property Value
Type: PdfFontCollection

See Also
PdfDocument Class
SelectPdf Namespace

403

SelectPdf Html To Pdf Converter for .NET

PdfDocument.Footer Property
Represents the default pdf document footer template.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTemplate Footer { get; set; }
VB
Public Property Footer As PdfTemplate
Get
Set
Property Value
Type: PdfTemplate

Remarks
The footer space is automatically taken into account when calculating the available
space for rendering in a pdf page.

This template is automatically docked to the bottom of the pdf page.

See Also
PdfDocument Class
SelectPdf Namespace

404

SelectPdf Html To Pdf Converter for .NET

PdfDocument.Header Property
Represents the default pdf document header template.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTemplate Header { get; set; }
VB
Public Property Header As PdfTemplate
Get
Set
Property Value
Type: PdfTemplate

Remarks
The header space is automatically taken into account when calculating the available
space for rendering in a pdf page.

This template is automatically docked to the top of the pdf page.

See Also
PdfDocument Class
SelectPdf Namespace

405

SelectPdf Html To Pdf Converter for .NET

PdfDocument.JpegCompressionEnabled Property
Gets or sets a flag indicating if the JPEG compression is enabled or not for the
images in the generated pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool JpegCompressionEnabled { get; set; }
VB
Public Property JpegCompressionEnabled As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
By default the JPEG compression is enabled to reduce the size of the generated pdf
document. When the JPEG compression is enabled the quality of the images in the
generated pdf is lower than the quality of the original images from the web page,
and this quality depends on the JpegCompressionLevel parameter. When the
JpegCompressionLevel is increased, the quality of the images in pdf decreases.

See Also
PdfDocument Class
SelectPdf Namespace

406

SelectPdf Html To Pdf Converter for .NET

PdfDocument.JpegCompressionLevel Property
Gets or sets the compression level of images in the generated pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int JpegCompressionLevel { get; set; }
VB
Public Property JpegCompressionLevel As Integer
Get
Set
Property Value
Type: Int32

Remarks
This property can take values between 0 and 100. It has effect only when the
JpegCompressionEnabled is set to true. When the JpegCompressionLevel is 0, the
compression rate is the lowest and the quality of the images is the best. When the
JpegCompressionLevel is 100, the compression rate is the highest and quality of
the images in PDF is the worst.

The default JPEG compression level is 10, which should offer a good balance
between the compression rate and the quality of the images in pdf.

See Also
PdfDocument Class
SelectPdf Namespace

407

SelectPdf Html To Pdf Converter for .NET

PdfDocument.Margins Property
The default pdf document margins.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfMargins Margins { get; set; }
VB
Public Property Margins As PdfMargins
Get
Set
Property Value
Type: PdfMargins

Remarks
A new pages will use the default margins if no margins are specified when the page
is added.

See Also
PdfDocument Class
SelectPdf Namespace

408

SelectPdf Html To Pdf Converter for .NET

PdfDocument.Pages Property
Gets the pdf document pages collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfPageCollection Pages { get; }
VB
Public ReadOnly Property Pages As PdfPageCollection
Get
Property Value
Type: PdfPageCollection

See Also
PdfDocument Class
SelectPdf Namespace

409

SelectPdf Html To Pdf Converter for .NET

PdfDocument.Security Property
Gets a reference to the object that specifies the pdf document security settings.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfDocumentSecurity Security { get; }
VB
Public ReadOnly Property Security As PdfDocumentSecurity
Get
Property Value
Type: PdfDocumentSecurity

See Also
PdfDocument Class
SelectPdf Namespace

410

SelectPdf Html To Pdf Converter for .NET

PdfDocument.Templates Property
Gets the pdf document templates collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTemplateCollection Templates { get; }
VB
Public ReadOnly Property Templates As PdfTemplateCollection
Get
Property Value
Type: PdfTemplateCollection

See Also
PdfDocument Class
SelectPdf Namespace

411

SelectPdf Html To Pdf Converter for .NET

PdfDocument.ViewerPreferences Property
Controls how the pdf document will appear in a pdf viewer (like Adobe Reader).
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfViewerPreferences ViewerPreferences { get; }
VB
Public ReadOnly Property ViewerPreferences As PdfViewerPreferences
Get
Property Value
Type: PdfViewerPreferences

See Also
PdfDocument Class
SelectPdf Namespace

412

SelectPdf Html To Pdf Converter for .NET

PdfDocumentException Class
Exception thrown by the pdf document related objects.

Inheritance Hierarchy
System.Object System.Exception

SelectPdf.PdfDocumentException

Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)


Version: 1.0

Syntax
C#
public class PdfDocumentException : Exception
VB
Public Class PdfDocumentException
Inherits Exception

Constructors
Name
PdfDocumentException(St
ring)
PdfDocumentException(St
ring, Exception)

Description
Constructor.
Constructor.

See Also
SelectPdf Namespace

413

SelectPdf Html To Pdf Converter for .NET

PdfDocumentException Constructor
Overload List
Name
PdfDocumentException(St
ring)
PdfDocumentException(St
ring, Exception)

Description
Constructor.
Constructor.

See Also
PdfDocumentException Class
SelectPdf Namespace

414

SelectPdf Html To Pdf Converter for .NET

PdfDocumentException Constructor (String)


Constructor.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfDocumentException(
string message
)
VB
Public Sub New (
message As String
)
Parameters
message
Type: System.String
The exception message.

See Also
PdfDocumentException Class
PdfDocumentException Overload
SelectPdf Namespace

415

SelectPdf Html To Pdf Converter for .NET

PdfDocumentException Constructor (String, Exception)


Constructor.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfDocumentException(
string message,
Exception innerException
)
VB
Public Sub New (
message As String,
innerException As Exception
)
Parameters
message
Type: System.String
The exception message.
innerException
Type: System.Exception
The inner exception that triggered this exception.

See Also
PdfDocumentException Class
PdfDocumentException Overload
SelectPdf Namespace

416

SelectPdf Html To Pdf Converter for .NET

PdfDocumentInformation Class
This class provides the possibility to control the pdf document properties.

Inheritance Hierarchy
System.Object SelectPdf.PdfDocumentInformation
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class PdfDocumentInformation
VB
Public Class PdfDocumentInformation
The PdfDocumentInformation type exposes the following members.

Properties
Name
Author
CreationDate

Keywords
Subject
Title

Description
Gets or sets the name of
the pdf document author.
Gets or sets the date and
time when the pdf
document was created.
Gets or sets the pdf
document keywords.
Gets or sets the subject
of the pdf document.
Gets or sets the pdf
document title.

Remarks
Using this class, the pdf document properties (author, title, keywords, etc) can be
controlled.

See Also
SelectPdf Namespace

417

SelectPdf Html To Pdf Converter for .NET

PdfDocumentInformation.PdfDocumentInformation
Properties
The PdfDocumentInformation type exposes the following members.

Properties
Name
Author
CreationDate

Keywords
Subject
Title

Description
Gets or sets the name of
the pdf document author.
Gets or sets the date and
time when the pdf
document was created.
Gets or sets the pdf
document keywords.
Gets or sets the subject
of the pdf document.
Gets or sets the pdf
document title.

See Also
PdfDocumentInformation Class
SelectPdf Namespace

418

SelectPdf Html To Pdf Converter for .NET

PdfDocumentInformation.Author Property
Gets or sets the name of the pdf document author.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string Author { get; set; }
VB
Public Property Author As String
Get
Set
Property Value
Type: String

See Also
PdfDocumentInformation Class
SelectPdf Namespace

419

SelectPdf Html To Pdf Converter for .NET

PdfDocumentInformation.CreationDate Property
Gets or sets the date and time when the pdf document was created.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public DateTime CreationDate { get; set; }
VB
Public Property CreationDate As DateTime
Get
Set
Property Value
Type: DateTime

See Also
PdfDocumentInformation Class
SelectPdf Namespace

420

SelectPdf Html To Pdf Converter for .NET

PdfDocumentInformation.Keywords Property
Gets or sets the pdf document keywords.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string Keywords { get; set; }
VB
Public Property Keywords As String
Get
Set
Property Value
Type: String

See Also
PdfDocumentInformation Class
SelectPdf Namespace

421

SelectPdf Html To Pdf Converter for .NET

PdfDocumentInformation.Subject Property
Gets or sets the subject of the pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string Subject { get; set; }
VB
Public Property Subject As String
Get
Set
Property Value
Type: String

See Also
PdfDocumentInformation Class
SelectPdf Namespace

422

SelectPdf Html To Pdf Converter for .NET

PdfDocumentInformation.Title Property
Gets or sets the pdf document title.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string Title { get; set; }
VB
Public Property Title As String
Get
Set
Property Value
Type: String

See Also
PdfDocumentInformation Class
SelectPdf Namespace

423

SelectPdf Html To Pdf Converter for .NET

PdfDocumentOpenAction Class
Encapsulates an action to be performed when the pdf document is opened.

Inheritance Hierarchy
System.Object SelectPdf.PdfDocumentOpenAction
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class PdfDocumentOpenAction
VB
Public Class PdfDocumentOpenAction
The PdfDocumentOpenAction type exposes the following members.

Properties
Name
Action

Description
The pdf document open
action as an instance of
the PdfActionGoTo or
PdfActionJavaScript
classes.

Remarks
The pdf document can perform 2 types of actions when it is opened:

PdfActionGoTo
- The pdf document opens at a specific PdfDestination.

PdfActionJavaScript
- The pdf document will run a specific javascript.

See Also
SelectPdf Namespace

424

SelectPdf Html To Pdf Converter for .NET

PdfDocumentOpenAction.PdfDocumentOpenAction
Properties
The PdfDocumentOpenAction type exposes the following members.

Properties
Name
Action

Description
The pdf document open
action as an instance of
the PdfActionGoTo or
PdfActionJavaScript
classes.

See Also
PdfDocumentOpenAction Class
SelectPdf Namespace

425

SelectPdf Html To Pdf Converter for .NET

PdfDocumentOpenAction.Action Property
The pdf document open action as an instance of the PdfActionGoTo or
PdfActionJavaScript classes.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfAction Action { get; set; }
VB
Public Property Action As PdfAction
Get
Set
Property Value
Type: PdfAction

See Also
PdfDocumentOpenAction Class
SelectPdf Namespace

426

SelectPdf Html To Pdf Converter for .NET

PdfDocumentSecurity Class
This class provides the options to control the pdf document security.

Inheritance Hierarchy
System.Object SelectPdf.PdfDocumentSecurity
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class PdfDocumentSecurity
VB
Public Class PdfDocumentSecurity
The PdfDocumentSecurity type exposes the following members.

Properties
Name
CanAssembleDocument

CanCopyContent

CanEditAnnotations
CanEditContent
CanFillFormFields
CanPrint
OwnerPassword
UserPassword

Description
Allows inserting, rotating
or deleting pages or
bookmarks.
Allows copying page
contents such as text and
images.
Allows document
annotations editing.
Allows modifying
document content.
Allows filling in form
fields.
Allows printing.
Sets or gets the owner
password.
Gets or sets the user
password.

See Also
SelectPdf Namespace

427

SelectPdf Html To Pdf Converter for .NET

PdfDocumentSecurity.PdfDocumentSecurity Properties
The PdfDocumentSecurity type exposes the following members.

Properties
Name
CanAssembleDocument

CanCopyContent

CanEditAnnotations
CanEditContent
CanFillFormFields
CanPrint
OwnerPassword
UserPassword

Description
Allows inserting, rotating
or deleting pages or
bookmarks.
Allows copying page
contents such as text and
images.
Allows document
annotations editing.
Allows modifying
document content.
Allows filling in form
fields.
Allows printing.
Sets or gets the owner
password.
Gets or sets the user
password.

See Also
PdfDocumentSecurity Class
SelectPdf Namespace

428

SelectPdf Html To Pdf Converter for .NET

PdfDocumentSecurity.CanAssembleDocument Property
Allows inserting, rotating or deleting pages or bookmarks.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool CanAssembleDocument { get; set; }
VB
Public Property CanAssembleDocument As Boolean
Get
Set
Property Value
Type: Boolean

See Also
PdfDocumentSecurity Class
SelectPdf Namespace

429

SelectPdf Html To Pdf Converter for .NET

PdfDocumentSecurity.CanCopyContent Property
Allows copying page contents such as text and images.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool CanCopyContent { get; set; }
VB
Public Property CanCopyContent As Boolean
Get
Set
Property Value
Type: Boolean

See Also
PdfDocumentSecurity Class
SelectPdf Namespace

430

SelectPdf Html To Pdf Converter for .NET

PdfDocumentSecurity.CanEditAnnotations Property
Allows document annotations editing.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool CanEditAnnotations { get; set; }
VB
Public Property CanEditAnnotations As Boolean
Get
Set
Property Value
Type: Boolean

See Also
PdfDocumentSecurity Class
SelectPdf Namespace

431

SelectPdf Html To Pdf Converter for .NET

PdfDocumentSecurity.CanEditContent Property
Allows modifying document content.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool CanEditContent { get; set; }
VB
Public Property CanEditContent As Boolean
Get
Set
Property Value
Type: Boolean

See Also
PdfDocumentSecurity Class
SelectPdf Namespace

432

SelectPdf Html To Pdf Converter for .NET

PdfDocumentSecurity.CanFillFormFields Property
Allows filling in form fields.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool CanFillFormFields { get; set; }
VB
Public Property CanFillFormFields As Boolean
Get
Set
Property Value
Type: Boolean

See Also
PdfDocumentSecurity Class
SelectPdf Namespace

433

SelectPdf Html To Pdf Converter for .NET

PdfDocumentSecurity.CanPrint Property
Allows printing.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool CanPrint { get; set; }
VB
Public Property CanPrint As Boolean
Get
Set
Property Value
Type: Boolean

See Also
PdfDocumentSecurity Class
SelectPdf Namespace

434

SelectPdf Html To Pdf Converter for .NET

PdfDocumentSecurity.OwnerPassword Property
Sets or gets the owner password.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string OwnerPassword { get; set; }
VB
Public Property OwnerPassword As String
Get
Set
Property Value
Type: String

Remarks
This password is required to change permissions of the pdf document (like printing
or editing).

See Also
PdfDocumentSecurity Class
SelectPdf Namespace

435

SelectPdf Html To Pdf Converter for .NET

PdfDocumentSecurity.UserPassword Property
Gets or sets the user password.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string UserPassword { get; set; }
VB
Public Property UserPassword As String
Get
Set
Property Value
Type: String

Remarks
This password is required to open the pdf document.

See Also
PdfDocumentSecurity Class
SelectPdf Namespace

436

SelectPdf Html To Pdf Converter for .NET

PdfEncryptionKeySize Enumeration
The length of the pdf encryption key.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum PdfEncryptionKeySize
VB
Public Enumeration PdfEncryptionKeySize

Members
Member name
EncryptKey128Bi
t
EncryptKey40Bit

Value
2

Description
128 bit length.

40 bit length.

See Also
SelectPdf Namespace

437

SelectPdf Html To Pdf Converter for .NET

PdfFont Class
Represents a font in a pdf document.

Inheritance Hierarchy
System.Object SelectPdf.PdfFont
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class PdfFont
VB
Public Class PdfFont
The PdfFont type exposes the following members.

Methods
Name
Clone

GetCharWidth

GetSystemFont

GetTextSize
GetTextWidth

Description
Creates a clone of this
font in the specified pdf
document.
Gets the width of the
specified character in
points.
Converts the current pdf
font to a corresponding
system font.
Gets the size of the
specified string in points.
Get the width in points of
the specified string.

Properties
Name
FontBaseFamily
FontFamily
Height
IsStrikeout
IsUnderline
Size

Description
Gets the predefined
family name.
Gets the name of the font
family.
Gets the font height.
A flag to indicate if the
font is strikeout.
A flag to indicate if the
font is underline.
Gets or sets the font size

438

SelectPdf Html To Pdf Converter for .NET


in points.

See Also
SelectPdf Namespace

439

SelectPdf Html To Pdf Converter for .NET

PdfFont.PdfFont Methods
The PdfFont type exposes the following members.

Methods
Name
Clone

GetCharWidth

GetSystemFont

GetTextSize
GetTextWidth

Description
Creates a clone of this
font in the specified pdf
document.
Gets the width of the
specified character in
points.
Converts the current pdf
font to a corresponding
system font.
Gets the size of the
specified string in points.
Get the width in points of
the specified string.

See Also
PdfFont Class
SelectPdf Namespace

440

SelectPdf Html To Pdf Converter for .NET

PdfFont.Clone Method
Creates a clone of this font in the specified pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfFont Clone(
PdfDocument document
)
VB
Public Function Clone (
document As PdfDocument
) As PdfFont
Parameters
document
Type: SelectPdf.PdfDocument
The pdf document where the font is cloned.
Return Value
Type: PdfFontThe font object clone.

See Also
PdfFont Class
SelectPdf Namespace

441

SelectPdf Html To Pdf Converter for .NET

PdfFont.GetCharWidth Method
Gets the width of the specified character in points.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float GetCharWidth(
char c
)
VB
Public Function GetCharWidth (
c As Char
) As Single
Parameters
c
Type: System.Char
The character to be measured.
Return Value
Type: SingleThe character width in points.

See Also
PdfFont Class
SelectPdf Namespace

442

SelectPdf Html To Pdf Converter for .NET

PdfFont.GetSystemFont Method
Converts the current pdf font to a corresponding system font.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public Font GetSystemFont()
VB
Public Function GetSystemFont As Font
Return Value
Type: FontA system font corresponding to the current pdf font object.

See Also
PdfFont Class
SelectPdf Namespace

443

SelectPdf Html To Pdf Converter for .NET

PdfFont.GetTextSize Method
Gets the size of the specified string in points.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public SizeF GetTextSize(
string text
)
VB
Public Function GetTextSize (
text As String
) As SizeF
Parameters
text
Type: System.String
The string to be measured.
Return Value
Type: SizeFThe size of the string in points.

See Also
PdfFont Class
SelectPdf Namespace

444

SelectPdf Html To Pdf Converter for .NET

PdfFont.GetTextWidth Method
Get the width in points of the specified string.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float GetTextWidth(
string text
)
VB
Public Function GetTextWidth (
text As String
) As Single
Parameters
text
Type: System.String
The string to be measured.
Return Value
Type: SingleThe width of the string in points.

See Also
PdfFont Class
SelectPdf Namespace

445

SelectPdf Html To Pdf Converter for .NET

PdfFont.PdfFont Properties
The PdfFont type exposes the following members.

Properties
Name
FontBaseFamily
FontFamily
Height
IsStrikeout
IsUnderline
Size

Description
Gets the predefined
family name.
Gets the name of the font
family.
Gets the font height.
A flag to indicate if the
font is strikeout.
A flag to indicate if the
font is underline.
Gets or sets the font size
in points.

See Also
PdfFont Class
SelectPdf Namespace

446

SelectPdf Html To Pdf Converter for .NET

PdfFont.FontBaseFamily Property
Gets the predefined family name.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfStandardFont FontBaseFamily { get; }
VB
Public ReadOnly Property FontBaseFamily As PdfStandardFont
Get
Property Value
Type: PdfStandardFont

See Also
PdfFont Class
SelectPdf Namespace

447

SelectPdf Html To Pdf Converter for .NET

PdfFont.FontFamily Property
Gets the name of the font family.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string FontFamily { get; }
VB
Public ReadOnly Property FontFamily As String
Get
Property Value
Type: String

See Also
PdfFont Class
SelectPdf Namespace

448

SelectPdf Html To Pdf Converter for .NET

PdfFont.Height Property
Gets the font height.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Height { get; }
VB
Public ReadOnly Property Height As Single
Get
Property Value
Type: Single

See Also
PdfFont Class
SelectPdf Namespace

449

SelectPdf Html To Pdf Converter for .NET

PdfFont.IsStrikeout Property
A flag to indicate if the font is strikeout.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool IsStrikeout { get; set; }
VB
Public Property IsStrikeout As Boolean
Get
Set
Property Value
Type: Boolean

See Also
PdfFont Class
SelectPdf Namespace

450

SelectPdf Html To Pdf Converter for .NET

PdfFont.IsUnderline Property
A flag to indicate if the font is underline.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool IsUnderline { get; set; }
VB
Public Property IsUnderline As Boolean
Get
Set
Property Value
Type: Boolean

See Also
PdfFont Class
SelectPdf Namespace

451

SelectPdf Html To Pdf Converter for .NET

PdfFont.Size Property
Gets or sets the font size in points.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Size { get; set; }
VB
Public Property Size As Single
Get
Set
Property Value
Type: Single

See Also
PdfFont Class
SelectPdf Namespace

452

SelectPdf Html To Pdf Converter for .NET

PdfFontCollection Class
Represents a collection of fonts in a pdf document.

Inheritance Hierarchy
System.Object SelectPdf.PdfFontCollection
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class PdfFontCollection : IEnumerable
VB
Public Class PdfFontCollection
Implements IEnumerable
The PdfFontCollection type exposes the following members.

Constructors
Name
PdfFontCollection

Description
Creates a font collection
for the specified PDF
document

Name
Add(Font)

Description
Adds a system font to the
pdf fonts collection.
Adds a system font to the
pdf fonts collection. The
font is loaded from the
specified file.
Adds a pdf font to the pdf
fonts collection.
Adds the specified array
of pdf fonts to the pdf
document fonts
collection.
Adds a standard CJK font
to the pdf fonts collection.
Adds a standard font to
the pdf fonts collection.
Adds a system font to the
pdf fonts collection.
Checks if the specified

Methods

Add(String)

Add(PdfFont)
Add(PdfFont[])

Add(PdfStandardCJKFont)
Add(PdfStandardFont)
Add(Font, Boolean)
Contains

453

SelectPdf Html To Pdf Converter for .NET

GetEnumerator
IndexOf

Insert

Remove

font belongs to the fonts


collection.
Gets the collection
enumerator.
Returns the index of the
specified font in the fonts
collection.
Inserts a font to the
specified index in the pdf
fonts collection.
Removes the specified
pdf font from the fonts
collection.

Properties
Name
Item

Description
Gets or sets the font at
the specified zero based
index in the fonts
collection.

See Also
SelectPdf Namespace

454

SelectPdf Html To Pdf Converter for .NET

PdfFontCollection Constructor
Creates a font collection for the specified PDF document
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfFontCollection(
PdfDocument document
)
VB
Public Sub New (
document As PdfDocument
)
Parameters
document
Type: SelectPdf.PdfDocument

See Also
PdfFontCollection Class
SelectPdf Namespace

455

SelectPdf Html To Pdf Converter for .NET

PdfFontCollection.PdfFontCollection Methods
The PdfFontCollection type exposes the following members.

Methods
Name
Add(Font)
Add(String)

Add(PdfFont)
Add(PdfFont[])

Add(PdfStandardCJKFont)
Add(PdfStandardFont)
Add(Font, Boolean)
Contains

GetEnumerator
IndexOf

Insert

Remove

Description
Adds a system font to the
pdf fonts collection.
Adds a system font to the
pdf fonts collection. The
font is loaded from the
specified file.
Adds a pdf font to the pdf
fonts collection.
Adds the specified array
of pdf fonts to the pdf
document fonts
collection.
Adds a standard CJK font
to the pdf fonts collection.
Adds a standard font to
the pdf fonts collection.
Adds a system font to the
pdf fonts collection.
Checks if the specified
font belongs to the fonts
collection.
Gets the collection
enumerator.
Returns the index of the
specified font in the fonts
collection.
Inserts a font to the
specified index in the pdf
fonts collection.
Removes the specified
pdf font from the fonts
collection.

See Also
PdfFontCollection Class
SelectPdf Namespace

456

SelectPdf Html To Pdf Converter for .NET

PdfFontCollection.Add Method
Overload List
Name
Add(Font)
Add(String)

Add(PdfFont)
Add(PdfFont[])

Add(PdfStandardCJKFont)
Add(PdfStandardFont)
Add(Font, Boolean)

Description
Adds a system font to the
pdf fonts collection.
Adds a system font to the
pdf fonts collection. The
font is loaded from the
specified file.
Adds a pdf font to the pdf
fonts collection.
Adds the specified array
of pdf fonts to the pdf
document fonts
collection.
Adds a standard CJK font
to the pdf fonts collection.
Adds a standard font to
the pdf fonts collection.
Adds a system font to the
pdf fonts collection.

See Also
PdfFontCollection Class
SelectPdf Namespace

457

SelectPdf Html To Pdf Converter for .NET

PdfFontCollection.Add Method (Font)


Adds a system font to the pdf fonts collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfFont Add(
Font font
)
VB
Public Function Add (
font As Font
) As PdfFont
Parameters
font
Type: System.Drawing.Font
The system font to be added to the fonts collection.
Return Value
Type: PdfFontThe pdf font added to the fonts collection.

Remarks
If the font was already added, the method returns the existing font. By default the
font is embedded into the pdf document in order to support Unicode texts.

See Also
PdfFontCollection Class
Add Overload
SelectPdf Namespace

458

SelectPdf Html To Pdf Converter for .NET

PdfFontCollection.Add Method (String)


Adds a system font to the pdf fonts collection. The font is loaded from the specified
file.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfFont Add(
string fontFilename
)
VB
Public Function Add (
fontFilename As String
) As PdfFont
Parameters
fontFilename
Type: System.String
Return Value
Type: PdfFontThe pdf font added to the fonts collection.

Remarks
If the font was already added, the method returns the existing pdf font.

See Also
PdfFontCollection Class
Add Overload
SelectPdf Namespace

459

SelectPdf Html To Pdf Converter for .NET

PdfFontCollection.Add Method (PdfFont)


Adds a pdf font to the pdf fonts collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfFont Add(
PdfFont font
)
VB
Public Function Add (
font As PdfFont
) As PdfFont
Parameters
font
Type: SelectPdf.PdfFont
The pdf font object to be add to the collection.
Return Value
Type: PdfFontThe pdf font added to the fonts collection.

Remarks
If the font was already added, the method returns the existing pdf font.

See Also
PdfFontCollection Class
Add Overload
SelectPdf Namespace

460

SelectPdf Html To Pdf Converter for .NET

PdfFontCollection.Add Method (PdfFont[])


Adds the specified array of pdf fonts to the pdf document fonts collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void Add(
PdfFont[] fonts
)
VB
Public Sub Add (
fonts As PdfFont()
)
Parameters
fonts
Type: SelectPdf.PdfFont[]
The pdf fonts to be added to the collection.

See Also
PdfFontCollection Class
Add Overload
SelectPdf Namespace

461

SelectPdf Html To Pdf Converter for .NET

PdfFontCollection.Add Method (PdfStandardCJKFont)


Adds a standard CJK font to the pdf fonts collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfFont Add(
PdfStandardCJKFont stdCJKFont
)
VB
Public Function Add (
stdCJKFont As PdfStandardCJKFont
) As PdfFont
Parameters
stdCJKFont
Type: SelectPdf.PdfStandardCJKFont
The standard CJK font to add to the pdf document fonts collection.
Return Value
Type: PdfFontThe pdf font added to the fonts collection.

Remarks
If the font was already added, the method returns the existing pdf font.

See Also
PdfFontCollection Class
Add Overload
SelectPdf Namespace

462

SelectPdf Html To Pdf Converter for .NET

PdfFontCollection.Add Method (PdfStandardFont)


Adds a standard font to the pdf fonts collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfFont Add(
PdfStandardFont stdFont
)
VB
Public Function Add (
stdFont As PdfStandardFont
) As PdfFont
Parameters
stdFont
Type: SelectPdf.PdfStandardFont
The standard font family.
Return Value
Type: PdfFontThe pdf font added to the fonts collection.

Remarks
If the font was already added, the method returns the existing pdf font.

See Also
PdfFontCollection Class
Add Overload
SelectPdf Namespace

463

SelectPdf Html To Pdf Converter for .NET

PdfFontCollection.Add Method (Font, Boolean)


Adds a system font to the pdf fonts collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfFont Add(
Font font,
bool embedFont
)
VB
Public Function Add (
font As Font,
embedFont As Boolean
) As PdfFont
Parameters
font
Type: System.Drawing.Font
Font for adding.The system font to be added to the fonts collection.
embedFont
Type: System.Boolean
Specifies if the font will be embedded into the pdf document or not.
Return Value
Type: PdfFontThe pdf font added to the fonts collection.

Remarks
If the font was already added, the method returns the existing font. The embedFont
parameter indicates if the added font will be embedded into the pdf document or
not.

See Also
PdfFontCollection Class
Add Overload
SelectPdf Namespace

464

SelectPdf Html To Pdf Converter for .NET

PdfFontCollection.Contains Method
Checks if the specified font belongs to the fonts collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool Contains(
PdfFont font
)
VB
Public Function Contains (
font As PdfFont
) As Boolean
Parameters
font
Type: SelectPdf.PdfFont
The specified pdf font.
Return Value
Type: BooleanTrue if the font is found in the collection, otherwise returns false.

See Also
PdfFontCollection Class
SelectPdf Namespace

465

SelectPdf Html To Pdf Converter for .NET

PdfFontCollection.GetEnumerator Method
Gets the collection enumerator.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public IEnumerator GetEnumerator()
VB
Public Function GetEnumerator As IEnumerator
Return Value
Type: IEnumeratorThe collection enumerator.
Implements
IEnumerable.GetEnumerator()

See Also
PdfFontCollection Class
SelectPdf Namespace

466

SelectPdf Html To Pdf Converter for .NET

PdfFontCollection.IndexOf Method
Returns the index of the specified font in the fonts collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int IndexOf(
PdfFont font
)
VB
Public Function IndexOf (
font As PdfFont
) As Integer
Parameters
font
Type: SelectPdf.PdfFont
The font to search in collection.
Return Value
Type: Int32The index of font or -1 if the font does not exist.

See Also
PdfFontCollection Class
SelectPdf Namespace

467

SelectPdf Html To Pdf Converter for .NET

PdfFontCollection.Insert Method
Inserts a font to the specified index in the pdf fonts collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void Insert(
int index,
PdfFont font
)
VB
Public Sub Insert (
index As Integer,
font As PdfFont
)
Parameters
index
Type: System.Int32
Index in collection where to insert the font.
font
Type: SelectPdf.PdfFont
The font to be inserted in the collection.

See Also
PdfFontCollection Class
SelectPdf Namespace

468

SelectPdf Html To Pdf Converter for .NET

PdfFontCollection.Remove Method
Removes the specified pdf font from the fonts collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void Remove(
PdfFont font
)
VB
Public Sub Remove (
font As PdfFont
)
Parameters
font
Type: SelectPdf.PdfFont
The font to be removed from the pdf fonts collection.

See Also
PdfFontCollection Class
SelectPdf Namespace

469

SelectPdf Html To Pdf Converter for .NET

PdfFontCollection.PdfFontCollection Properties
The PdfFontCollection type exposes the following members.

Properties
Name
Item

Description
Gets or sets the font at
the specified zero based
index in the fonts
collection.

See Also
PdfFontCollection Class
SelectPdf Namespace

470

SelectPdf Html To Pdf Converter for .NET

PdfFontCollection.Item Property
Gets or sets the font at the specified zero based index in the fonts collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfFont this[
int index
] { get; }
VB
Public ReadOnly Default Property Item (
index As Integer
) As PdfFont
Get
Parameters
index
Type: System.Int32
The zero based font index in the fonts pages collection.
Return Value
Type: PdfFontThe pdf font at the specified index.

See Also
PdfFontCollection Class
SelectPdf Namespace

471

SelectPdf Html To Pdf Converter for .NET

PdfFontType Enumeration
The list of supported fonts for the header and footer
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum PdfFontType
VB
Public Enumeration PdfFontType

Members
Member name
None
Helvetica
HelveticaBold
HelveticaOblique
HelvetivaBoldOb
lique
Courier
CourierBold
CourierOblique
CourierBoldObliq
ue
TimesRoman
TimesBold
TimesBoldItalic
TimesItalic
Symbol
ZapfDingbats

Value
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14

Description
None
Helvetica
HelveticaBold
HelveticaOblique
HelvetivaBoldObliq
ue
Courier
CourierBold
CourierOblique
CourierBoldObliqu
e
TimesRoman
TimesBold
TimesBoldItalic
TimesItalic
Symbol
ZapfDingbats

See Also
SelectPdf Namespace

472

SelectPdf Html To Pdf Converter for .NET

PdfFooter Class
Handles the properties of the footer of the generated pdf document.

Inheritance Hierarchy
System.Object SelectPdf.PdfFooter
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class PdfFooter
VB
Public Class PdfFooter
The PdfFooter type exposes the following members.

Constructors
Name
PdfFooter

Description

Name
Add

Description
Adds an additional
element to the footer of
the pdf document.

Name
DisplayOnEvenPages

Description
Controls the visibility of
the footer on the even
numbered pages of the
generated pdf document.
Controls the visibility of
the footer on the first
page of the generated pdf
document.
Controls the visibility of
the footer on the odd
numbered pages of the
generated pdf document.
Controls the page number
for the first page being
rendered.
The height of the pdf

Methods

Properties

DisplayOnFirstPage

DisplayOnOddPages

FirstPageNumber

Height

473

SelectPdf Html To Pdf Converter for .NET

TotalPagesOffset

document footer.
Controls the total number
of pages offset in the
generated pdf document.

Remarks
This class encapsulates the options to control the footer in the rendered pdf
document. The HtmlToPdf class contains a reference to an object of this type.

The footer is displayed only if DisplayFooter property of the Options object is true. If
the DisplayFooter property of the Options object is false, the footer will not be
displayed and all the options set here will have no effect.

See Also
SelectPdf Namespace

474

SelectPdf Html To Pdf Converter for .NET

PdfFooter Constructor
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfFooter()
VB
Public Sub New

See Also
PdfFooter Class
SelectPdf Namespace

475

SelectPdf Html To Pdf Converter for .NET

PdfFooter.PdfFooter Methods
The PdfFooter type exposes the following members.

Methods
Name
Add

Description
Adds an additional
element to the footer of
the pdf document.

See Also
PdfFooter Class
SelectPdf Namespace

476

SelectPdf Html To Pdf Converter for .NET

PdfFooter.Add Method
Adds an additional element to the footer of the pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void Add(
PdfSectionElement element
)
VB
Public Sub Add (
element As PdfSectionElement
)
Parameters
element
Type: SelectPdf.PdfSectionElement
The element that will be rendered in the pdf footer.

Remarks
There are 3 section elements that can be added to the footer of the pdf document:
PdfHtmlSection, PdfTextSection and PdfImageSection.

See Also
PdfFooter Class
SelectPdf Namespace

477

SelectPdf Html To Pdf Converter for .NET

PdfFooter.PdfFooter Properties
The PdfFooter type exposes the following members.

Properties
Name
DisplayOnEvenPages

DisplayOnFirstPage

DisplayOnOddPages

FirstPageNumber

Height
TotalPagesOffset

Description
Controls the visibility of
the footer on the even
numbered pages of the
generated pdf document.
Controls the visibility of
the footer on the first
page of the generated pdf
document.
Controls the visibility of
the footer on the odd
numbered pages of the
generated pdf document.
Controls the page number
for the first page being
rendered.
The height of the pdf
document footer.
Controls the total number
of pages offset in the
generated pdf document.

See Also
PdfFooter Class
SelectPdf Namespace

478

SelectPdf Html To Pdf Converter for .NET

PdfFooter.DisplayOnEvenPages Property
Controls the visibility of the footer on the even numbered pages of the generated
pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool DisplayOnEvenPages { get; set; }
VB
Public Property DisplayOnEvenPages As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
By default the footer is displayed on both odd and even numbered pages.

See Also
PdfFooter Class
SelectPdf Namespace

479

SelectPdf Html To Pdf Converter for .NET

PdfFooter.DisplayOnFirstPage Property
Controls the visibility of the footer on the first page of the generated pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool DisplayOnFirstPage { get; set; }
VB
Public Property DisplayOnFirstPage As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
When this property is true the footer will be displayed on the first page of the pdf
document, otherwise it will not be visible. This property has priority over
DisplayOnOddPages. The default value is true.

See Also
PdfFooter Class
SelectPdf Namespace

480

SelectPdf Html To Pdf Converter for .NET

PdfFooter.DisplayOnOddPages Property
Controls the visibility of the footer on the odd numbered pages of the generated pdf
document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool DisplayOnOddPages { get; set; }
VB
Public Property DisplayOnOddPages As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
By default the footer is displayed on both odd and even numbered pages. The
DisplayOnFirstPage property has priority over DisplayOnOddPages.

See Also
PdfFooter Class
SelectPdf Namespace

481

SelectPdf Html To Pdf Converter for .NET

PdfFooter.FirstPageNumber Property
Controls the page number for the first page being rendered.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int FirstPageNumber { get; set; }
VB
Public Property FirstPageNumber As Integer
Get
Set
Property Value
Type: Int32

Remarks
The page number is displayed setting a {page_number} placeholder in the Text
property. By default the page numbers start with 1. This can be changed using the
FirstPageNumber property.

See Also
PdfFooter Class
SelectPdf Namespace

482

SelectPdf Html To Pdf Converter for .NET

PdfFooter.Height Property
The height of the pdf document footer.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Height { get; set; }
VB
Public Property Height As Single
Get
Set
Property Value
Type: Single

Remarks
This height is specified in points. 1 point is 1/72 inch. The default value is 35pt.

See Also
PdfFooter Class
SelectPdf Namespace

483

SelectPdf Html To Pdf Converter for .NET

PdfFooter.TotalPagesOffset Property
Controls the total number of pages offset in the generated pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int TotalPagesOffset { get; set; }
VB
Public Property TotalPagesOffset As Integer
Get
Set
Property Value
Type: Int32

Remarks
The total number of pages is displayed setting a {total_pages} placeholder in the
Text property. The total number of pages can be incremented with a value specified
by the TotalPagesOffset property. This could be useful when the generated pdf will
be merged with other documents.

See Also
PdfFooter Class
SelectPdf Namespace

484

SelectPdf Html To Pdf Converter for .NET

PdfHeader Class
Handles the properties of the header of the generated pdf document.

Inheritance Hierarchy
System.Object SelectPdf.PdfHeader
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class PdfHeader
VB
Public Class PdfHeader
The PdfHeader type exposes the following members.

Constructors
Name
PdfHeader

Description

Name
Add

Description
Adds an additional
element to the header of
the pdf document.

Name
DisplayOnEvenPages

Description
Controls the visibility of
the header on the even
numbered pages of the
generated pdf document.
Controls the visibility of
the header on the first
page of the generated pdf
document.
Controls the visibility of
the header on the odd
numbered pages of the
generated pdf document.
Controls the page number
for the first page being
rendered.
The height of the pdf

Methods

Properties

DisplayOnFirstPage

DisplayOnOddPages

FirstPageNumber

Height

485

SelectPdf Html To Pdf Converter for .NET

TotalPagesOffset

document header.
Controls the total number
of pages offset in the
generated pdf document.

Remarks
This class encapsulates the options to control the header in the rendered pdf
document. The HtmlToPdf class contains a reference to an object of this type.

The header is displayed only if DisplayHeader property of the Options object is true.
If the DisplayHeader property of the Options object is false, the header will not be
displayed and all the options set here will have no effect.

See Also
SelectPdf Namespace

486

SelectPdf Html To Pdf Converter for .NET

PdfHeader Constructor
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfHeader()
VB
Public Sub New

See Also
PdfHeader Class
SelectPdf Namespace

487

SelectPdf Html To Pdf Converter for .NET

PdfHeader.PdfHeader Methods
The PdfHeader type exposes the following members.

Methods
Name
Add

Description
Adds an additional
element to the header of
the pdf document.

See Also
PdfHeader Class
SelectPdf Namespace

488

SelectPdf Html To Pdf Converter for .NET

PdfHeader.Add Method
Adds an additional element to the header of the pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void Add(
PdfSectionElement element
)
VB
Public Sub Add (
element As PdfSectionElement
)
Parameters
element
Type: SelectPdf.PdfSectionElement
The element that will be rendered in the pdf header.

Remarks
There are 3 section elements that can be added to the header of the pdf document:
PdfHtmlSection, PdfTextSection and PdfImageSection.

See Also
PdfHeader Class
SelectPdf Namespace

489

SelectPdf Html To Pdf Converter for .NET

PdfHeader.PdfHeader Properties
The PdfHeader type exposes the following members.

Properties
Name
DisplayOnEvenPages

DisplayOnFirstPage

DisplayOnOddPages

FirstPageNumber

Height
TotalPagesOffset

Description
Controls the visibility of
the header on the even
numbered pages of the
generated pdf document.
Controls the visibility of
the header on the first
page of the generated pdf
document.
Controls the visibility of
the header on the odd
numbered pages of the
generated pdf document.
Controls the page number
for the first page being
rendered.
The height of the pdf
document header.
Controls the total number
of pages offset in the
generated pdf document.

See Also
PdfHeader Class
SelectPdf Namespace

490

SelectPdf Html To Pdf Converter for .NET

PdfHeader.DisplayOnEvenPages Property
Controls the visibility of the header on the even numbered pages of the generated
pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool DisplayOnEvenPages { get; set; }
VB
Public Property DisplayOnEvenPages As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
By default the header is displayed on both odd and even numbered pages.

See Also
PdfHeader Class
SelectPdf Namespace

491

SelectPdf Html To Pdf Converter for .NET

PdfHeader.DisplayOnFirstPage Property
Controls the visibility of the header on the first page of the generated pdf
document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool DisplayOnFirstPage { get; set; }
VB
Public Property DisplayOnFirstPage As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
When this property is true the header will be displayed on the first page of the pdf
document, otherwise it will not be visible. This property has priority over
DisplayOnOddPages. The default value is true.

See Also
PdfHeader Class
SelectPdf Namespace

492

SelectPdf Html To Pdf Converter for .NET

PdfHeader.DisplayOnOddPages Property
Controls the visibility of the header on the odd numbered pages of the generated
pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool DisplayOnOddPages { get; set; }
VB
Public Property DisplayOnOddPages As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
By default the header is displayed on both odd and even numbered pages. The
DisplayOnFirstPage property has priority over DisplayOnOddPages.

See Also
PdfHeader Class
SelectPdf Namespace

493

SelectPdf Html To Pdf Converter for .NET

PdfHeader.FirstPageNumber Property
Controls the page number for the first page being rendered.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int FirstPageNumber { get; set; }
VB
Public Property FirstPageNumber As Integer
Get
Set
Property Value
Type: Int32

Remarks
The page number is displayed setting a {page_number} placeholder in the Text
property. By default the page numbers start with 1. This can be changed using the
FirstPageNumber property.

See Also
PdfHeader Class
SelectPdf Namespace

494

SelectPdf Html To Pdf Converter for .NET

PdfHeader.Height Property
The height of the pdf document header.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Height { get; set; }
VB
Public Property Height As Single
Get
Set
Property Value
Type: Single

Remarks
This height is specified in points. 1 point is 1/72 inch. The default value is 45pt.

See Also
PdfHeader Class
SelectPdf Namespace

495

SelectPdf Html To Pdf Converter for .NET

PdfHeader.TotalPagesOffset Property
Controls the total number of pages offset in the generated pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int TotalPagesOffset { get; set; }
VB
Public Property TotalPagesOffset As Integer
Get
Set
Property Value
Type: Int32

Remarks
The total number of pages is displayed setting a {total_pages} placeholder in the
Text property. The total number of pages can be incremented with a value specified
by the TotalPagesOffset property. This could be useful when the generated pdf will
be merged with other documents.

See Also
PdfHeader Class
SelectPdf Namespace

496

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection Class
Represents a html element that can be added to the header or footer templates of a
pdf document.

Inheritance Hierarchy
System.Object SelectPdf.PdfSectionElement

SelectPdf.PdfHtmlSection

Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)


Version: 1.0

Syntax
C#
public class PdfHtmlSection : PdfSectionElement
VB
Public Class PdfHtmlSection
Inherits PdfSectionElement
The PdfHtmlSection type exposes the following members.

Constructors
Name
PdfHtmlSection(String)

PdfHtmlSection(String,
String)

PdfHtmlSection(Single,
Single, String)

PdfHtmlSection(Single,
Single, Single, String)

PdfHtmlSection(Single,
Single, String, String)

Description
Creates a html object
can be added to the
header or footer
templates of a pdf
document.
Creates a html object
can be added to the
header or footer
templates of a pdf
document.
Creates a html object
can be added to the
header or footer
templates of a pdf
document.
Creates a html object
can be added to the
header or footer
templates of a pdf
document.
Creates a html object
can be added to the
header or footer
templates of a pdf
document.

that

that

that

that

that

497

SelectPdf Html To Pdf Converter for .NET


PdfHtmlSection(Single,
Single, Single, String,
String)

Creates a html object that


can be added to the
header or footer
templates of a pdf
document.

Name
Authentication

Description
Handles authentication
options if the web page
being converted requires
authentication.
Specifies the vertical auto
fit mode.
Specifies the horizontal
auto fit mode.
Indicates what css styles
are used when the web
page is rendered.
Gets or sets a flag
indicating if the web page
background is rendered in
pdf.
Instructs the converter to
embed all the needed
fonts into the pdf
document or not.
Controls the rendering of
external hyperlinks in pdf.
Gets the collection of
custom HTTP cookies
used for the conversion.
Get the collection of
custom HTTP headers
used for the conversion.
Controls the conversion of
internal html links to
internal pdf links.
Enable scripts when
rendering the url or html
string.
This property instructs
the converter whether to
try to avoid cutting off
the images between pdf
pages or not.

Properties

AutoFitHeight
AutoFitWidth
CssMediaType

DrawBackground

EmbedFonts

ExternalLinksEnabled
HttpCookies

HttpHeaders

InternalLinksEnabled

JavaScriptEnabled

KeepImagesTogether

498

SelectPdf Html To Pdf Converter for .NET


KeepTextsTogether

MaxPageLoadTime
MinPageLoadTime

PluginsEnabled

ProxyOptions

StartupMode

StartupScript

VisibleWebElementId

WebPageFixedSize

WebPageHeight

WebPageWidth

This property instructs


the converter whether to
try to avoid cutting off
the text lines between pdf
pages or not.
The web page navigation
timeout in seconds.
An additional time in
seconds to wait for
asynchronous items to be
loaded before the web
page is rendered.
A flag indicating if plugins
(like Flash players) are
enabled in the converter.
Gets a reference to an
object containing the
proxy settings used to
access the web page that
is being converted.
Use this property to
specify how the
conversion starts.
Use this property to
specify some JavaScript
code that will be injected
into the page that is
converted.
Use this property to
convert only a certain
section of the page,
specified by the html
element ID.
Controls whether the web
page is rendered with a
fixed size internal browser
or the size automatically
extends to make the
whole content visible.
Gets or sets the height of
the converted web page
as it would appear in the
internal browser used to
render the html.
Gets or sets the width of
the converted web page
as it would appear in the
499

SelectPdf Html To Pdf Converter for .NET


internal browser used to
render the html.

Remarks
The html can be specified by either an url or a html string.

See Also
SelectPdf Namespace

500

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection Constructor
Overload List
Name
PdfHtmlSection(String)

PdfHtmlSection(String,
String)

PdfHtmlSection(Single,
Single, String)

PdfHtmlSection(Single,
Single, Single, String)

PdfHtmlSection(Single,
Single, String, String)

PdfHtmlSection(Single,
Single, Single, String,
String)

Description
Creates a html object
can be added to the
header or footer
templates of a pdf
document.
Creates a html object
can be added to the
header or footer
templates of a pdf
document.
Creates a html object
can be added to the
header or footer
templates of a pdf
document.
Creates a html object
can be added to the
header or footer
templates of a pdf
document.
Creates a html object
can be added to the
header or footer
templates of a pdf
document.
Creates a html object
can be added to the
header or footer
templates of a pdf
document.

that

that

that

that

that

that

See Also
PdfHtmlSection Class
SelectPdf Namespace

501

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection Constructor (String)


Creates a html object that can be added to the header or footer templates of a pdf
document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfHtmlSection(
string url
)
VB
Public Sub New (
url As String
)
Parameters
url
Type: System.String
The full url of the web page to be converted to pdf. The url can be also the full path
of a html file from the local file system.

Remarks
The html element is specified in this case by an url. The html will be converted and
rendered at the (0,0) location in the pdf header or footer. The width of the element
in pdf is the available width in pdf page and the height is auto determined.
The web page is rendered in an internal browser with the default width of 1024px
and height auto determined. This can be changed using the WebPageWidth and
WebPageHeight properties.

See Also
PdfHtmlSection Class
PdfHtmlSection Overload
SelectPdf Namespace

502

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection Constructor (String, String)


Creates a html object that can be added to the header or footer templates of a pdf
document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfHtmlSection(
string htmlString,
string baseUrl
)
VB
Public Sub New (
htmlString As String,
baseUrl As String
)
Parameters
htmlString
Type: System.String
The html string to be converted to pdf.
baseUrl
Type: System.String
This parameter allows the converter to resolve relative urls. Basically, baseUrl +
relative image/css url = full absolute url.

Remarks
The html element is specified in this case by a html string. The html will be
converted and rendered at the (0,0) location in the pdf header or footer. The width
of the element in pdf is the available width in pdf page and the height is auto
determined.
The web page is rendered in an internal browser with the default width of 1024px
and height auto determined. This can be changed using the WebPageWidth and
WebPageHeight properties.

See Also
PdfHtmlSection Class
PdfHtmlSection Overload
SelectPdf Namespace

503

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection Constructor (Single, Single, String)


Creates a html object that can be added to the header or footer templates of a pdf
document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfHtmlSection(
float x,
float y,
string url
)
VB
Public Sub New (
x As Single,
y As Single,
url As String
)
Parameters
x
Type: System.Single
The position in points on the X axis where the element will be rendered.
y
Type: System.Single
The position in points on the Y axis where the element will be rendered.
url
Type: System.String
The full url of the web page to be converted to pdf. The url can be also the full path
of a html file from the local file system.

Remarks
The html element is specified in this case by an url. The html will be converted and
rendered at the (x,y) location in the pdf header or footer. The width of the element
in pdf is the available width in pdf page and the height is auto determined.
The web page is rendered in an internal browser with the default width of 1024px
and height auto determined. This can be changed using the WebPageWidth and
WebPageHeight properties.

See Also
PdfHtmlSection Class
PdfHtmlSection Overload

504

SelectPdf Html To Pdf Converter for .NET


SelectPdf Namespace

505

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection Constructor (Single, Single, Single, String)


Creates a html object that can be added to the header or footer templates of a pdf
document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfHtmlSection(
float x,
float y,
float width,
string url
)
VB
Public Sub New (
x As Single,
y As Single,
width As Single,
url As String
)
Parameters
x
Type: System.Single
The position in points on the X axis where the element will be rendered.
y
Type: System.Single
The position in points on the Y axis where the element will be rendered.
width
Type: System.Single
The destination width in points for the rendered content.
url
Type: System.String
The full url of the web page to be converted to pdf. The url can be also the full path
of a html file from the local file system.

Remarks
The html element is specified in this case by an url. The html will be converted and
rendered at the (x,y) location in the pdf header or footer. The width of the element
in pdf is specified as parameter and the height is auto determined.

506

SelectPdf Html To Pdf Converter for .NET


The web page is rendered in an internal browser with the default width of 1024px
and height auto determined. This can be changed using the WebPageWidth and
WebPageHeight properties.

See Also
PdfHtmlSection Class
PdfHtmlSection Overload
SelectPdf Namespace

507

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection Constructor (Single, Single, String, String)


Creates a html object that can be added to the header or footer templates of a pdf
document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfHtmlSection(
float x,
float y,
string htmlString,
string baseUrl
)
VB
Public Sub New (
x As Single,
y As Single,
htmlString As String,
baseUrl As String
)
Parameters
x
Type: System.Single
The position in points on the X axis where the element will be rendered.
y
Type: System.Single
The position in points on the Y axis where the element will be rendered.
htmlString
Type: System.String
The html string to be converted to pdf.
baseUrl
Type: System.String
This parameter allows the converter to resolve relative urls. Basically, baseUrl +
relative image/css url = full absolute url.

Remarks
The html element is specified in this case by a html string. The html will be
converted and rendered at the (x,y) location in the pdf header or footer. The width
of the element in pdf is the available width in pdf page and the height is auto
determined.

508

SelectPdf Html To Pdf Converter for .NET


The web page is rendered in an internal browser with the default width of 1024px
and height auto determined. This can be changed using the WebPageWidth and
WebPageHeight properties.

See Also
PdfHtmlSection Class
PdfHtmlSection Overload
SelectPdf Namespace

509

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection Constructor (Single, Single, Single, String,


String)
Creates a html object that can be added to the header or footer templates of a pdf
document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfHtmlSection(
float x,
float y,
float width,
string htmlString,
string baseUrl
)
VB
Public Sub New (
x As Single,
y As Single,
width As Single,
htmlString As String,
baseUrl As String
)
Parameters
x
Type: System.Single
The position in points on the X axis where the element will be rendered.
y
Type: System.Single
The position in points on the Y axis where the element will be rendered.
width
Type: System.Single
The destination width in points for the rendered content.
htmlString
Type: System.String
The html string to be converted to pdf.
baseUrl
Type: System.String

510

SelectPdf Html To Pdf Converter for .NET


This parameter allows the converter to resolve relative urls. Basically, baseUrl +
relative image/css url = full absolute url.

Remarks
The html element is specified in this case by a html string. The html will be
converted and rendered at the (x,y) location in the pdf header or footer. The width
of the element in pdf is specified as parameter and the height is auto determined.
The web page is rendered in an internal browser with the default width of 1024px
and height auto determined. This can be changed using the WebPageWidth and
WebPageHeight properties.

See Also
PdfHtmlSection Class
PdfHtmlSection Overload
SelectPdf Namespace

511

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.PdfHtmlSection Properties
The PdfHtmlSection type exposes the following members.

Properties
Name
Authentication

AutoFitHeight
AutoFitWidth
CssMediaType

DrawBackground

EmbedFonts

ExternalLinksEnabled
HttpCookies

HttpHeaders

InternalLinksEnabled

JavaScriptEnabled

KeepImagesTogether

KeepTextsTogether

Description
Handles authentication
options if the web page
being converted requires
authentication.
Specifies the vertical auto
fit mode.
Specifies the horizontal
auto fit mode.
Indicates what css styles
are used when the web
page is rendered.
Gets or sets a flag
indicating if the web page
background is rendered in
pdf.
Instructs the converter to
embed all the needed
fonts into the pdf
document or not.
Controls the rendering of
external hyperlinks in pdf.
Gets the collection of
custom HTTP cookies
used for the conversion.
Get the collection of
custom HTTP headers
used for the conversion.
Controls the conversion of
internal html links to
internal pdf links.
Enable scripts when
rendering the url or html
string.
This property instructs
the converter whether to
try to avoid cutting off
the images between pdf
pages or not.
This property instructs
the converter whether to
try to avoid cutting off
512

SelectPdf Html To Pdf Converter for .NET

MaxPageLoadTime
MinPageLoadTime

PluginsEnabled

ProxyOptions

StartupMode

StartupScript

VisibleWebElementId

WebPageFixedSize

WebPageHeight

WebPageWidth

the text lines between pdf


pages or not.
The web page navigation
timeout in seconds.
An additional time in
seconds to wait for
asynchronous items to be
loaded before the web
page is rendered.
A flag indicating if plugins
(like Flash players) are
enabled in the converter.
Gets a reference to an
object containing the
proxy settings used to
access the web page that
is being converted.
Use this property to
specify how the
conversion starts.
Use this property to
specify some JavaScript
code that will be injected
into the page that is
converted.
Use this property to
convert only a certain
section of the page,
specified by the html
element ID.
Controls whether the web
page is rendered with a
fixed size internal browser
or the size automatically
extends to make the
whole content visible.
Gets or sets the height of
the converted web page
as it would appear in the
internal browser used to
render the html.
Gets or sets the width of
the converted web page
as it would appear in the
internal browser used to
render the html.

513

SelectPdf Html To Pdf Converter for .NET

See Also
PdfHtmlSection Class
SelectPdf Namespace

514

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.Authentication Property
Handles authentication options if the web page being converted requires
authentication.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfAuthenticationOptions Authentication { get; }
VB
Public ReadOnly Property Authentication As
HtmlToPdfAuthenticationOptions
Get
Property Value
Type: HtmlToPdfAuthenticationOptions

See Also
PdfHtmlSection Class
SelectPdf Namespace

515

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.AutoFitHeight Property
Specifies the vertical auto fit mode.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfPageFitMode AutoFitHeight { get; set; }
VB
Public Property AutoFitHeight As HtmlToPdfPageFitMode
Get
Set
Property Value
Type: HtmlToPdfPageFitMode

Remarks
The converter considers both AutoFitWidth and AutoFitHeight when the html
content is rendered in the pdf page or specified rectangle.

If this property is set to NoAdjustment, the html content is not resized vertically in
any way to fit the available space. If the content is larger, it will be cut and not all of
it will be displayed in the generated pdf file.

If this property is set to ShrinkOnly, the html content is resized only if the content
height is larger than the destination space (pdf page or rectangle) height. In this
case, the content is shrunk to fit the destination space height and the elements that
it contains (texts, images) will appear smaller in the generated pdf document than
in the original web page. If the original content height is smaller than the
destination height, no adjustments will be done and the content will be rendered
exactly as it is, even though some additional white space might appear at the
bottom.

If this property is set to AutoFit, the converter will treat it like ShrinkOnly.
The default value of this property is NoAdjustment and for rendering, the converter
will only take AutoFitWidth into consideration.

See Also
PdfHtmlSection Class

516

SelectPdf Html To Pdf Converter for .NET


SelectPdf Namespace

517

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.AutoFitWidth Property
Specifies the horizontal auto fit mode.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfPageFitMode AutoFitWidth { get; set; }
VB
Public Property AutoFitWidth As HtmlToPdfPageFitMode
Get
Set
Property Value
Type: HtmlToPdfPageFitMode

Remarks
The converter considers both AutoFitWidth and AutoFitHeight when the html
content is rendered in the pdf page or specified rectangle.

If this property is set to NoAdjustment, the html content is not resized horizontally
in any way to fit the available space. If the content is larger, it will be cut and not all
of it will be displayed in the generated pdf file.

If this property is set to ShrinkOnly, the html content is resized only if the content
width is larger than the destination space (pdf page or rectangle) width. In this case,
the content is shrunk to fit the destination space width and the elements that it
contains (texts, images) will appear smaller in the generated pdf document than in
the original web page. If the original content width is smaller than the destination
width, no adjustments will be done and the content will be rendered exactly as it is,
even though some additional white space might appear to its right.

If this property is set to AutoFit, the html content is resized to fit the available width
of the destination space. If the original content width is smaller than the destination
width, the elements rendered (texts, images) will appear larger in the generated pdf
document. If the original content width is larger than the destination width, the
elements rendered (texts, images) will appear smaller in the generated pdf
document.
The default value of this property is ShrinkOnly.
518

SelectPdf Html To Pdf Converter for .NET

See Also
PdfHtmlSection Class
SelectPdf Namespace

519

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.CssMediaType Property
Indicates what css styles are used when the web page is rendered.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfCssMediaType CssMediaType { get; set; }
VB
Public Property CssMediaType As HtmlToPdfCssMediaType
Get
Set
Property Value
Type: HtmlToPdfCssMediaType

Remarks
The default value is Screen and the page is rendered like in a regular web browser.
If the page contains printer specific styles, the property should be set to Print to
have the page rendered using those css styles.

See Also
PdfHtmlSection Class
SelectPdf Namespace

520

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.DrawBackground Property
Gets or sets a flag indicating if the web page background is rendered in pdf.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool DrawBackground { get; set; }
VB
Public Property DrawBackground As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is true and the page background is rendered into
the generated pdf. Even though it might be white, it will still make invisible any pdf
element that was rendered behind it. Setting this property to false can make visible
the existing pdf elements behind this html element.

See Also
PdfHtmlSection Class
SelectPdf Namespace

521

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.EmbedFonts Property
Instructs the converter to embed all the needed fonts into the pdf document or not.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool EmbedFonts { get; set; }
VB
Public Property EmbedFonts As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is false and the fonts are not automatically
embedded.
This property does not control the web fonts (fonts that are downloaded with the
web page). The web fonts are always embedded because they are not installed on
the machine.

See Also
PdfHtmlSection Class
SelectPdf Namespace

522

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.ExternalLinksEnabled Property
Controls the rendering of external hyperlinks in pdf.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool ExternalLinksEnabled { get; set; }
VB
Public Property ExternalLinksEnabled As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is true and in this case all external hyperlinks
from the web page will be rendered in the generated pdf document.
When this property is set to false, external links are ignore and they do not appear
in the generated pdf document.

See Also
PdfHtmlSection Class
SelectPdf Namespace

523

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.HttpCookies Property
Gets the collection of custom HTTP cookies used for the conversion.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public NameValueCollection HttpCookies { get; }
VB
Public ReadOnly Property HttpCookies As NameValueCollection
Get
Property Value
Type: NameValueCollection

Remarks
This property returns a reference to the collection of custom HTTP cookies to be
sent by the converter to the web server when the web page is rendered. A cookie is
defined by a name/value pair that can be added to the collection using the
Add(String, String) method of the HttpCookies property.

See Also
PdfHtmlSection Class
SelectPdf Namespace

524

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.HttpHeaders Property
Get the collection of custom HTTP headers used for the conversion.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public NameValueCollection HttpHeaders { get; }
VB
Public ReadOnly Property HttpHeaders As NameValueCollection
Get
Property Value
Type: NameValueCollection

Remarks
This property returns a reference to the collection of custom HTTP headers to be
sent by the converter to the web server when the web page is rendered. A custom
HTTP header is defined by a name/value pair that can be added to the collection
using the Add(String, String) method of the HttpHeaders property.

See Also
PdfHtmlSection Class
SelectPdf Namespace

525

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.InternalLinksEnabled Property
Controls the conversion of internal html links to internal pdf links.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool InternalLinksEnabled { get; set; }
VB
Public Property InternalLinksEnabled As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is true and in this case all internal hyperlinks
from the web page (links that point within the web page) will be rendered in the
generated pdf document as internal pdf links (clicking one of them will jump within
the pdf document).

See Also
PdfHtmlSection Class
SelectPdf Namespace

526

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.JavaScriptEnabled Property
Enable scripts when rendering the url or html string.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool JavaScriptEnabled { get; set; }
VB
Public Property JavaScriptEnabled As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value of this property is true and the converter will run any javascript
available when the page loads.

Note: If the javascript requires some time to load, MinPageLoadTime property should
be set to delay the conversion with the specified number of seconds and allow the
javascript to run.

See Also
PdfHtmlSection Class
SelectPdf Namespace

527

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.KeepImagesTogether Property
This property instructs the converter whether to try to avoid cutting off the images
between pdf pages or not.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool KeepImagesTogether { get; set; }
VB
Public Property KeepImagesTogether As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value is false and the converter does not try to avoid images cutting
between pdf pages.

See Also
PdfHtmlSection Class
SelectPdf Namespace

528

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.KeepTextsTogether Property
This property instructs the converter whether to try to avoid cutting off the text
lines between pdf pages or not.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool KeepTextsTogether { get; set; }
VB
Public Property KeepTextsTogether As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value is true and the converter tries to avoid text cutting between pdf
pages.

See Also
PdfHtmlSection Class
SelectPdf Namespace

529

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.MaxPageLoadTime Property
The web page navigation timeout in seconds.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int MaxPageLoadTime { get; set; }
VB
Public Property MaxPageLoadTime As Integer
Get
Set
Property Value
Type: Int32

Remarks
Default value is 60 seconds. This value should be increased if large web pages are
loaded.

See Also
PdfHtmlSection Class
SelectPdf Namespace

530

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.MinPageLoadTime Property
An additional time in seconds to wait for asynchronous items to be loaded before
the web page is rendered.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int MinPageLoadTime { get; set; }
VB
Public Property MinPageLoadTime As Integer
Get
Set
Property Value
Type: Int32

Remarks
A delay of this type could be necessary if javascripts are loaded when the page is
rendered or if Flash movies are played.

See Also
PdfHtmlSection Class
SelectPdf Namespace

531

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.PluginsEnabled Property
A flag indicating if plugins (like Flash players) are enabled in the converter.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool PluginsEnabled { get; set; }
VB
Public Property PluginsEnabled As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is true.

See Also
PdfHtmlSection Class
SelectPdf Namespace

532

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.ProxyOptions Property
Gets a reference to an object containing the proxy settings used to access the web
page that is being converted.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfProxyOptions ProxyOptions { get; }
VB
Public ReadOnly Property ProxyOptions As HtmlToPdfProxyOptions
Get
Property Value
Type: HtmlToPdfProxyOptions

See Also
PdfHtmlSection Class
SelectPdf Namespace

533

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.StartupMode Property
Use this property to specify how the conversion starts.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public HtmlToPdfStartupMode StartupMode { get; set; }
VB
Public Property StartupMode As HtmlToPdfStartupMode
Get
Set
Property Value
Type: HtmlToPdfStartupMode

Remarks
By default this is set to Automatic and the conversion is started as soon as the page
loads (and MinPageLoadTime elapses). If set to Manual, the conversion is started
only by a javascript call to SelectPdf.startConversion() from within the web page.

See Also
PdfHtmlSection Class
SelectPdf Namespace

534

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.StartupScript Property
Use this property to specify some JavaScript code that will be injected into the page
that is converted.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string StartupScript { get; set; }
VB
Public Property StartupScript As String
Get
Set
Property Value
Type: String

Remarks
The JavaScript code specified here will run before any other script on the page.

See Also
PdfHtmlSection Class
SelectPdf Namespace

535

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.VisibleWebElementId Property
Use this property to convert only a certain section of the page, specified by the html
element ID.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string VisibleWebElementId { set; }
VB
Public WriteOnly Property VisibleWebElementId As String
Set
Property Value
Type: String

See Also
PdfHtmlSection Class
SelectPdf Namespace

536

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.WebPageFixedSize Property
Controls whether the web page is rendered with a fixed size internal browser or the
size automatically extends to make the whole content visible.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool WebPageFixedSize { get; set; }
VB
Public Property WebPageFixedSize As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value of this property is false.

If the web page does not fit the dimensions specified by the WebPageWidth and
WebPageHeight properties and WebPageFixedSize is set to false, the converter
will try to automatically calculate a larger width and height to be able to display the
whole html content.
If WebPageFixedSize is set to true, this will indicate the converter not to calculate
another width and height, but use width and height specified by WebPageWidth and
WebPageHeight. These dimensions with be used even though the content will not fit
the available space and it will be truncated.
Note: If WebPageFixedSize is set to true, a page height needs to be set using
WebPageHeight, because the default value (0) will make the converter fail (cannot
render a web page with no height).

See Also
PdfHtmlSection Class
SelectPdf Namespace

537

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.WebPageHeight Property
Gets or sets the height of the converted web page as it would appear in the internal
browser used to render the html.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int WebPageHeight { get; set; }
VB
Public Property WebPageHeight As Integer
Get
Set
Property Value
Type: Int32

Remarks
The web page height is specified in pixels and the default value is 0px. This means
that the converter will automatically calculate the page height.
Generally this property does not need to be changed, but there are situations when
the converter cannot calculate correctly the web page height (for example for web
pages with frames) and in that case, WebPageHeight needs to be set, otherwise
no content might appear in the generated pdf.
Note: If the WebPageHeight is set, the content that exceeds this page height is
truncated and will not appear in the generated pdf document. Only using the
default 0 value will allow the whole page content to be rendered all the time in the
generated pdf document.
This property can also be set directly in the constructor of PdfHtmlSection class.

See Also
PdfHtmlSection Class
SelectPdf Namespace

538

SelectPdf Html To Pdf Converter for .NET

PdfHtmlSection.WebPageWidth Property
Gets or sets the width of the converted web page as it would appear in the internal
browser used to render the html.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int WebPageWidth { get; set; }
VB
Public Property WebPageWidth As Integer
Get
Set
Property Value
Type: Int32

Remarks
The web page width is specified in pixels and the default value is 1024px. The page
width is only an indication of the minimum page width recommended for
conversion. If the content does not fit this width, the converter will automatically
resize the internal browser to fit the whole html content. To avoid this, the
WebPageFixedSize property needs to be set to true. When WebPageFixedSize is true,
the web page will be rendered with the specified WebPageWidth and
WebPageHeight even though the content might be truncated.

If WebPageWidth is set to 0, the converter will automatically determine the page


width, finding the width that will fit the html content.
This property can also be set directly in the constructor of PdfHtmlSection class.

See Also
PdfHtmlSection Class
SelectPdf Namespace

539

SelectPdf Html To Pdf Converter for .NET

PdfImageSection Class
Represents an image that can be added to the header or footer templates of a pdf
document.

Inheritance Hierarchy
System.Object SelectPdf.PdfSectionElement

SelectPdf.PdfImageSection

Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)


Version: 1.0

Syntax
C#
public class PdfImageSection : PdfSectionElement
VB
Public Class PdfImageSection
Inherits PdfSectionElement
The PdfImageSection type exposes the following members.

Constructors
Name
PdfImageSection(Single,
Single, Single, Image)

PdfImageSection(Single,
Single, Single, String)

PdfImageSection(Single,
Single, Single, Single,
Image)

PdfImageSection(Single,
Single, Single, Single,
String)

Description
Creates an image object
that can be added to the
header or footer
templates of a pdf
document.
Creates an image object
that can be added to the
header or footer
templates of a pdf
document.
Creates an image object
that can be added to the
header or footer
templates of a pdf
document.
Creates an image object
that can be added to the
header or footer
templates of a pdf
document.

Properties
Name
Height

Description
Gets or sets the image

540

SelectPdf Html To Pdf Converter for .NET

Image
Transparency
Width

X
Y

height in the destination


pdf page.
Gets the underlying
system image object.
Gets or sets the pdf
element transparency.
Gets or sets the image
width in the destination
pdf page.
Gets or sets the image
position on the X axis.
Gets or sets the image
position on the Y axis.

See Also
SelectPdf Namespace

541

SelectPdf Html To Pdf Converter for .NET

PdfImageSection Constructor
Overload List
Name
PdfImageSection(Single,
Single, Single, Image)

PdfImageSection(Single,
Single, Single, String)

PdfImageSection(Single,
Single, Single, Single,
Image)

PdfImageSection(Single,
Single, Single, Single,
String)

Description
Creates an image object
that can be added to the
header or footer
templates of a pdf
document.
Creates an image object
that can be added to the
header or footer
templates of a pdf
document.
Creates an image object
that can be added to the
header or footer
templates of a pdf
document.
Creates an image object
that can be added to the
header or footer
templates of a pdf
document.

See Also
PdfImageSection Class
SelectPdf Namespace

542

SelectPdf Html To Pdf Converter for .NET

PdfImageSection Constructor (Single, Single, Single,


Image)
Creates an image object that can be added to the header or footer templates of a
pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfImageSection(
float x,
float y,
float width,
Image imageObj
)
VB
Public Sub New (
x As Single,
y As Single,
width As Single,
imageObj As Image
)
Parameters
x
Type: System.Single
The X position where this element will be rendered.
y
Type: System.Single
The Y position where this element will be rendered.
width
Type: System.Single
The destination rectangle width.
imageObj
Type: System.Drawing.Image
The system image object.

Remarks
The image object is created from the specified Image object that will be rendered
at the position (x,y) in the pdf header or footer with the specified destination width
and the height auto determined to keep the aspect ratio.

543

SelectPdf Html To Pdf Converter for .NET

See Also
PdfImageSection Class
PdfImageSection Overload
SelectPdf Namespace

544

SelectPdf Html To Pdf Converter for .NET

PdfImageSection Constructor (Single, Single, Single,


String)
Creates an image object that can be added to the header or footer templates of a
pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfImageSection(
float x,
float y,
float width,
string fileName
)
VB
Public Sub New (
x As Single,
y As Single,
width As Single,
fileName As String
)
Parameters
x
Type: System.Single
The X position where this element will be rendered.
y
Type: System.Single
The Y position where this element will be rendered.
width
Type: System.Single
The destination rectangle width.
fileName
Type: System.String
The image file path.

Remarks
The image object is created from the specified file that will be rendered at the
position (x,y) in the pdf header or footer with the specified destination width and
the height auto determined to keep the initial aspect ratio.

545

SelectPdf Html To Pdf Converter for .NET

See Also
PdfImageSection Class
PdfImageSection Overload
SelectPdf Namespace

546

SelectPdf Html To Pdf Converter for .NET

PdfImageSection Constructor (Single, Single, Single,


Single, Image)
Creates an image object that can be added to the header or footer templates of a
pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfImageSection(
float x,
float y,
float width,
float height,
Image imageObj
)
VB
Public Sub New (
x As Single,
y As Single,
width As Single,
height As Single,
imageObj As Image
)
Parameters
x
Type: System.Single
The X position where this element will be rendered.
y
Type: System.Single
The Y position where this element will be rendered.
width
Type: System.Single
The destination rectangle width.
height
Type: System.Single
The destination rectangle height.
imageObj
Type: System.Drawing.Image
The system image object.

547

SelectPdf Html To Pdf Converter for .NET

Remarks
The image object is created from the specified Image object that will be rendered
at the position (x,y) in the pdf header or footer with the specified destination width
and height size.

See Also
PdfImageSection Class
PdfImageSection Overload
SelectPdf Namespace

548

SelectPdf Html To Pdf Converter for .NET

PdfImageSection Constructor (Single, Single, Single,


Single, String)
Creates an image object that can be added to the header or footer templates of a
pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfImageSection(
float x,
float y,
float width,
float height,
string fileName
)
VB
Public Sub New (
x As Single,
y As Single,
width As Single,
height As Single,
fileName As String
)
Parameters
x
Type: System.Single
The X position where this element will be rendered.
y
Type: System.Single
The Y position where this element will be rendered.
width
Type: System.Single
The destination rectangle width.
height
Type: System.Single
The destination rectangle height.
fileName
Type: System.String
The image file path.

549

SelectPdf Html To Pdf Converter for .NET

Remarks
The image object is created from the specified file that will be rendered at the
position (x,y) in the pdf header or footer with the specified destination width and
height size.

See Also
PdfImageSection Class
PdfImageSection Overload
SelectPdf Namespace

550

SelectPdf Html To Pdf Converter for .NET

PdfImageSection.PdfImageSection Properties
The PdfImageSection type exposes the following members.

Properties
Name
Height

Image
Transparency
Width

X
Y

Description
Gets or sets the image
height in the destination
pdf page.
Gets the underlying
system image object.
Gets or sets the pdf
element transparency.
Gets or sets the image
width in the destination
pdf page.
Gets or sets the image
position on the X axis.
Gets or sets the image
position on the Y axis.

See Also
PdfImageSection Class
SelectPdf Namespace

551

SelectPdf Html To Pdf Converter for .NET

PdfImageSection.Height Property
Gets or sets the image height in the destination pdf page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Height { get; set; }
VB
Public Property Height As Single
Get
Set
Property Value
Type: Single

See Also
PdfImageSection Class
SelectPdf Namespace

552

SelectPdf Html To Pdf Converter for .NET

PdfImageSection.Image Property
Gets the underlying system image object.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public Image Image { get; }
VB
Public ReadOnly Property Image As Image
Get
Property Value
Type: Image

See Also
PdfImageSection Class
SelectPdf Namespace

553

SelectPdf Html To Pdf Converter for .NET

PdfImageSection.Transparency Property
Gets or sets the pdf element transparency.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int Transparency { get; set; }
VB
Public Property Transparency As Integer
Get
Set
Property Value
Type: Int32

Remarks
The transparency is expressed as a value between 0 and 100.

The value 0 means completely transparent and 100 means completely opaque.

See Also
PdfImageSection Class
SelectPdf Namespace

554

SelectPdf Html To Pdf Converter for .NET

PdfImageSection.Width Property
Gets or sets the image width in the destination pdf page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Width { get; set; }
VB
Public Property Width As Single
Get
Set
Property Value
Type: Single

See Also
PdfImageSection Class
SelectPdf Namespace

555

SelectPdf Html To Pdf Converter for .NET

PdfImageSection.X Property
Gets or sets the image position on the X axis.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float X { get; set; }
VB
Public Property X As Single
Get
Set
Property Value
Type: Single

See Also
PdfImageSection Class
SelectPdf Namespace

556

SelectPdf Html To Pdf Converter for .NET

PdfImageSection.Y Property
Gets or sets the image position on the Y axis.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Y { get; set; }
VB
Public Property Y As Single
Get
Set
Property Value
Type: Single

See Also
PdfImageSection Class
SelectPdf Namespace

557

SelectPdf Html To Pdf Converter for .NET

PdfMargins Class
Represents the settings for a pdf page margins.

Inheritance Hierarchy
System.Object SelectPdf.PdfMargins
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class PdfMargins
VB
Public Class PdfMargins
The PdfMargins type exposes the following members.

Constructors
Name
PdfMargins()
PdfMargins(Single)
PdfMargins(Single, Single,
Single, Single)

Description
Initializes all margins with
0
Initializes all margins with
the same value
Default constructor
initializes with 0 all the
margins

Properties
Name
Empty

Description
Empty margins object

See Also
SelectPdf Namespace

558

SelectPdf Html To Pdf Converter for .NET

PdfMargins Constructor
Overload List
Name
PdfMargins()
PdfMargins(Single)
PdfMargins(Single, Single,
Single, Single)

Description
Initializes all margins with
0
Initializes all margins with
the same value
Default constructor
initializes with 0 all the
margins

See Also
PdfMargins Class
SelectPdf Namespace

559

SelectPdf Html To Pdf Converter for .NET

PdfMargins Constructor
Initializes all margins with 0
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfMargins()
VB
Public Sub New

See Also
PdfMargins Class
PdfMargins Overload
SelectPdf Namespace

560

SelectPdf Html To Pdf Converter for .NET

PdfMargins Constructor (Single)


Initializes all margins with the same value
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfMargins(
float all
)
VB
Public Sub New (
all As Single
)
Parameters
all
Type: System.Single
The value for all document margins.

See Also
PdfMargins Class
PdfMargins Overload
SelectPdf Namespace

561

SelectPdf Html To Pdf Converter for .NET

PdfMargins Constructor (Single, Single, Single, Single)


Default constructor initializes with 0 all the margins
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfMargins(
float left,
float right,
float top,
float bottom
)
VB
Public Sub New (
left As Single,
right As Single,
top As Single,
bottom As Single
)
Parameters
left
Type: System.Single
The left margin
right
Type: System.Single
The right margin
top
Type: System.Single
The top margin
bottom
Type: System.Single
The bottom margin

See Also
PdfMargins Class
PdfMargins Overload
SelectPdf Namespace

562

SelectPdf Html To Pdf Converter for .NET

PdfMargins.PdfMargins Properties
The PdfMargins type exposes the following members.

Properties
Name
Empty

Description
Empty margins object

See Also
PdfMargins Class
SelectPdf Namespace

563

SelectPdf Html To Pdf Converter for .NET

PdfMargins.Empty Property
Empty margins object
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public static PdfMargins Empty { get; }
VB
Public Shared ReadOnly Property Empty As PdfMargins
Get
Property Value
Type: PdfMargins

See Also
PdfMargins Class
SelectPdf Namespace

564

SelectPdf Html To Pdf Converter for .NET

PdfPage Class
Represents a page in a pdf document.

Inheritance Hierarchy
System.Object SelectPdf.PdfCanvas

SelectPdf.PdfPage

Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)


Version: 1.0

Syntax
C#
public class PdfPage : PdfCanvas
VB
Public Class PdfPage
Inherits PdfCanvas
The PdfPage type exposes the following members.

Methods
Name
Add

MeasureString

Description
Adds the specified pdf
element to the current
page. (Overrides
PdfCanvas.Add(PdfPageEl
ement).)
Measures the size of the
specified string when
rendered with the
specified font. (Inherited
from PdfCanvas.)

Properties
Name
ClientRectangle

CustomFooter

CustomHeader

Description
Gets the drawable area of
the canvas. The margins,
pdf document header and
footer are excluded.
(Inherited from
PdfCanvas.)
Represents the custom
footer template for the
pdf page.
Represents the custom
header template for the
pdf page.

565

SelectPdf Html To Pdf Converter for .NET


DisplayFooter

DisplayHeader

Document
Margins
Orientation
PageIndex

PageSize
Rotation

Controls if a custom
footer is displayed in the
current pdf page.
Controls if a custom
header is displayed in the
current pdf page.
The parent pdf document
of the current page.
Gets the pdf page
margins.
Pdf page orientation.
The index of the current
page in the pdf pages
collection.
Gets the pdf page size in
points.
Pdf page rotation.

See Also
SelectPdf Namespace

566

SelectPdf Html To Pdf Converter for .NET

PdfPage.PdfPage Methods
The PdfPage type exposes the following members.

Methods
Name
Add

MeasureString

Description
Adds the specified pdf
element to the current
page. (Overrides
PdfCanvas.Add(PdfPageEl
ement).)
Measures the size of the
specified string when
rendered with the
specified font. (Inherited
from PdfCanvas.)

See Also
PdfPage Class
SelectPdf Namespace

567

SelectPdf Html To Pdf Converter for .NET

PdfPage.Add Method
Adds the specified pdf element to the current page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public override PdfRenderingResult Add(
PdfPageElement element
)
VB
Public Overrides Function Add (
element As PdfPageElement
) As PdfRenderingResult
Parameters
element
Type: SelectPdf.PdfPageElement
The element to be added to the current pdf page.
Return Value
Type: PdfRenderingResultThe result of adding the element to the page.

See Also
PdfPage Class
SelectPdf Namespace

568

SelectPdf Html To Pdf Converter for .NET

PdfPage.PdfPage Properties
The PdfPage type exposes the following members.

Properties
Name
ClientRectangle

CustomFooter

CustomHeader

DisplayFooter

DisplayHeader

Document
Margins
Orientation
PageIndex

PageSize
Rotation

Description
Gets the drawable area of
the canvas. The margins,
pdf document header and
footer are excluded.
(Inherited from
PdfCanvas.)
Represents the custom
footer template for the
pdf page.
Represents the custom
header template for the
pdf page.
Controls if a custom
footer is displayed in the
current pdf page.
Controls if a custom
header is displayed in the
current pdf page.
The parent pdf document
of the current page.
Gets the pdf page
margins.
Pdf page orientation.
The index of the current
page in the pdf pages
collection.
Gets the pdf page size in
points.
Pdf page rotation.

See Also
PdfPage Class
SelectPdf Namespace

569

SelectPdf Html To Pdf Converter for .NET

PdfPage.CustomFooter Property
Represents the custom footer template for the pdf page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTemplate CustomFooter { get; set; }
VB
Public Property CustomFooter As PdfTemplate
Get
Set
Property Value
Type: PdfTemplate

Remarks
It will replace the default pdf document footer template specified by Footer.

See Also
PdfPage Class
SelectPdf Namespace

570

SelectPdf Html To Pdf Converter for .NET

PdfPage.CustomHeader Property
Represents the custom header template for the pdf page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTemplate CustomHeader { get; set; }
VB
Public Property CustomHeader As PdfTemplate
Get
Set
Property Value
Type: PdfTemplate

Remarks
It will replace the default pdf document header template specified by Header.

See Also
PdfPage Class
SelectPdf Namespace

571

SelectPdf Html To Pdf Converter for .NET

PdfPage.DisplayFooter Property
Controls if a custom footer is displayed in the current pdf page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool DisplayFooter { get; set; }
VB
Public Property DisplayFooter As Boolean
Get
Set
Property Value
Type: Boolean

See Also
PdfPage Class
SelectPdf Namespace

572

SelectPdf Html To Pdf Converter for .NET

PdfPage.DisplayHeader Property
Controls if a custom header is displayed in the current pdf page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool DisplayHeader { get; set; }
VB
Public Property DisplayHeader As Boolean
Get
Set
Property Value
Type: Boolean

See Also
PdfPage Class
SelectPdf Namespace

573

SelectPdf Html To Pdf Converter for .NET

PdfPage.Document Property
The parent pdf document of the current page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfDocument Document { get; }
VB
Public ReadOnly Property Document As PdfDocument
Get
Property Value
Type: PdfDocument

See Also
PdfPage Class
SelectPdf Namespace

574

SelectPdf Html To Pdf Converter for .NET

PdfPage.Margins Property
Gets the pdf page margins.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfMargins Margins { get; }
VB
Public ReadOnly Property Margins As PdfMargins
Get
Property Value
Type: PdfMargins

See Also
PdfPage Class
SelectPdf Namespace

575

SelectPdf Html To Pdf Converter for .NET

PdfPage.Orientation Property
Pdf page orientation.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfPageOrientation Orientation { get; set; }
VB
Public Property Orientation As PdfPageOrientation
Get
Set
Property Value
Type: PdfPageOrientation

Remarks
The default page orientation is Portrait.

See Also
PdfPage Class
SelectPdf Namespace

576

SelectPdf Html To Pdf Converter for .NET

PdfPage.PageIndex Property
The index of the current page in the pdf pages collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int PageIndex { get; }
VB
Public ReadOnly Property PageIndex As Integer
Get
Property Value
Type: Int32

See Also
PdfPage Class
SelectPdf Namespace

577

SelectPdf Html To Pdf Converter for .NET

PdfPage.PageSize Property
Gets the pdf page size in points.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfCustomPageSize PageSize { get; }
VB
Public ReadOnly Property PageSize As PdfCustomPageSize
Get
Property Value
Type: PdfCustomPageSize

See Also
PdfPage Class
SelectPdf Namespace

578

SelectPdf Html To Pdf Converter for .NET

PdfPage.Rotation Property
Pdf page rotation.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfPageRotation Rotation { get; set; }
VB
Public Property Rotation As PdfPageRotation
Get
Set
Property Value
Type: PdfPageRotation

Remarks
The pdf page can be rotated with 90, 180 or 270 degrees from the original position.

See Also
PdfPage Class
SelectPdf Namespace

579

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection Class
Represents the collection of pages in a pdf document.

Inheritance Hierarchy
System.Object SelectPdf.PdfPageCollection
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class PdfPageCollection : IEnumerable
VB
Public Class PdfPageCollection
Implements IEnumerable
The PdfPageCollection type exposes the following members.

Methods
Name
Add()

Add(PdfMargins)

Add(PdfPage)

Add(PdfPage[])

Add(PdfCustomPageSize,
PdfMargins)

Add(PdfCustomPageSize,
PdfMargins,
PdfPageOrientation)

Description
Creates a new pdf page
and adds it to the pdf
document pages
collection.
Creates a new pdf page
with the specified
margins and adds it to
the pdf document pages
collection.
Adds the specified page
to the pdf document
pages collection.
Adds the specified array
of pages to the pdf
document pages
collection.
Creates a new pdf page
with the specified size
and margins and adds it
to the pdf document
pages collection.
Creates a new pdf page
with the specified size,
margins and orientation
and adds it to the pdf
document pages
580

SelectPdf Html To Pdf Converter for .NET

Contains

GetEnumerator
IndexOf

Insert(Int32, PdfPage)

Insert(Int32,
PdfCustomPageSize,
PdfMargins,
PdfPageOrientation)

Remove

RemoveAt

collection.
Indicates if the collection
contains the specified
page.
Gets the collection
enumerator.
Returns the index of
specified page in
collection.
Inserts the specified page
into the pdf document
pages collection at the
specified index.
Creates a new pdf page
with the specified size,
margins and orientation
and inserts it into the pdf
document pages
collection at the specified
index.
Removes the specified
page from the pdf
document pages
collection.
Removes the pdf page at
the specified index in pdf
document pages
collection.

Properties
Name
Count
Document
Item

Description
The number of pages in
the pdf pages collection.
The parent pdf document
of the pages collection.
Gets or sets the page at
the specified zero based
index in the pages
collection.

Remarks
PdfPageCollection
is a collection of PdfPage objects.

See Also
SelectPdf Namespace
581

SelectPdf Html To Pdf Converter for .NET

582

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection.PdfPageCollection Methods
The PdfPageCollection type exposes the following members.

Methods
Name
Add()

Add(PdfMargins)

Add(PdfPage)

Add(PdfPage[])

Add(PdfCustomPageSize,
PdfMargins)

Add(PdfCustomPageSize,
PdfMargins,
PdfPageOrientation)

Contains

GetEnumerator
IndexOf

Insert(Int32, PdfPage)

Insert(Int32,
PdfCustomPageSize,

Description
Creates a new pdf page
and adds it to the pdf
document pages
collection.
Creates a new pdf page
with the specified
margins and adds it to
the pdf document pages
collection.
Adds the specified page
to the pdf document
pages collection.
Adds the specified array
of pages to the pdf
document pages
collection.
Creates a new pdf page
with the specified size
and margins and adds it
to the pdf document
pages collection.
Creates a new pdf page
with the specified size,
margins and orientation
and adds it to the pdf
document pages
collection.
Indicates if the collection
contains the specified
page.
Gets the collection
enumerator.
Returns the index of
specified page in
collection.
Inserts the specified page
into the pdf document
pages collection at the
specified index.
Creates a new pdf page
with the specified size,
583

SelectPdf Html To Pdf Converter for .NET


PdfMargins,
PdfPageOrientation)

Remove

RemoveAt

margins and orientation


and inserts it into the pdf
document pages
collection at the specified
index.
Removes the specified
page from the pdf
document pages
collection.
Removes the pdf page at
the specified index in pdf
document pages
collection.

See Also
PdfPageCollection Class
SelectPdf Namespace

584

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection.Add Method
Overload List
Name
Add()

Add(PdfMargins)

Add(PdfPage)

Add(PdfPage[])

Add(PdfCustomPageSize,
PdfMargins)

Add(PdfCustomPageSize,
PdfMargins,
PdfPageOrientation)

Description
Creates a new pdf page
and adds it to the pdf
document pages
collection.
Creates a new pdf page
with the specified
margins and adds it to
the pdf document pages
collection.
Adds the specified page
to the pdf document
pages collection.
Adds the specified array
of pages to the pdf
document pages
collection.
Creates a new pdf page
with the specified size
and margins and adds it
to the pdf document
pages collection.
Creates a new pdf page
with the specified size,
margins and orientation
and adds it to the pdf
document pages
collection.

See Also
PdfPageCollection Class
SelectPdf Namespace

585

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection.Add Method
Creates a new pdf page and adds it to the pdf document pages collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfPage Add()
VB
Public Function Add As PdfPage
Return Value
Type: PdfPageThe newly created pdf page.

Remarks
If there is a previous page in the pages collection, the orientation and size are
inherited from that page, otherwise a first page with the default A4 size and Portrait
orientation is created.

The page margins are inherited from the default pdf document margins specified in
Margins property.

See Also
PdfPageCollection Class
Add Overload
SelectPdf Namespace

586

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection.Add Method (PdfMargins)


Creates a new pdf page with the specified margins and adds it to the pdf document
pages collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfPage Add(
PdfMargins pageMargins
)
VB
Public Function Add (
pageMargins As PdfMargins
) As PdfPage
Parameters
pageMargins
Type: SelectPdf.PdfMargins
The pdf page margins.
Return Value
Type: PdfPageThe newly created pdf page.

Remarks
If there is a previous page in the pages collection, the orientation and size are
inherited from that page, otherwise a first page with the default A4 size and Portrait
orientation is created.

See Also
PdfPageCollection Class
Add Overload
SelectPdf Namespace

587

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection.Add Method (PdfPage)


Adds the specified page to the pdf document pages collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int Add(
PdfPage pdfPage
)
VB
Public Function Add (
pdfPage As PdfPage
) As Integer
Parameters
pdfPage
Type: SelectPdf.PdfPage
The page to be added to the collection.
Return Value
Type: Int32The index of the page in collection. If the page already exists, this
method returns the index of the existing page.

Remarks
The specified page can belong to another pdf document.

Important
The source pdf document must remain opened until the current document is
saved.

See Also
PdfPageCollection Class
Add Overload
SelectPdf Namespace

588

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection.Add Method (PdfPage[])


Adds the specified array of pages to the pdf document pages collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void Add(
PdfPage[] pages
)
VB
Public Sub Add (
pages As PdfPage()
)
Parameters
pages
Type: SelectPdf.PdfPage[]
The pdf pages to be added to the collection.

Remarks
The specified pages can belong to another pdf document.

Important
The source pdf document must remain opened until the current document is
saved.

See Also
PdfPageCollection Class
Add Overload
SelectPdf Namespace

589

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection.Add Method (PdfCustomPageSize,


PdfMargins)
Creates a new pdf page with the specified size and margins and adds it to the pdf
document pages collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfPage Add(
PdfCustomPageSize pageSize,
PdfMargins pageMargins
)
VB
Public Function Add (
pageSize As PdfCustomPageSize,
pageMargins As PdfMargins
) As PdfPage
Parameters
pageSize
Type: SelectPdf.PdfCustomPageSize
The pdf page size.
pageMargins
Type: SelectPdf.PdfMargins
The pdf page margins.
Return Value
Type: PdfPageThe newly created pdf page.

Remarks
If there is a previous page in the pages collection, the orientation is inherited from
that page, otherwise a first page with the default Portrait orientation is created.

See Also
PdfPageCollection Class
Add Overload
SelectPdf Namespace

590

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection.Add Method (PdfCustomPageSize,


PdfMargins, PdfPageOrientation)
Creates a new pdf page with the specified size, margins and orientation and adds it
to the pdf document pages collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfPage Add(
PdfCustomPageSize pageSize,
PdfMargins pageMargins,
PdfPageOrientation pageOrientation
)
VB
Public Function Add (
pageSize As PdfCustomPageSize,
pageMargins As PdfMargins,
pageOrientation As PdfPageOrientation
) As PdfPage
Parameters
pageSize
Type: SelectPdf.PdfCustomPageSize
The pdf page size.
pageMargins
Type: SelectPdf.PdfMargins
The pdf page margins.
pageOrientation
Type: SelectPdf.PdfPageOrientation
The pdf page orientation.
Return Value
Type: PdfPageThe newly created pdf page.

See Also
PdfPageCollection Class
Add Overload
SelectPdf Namespace

591

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection.Contains Method
Indicates if the collection contains the specified page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool Contains(
PdfPage pdfPage
)
VB
Public Function Contains (
pdfPage As PdfPage
) As Boolean
Parameters
pdfPage
Type: SelectPdf.PdfPage
The specified pdf page.
Return Value
Type: BooleanTrue if the collection contains the specified page.

See Also
PdfPageCollection Class
SelectPdf Namespace

592

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection.GetEnumerator Method
Gets the collection enumerator.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public IEnumerator GetEnumerator()
VB
Public Function GetEnumerator As IEnumerator
Return Value
Type: IEnumeratorThe collection enumerator.
Implements
IEnumerable.GetEnumerator()

See Also
PdfPageCollection Class
SelectPdf Namespace

593

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection.IndexOf Method
Returns the index of specified page in collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int IndexOf(
PdfPage pdfPage
)
VB
Public Function IndexOf (
pdfPage As PdfPage
) As Integer
Parameters
pdfPage
Type: SelectPdf.PdfPage
The specified pdf page.
Return Value
Type: Int32The index of the specified page in collection.

See Also
PdfPageCollection Class
SelectPdf Namespace

594

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection.Insert Method
Overload List
Name
Insert(Int32, PdfPage)

Insert(Int32,
PdfCustomPageSize,
PdfMargins,
PdfPageOrientation)

Description
Inserts the specified page
into the pdf document
pages collection at the
specified index.
Creates a new pdf page
with the specified size,
margins and orientation
and inserts it into the pdf
document pages
collection at the specified
index.

See Also
PdfPageCollection Class
SelectPdf Namespace

595

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection.Insert Method (Int32, PdfPage)


Inserts the specified page into the pdf document pages collection at the specified
index.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void Insert(
int pageIndex,
PdfPage pdfPage
)
VB
Public Sub Insert (
pageIndex As Integer,
pdfPage As PdfPage
)
Parameters
pageIndex
Type: System.Int32
The index where the pdf page will be inserted.
pdfPage
Type: SelectPdf.PdfPage
The pdf page to be inserted into the collection.

Remarks
The specified page can belong to another pdf document.

Note
The source pdf document must remain opened until the current document is
saved.

See Also
PdfPageCollection Class
Insert Overload
SelectPdf Namespace

596

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection.Insert Method (Int32,


PdfCustomPageSize, PdfMargins, PdfPageOrientation)
Creates a new pdf page with the specified size, margins and orientation and inserts
it into the pdf document pages collection at the specified index.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfPage Insert(
int index,
PdfCustomPageSize pageSize,
PdfMargins pageMargins,
PdfPageOrientation pageOrientation
)
VB
Public Function Insert (
index As Integer,
pageSize As PdfCustomPageSize,
pageMargins As PdfMargins,
pageOrientation As PdfPageOrientation
) As PdfPage
Parameters
index
Type: System.Int32
The index where the new pdf page will be inserted.
pageSize
Type: SelectPdf.PdfCustomPageSize
The pdf page size.
pageMargins
Type: SelectPdf.PdfMargins
The pdf page margins.
pageOrientation
Type: SelectPdf.PdfPageOrientation
The pdf page orientation.
Return Value
Type: PdfPageThe newly created pdf page.

See Also
PdfPageCollection Class
Insert Overload
597

SelectPdf Html To Pdf Converter for .NET


SelectPdf Namespace

598

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection.Remove Method
Removes the specified page from the pdf document pages collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void Remove(
PdfPage pdfPage
)
VB
Public Sub Remove (
pdfPage As PdfPage
)
Parameters
pdfPage
Type: SelectPdf.PdfPage
The pdf page to be removed.

See Also
PdfPageCollection Class
SelectPdf Namespace

599

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection.RemoveAt Method
Removes the pdf page at the specified index in pdf document pages collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public void RemoveAt(
int index
)
VB
Public Sub RemoveAt (
index As Integer
)
Parameters
index
Type: System.Int32
The zero based index of the pdf page to be removed.

See Also
PdfPageCollection Class
SelectPdf Namespace

600

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection.PdfPageCollection Properties
The PdfPageCollection type exposes the following members.

Properties
Name
Count
Document
Item

Description
The number of pages in
the pdf pages collection.
The parent pdf document
of the pages collection.
Gets or sets the page at
the specified zero based
index in the pages
collection.

See Also
PdfPageCollection Class
SelectPdf Namespace

601

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection.Count Property
The number of pages in the pdf pages collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int Count { get; }
VB
Public ReadOnly Property Count As Integer
Get
Property Value
Type: Int32

See Also
PdfPageCollection Class
SelectPdf Namespace

602

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection.Document Property
The parent pdf document of the pages collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfDocument Document { get; }
VB
Public ReadOnly Property Document As PdfDocument
Get
Property Value
Type: PdfDocument

See Also
PdfPageCollection Class
SelectPdf Namespace

603

SelectPdf Html To Pdf Converter for .NET

PdfPageCollection.Item Property
Gets or sets the page at the specified zero based index in the pages collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfPage this[
int index
] { get; set; }
VB
Public Default Property Item (
index As Integer
) As PdfPage
Get
Set
Parameters
index
Type: System.Int32
The zero based page index in the pdf pages collection.
Return Value
Type: PdfPageThe pdf page at the specified index.

See Also
PdfPageCollection Class
SelectPdf Namespace

604

SelectPdf Html To Pdf Converter for .NET

PdfPageElement Class
The base class for all graphic elements from a pdf document.

Inheritance Hierarchy
System.Object SelectPdf.PdfPageElement
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public abstract class PdfPageElement
VB
Public MustInherit Class PdfPageElement
The PdfPageElement type exposes the following members.

Constructors
Name
PdfPageElement

Description

See Also
SelectPdf Namespace

605

SelectPdf Html To Pdf Converter for .NET

PdfPageElement Constructor
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
protected PdfPageElement()
VB
Protected Sub New

See Also
PdfPageElement Class
SelectPdf Namespace

606

SelectPdf Html To Pdf Converter for .NET

PdfPageOrientation Enumeration
The list of pdf pages available orientations.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum PdfPageOrientation
VB
Public Enumeration PdfPageOrientation

Members
Member name
Portrait
Landscape

Value
0
1

Description
Portrait
Landscape

See Also
SelectPdf Namespace

607

SelectPdf Html To Pdf Converter for .NET

PdfPageRotation Enumeration
Standard rotation angles for pdf pages.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum PdfPageRotation
VB
Public Enumeration PdfPageRotation

Members
Member name
Rotate_0
Rotate_90

Value
0
90

Rotate_180

180

Rotate_270

270

Description
0 degrees rotation.
90 degrees
rotation.
180 degrees
rotation.
270 degrees
rotation.

See Also
SelectPdf Namespace

608

SelectPdf Html To Pdf Converter for .NET

PdfPageSize Enumeration
The list of pdf standard page sizes.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum PdfPageSize
VB
Public Enumeration PdfPageSize

Members
Member name
Custom

Value
0

Letter
Note
Legal
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
A10
B0
B1
B2
B3
B4
B5
ArchE
ArchD
ArchC
ArchB
ArchA
Flsa
HalfLetter
Letter11x17
Ledger

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

Description
Use specified page
size
Letter format
Note format
Legal format
A0 format
A1 format
A2 format
A3 format
A4 format
A5 format
A6 format
A7 format
A8 format
A9 format
A0 format
B0 format
B1 format
B2 format
B3 format
B4 format
B5 format
ArchE format
ArchD format
ArchC format
ArchB format
ArchA format
Flsa format
HalfLetter format
11x17 format
Ledger format

609

SelectPdf Html To Pdf Converter for .NET

See Also
SelectPdf Namespace

610

SelectPdf Html To Pdf Converter for .NET

PdfRenderingResult Class
The result of adding a pdf element to a pdf page or template.

Inheritance Hierarchy
System.Object SelectPdf.PdfRenderingResult
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class PdfRenderingResult
VB
Public Class PdfRenderingResult
The PdfRenderingResult type exposes the following members.

Properties
Name
PdfPageLastIndex

PdfPageLastRectangle

Description
The index of the pdf page
where the rendering of
the page element ended.
The bounds inside the pdf
page where the rendering
of the page element
ended.

See Also
SelectPdf Namespace

611

SelectPdf Html To Pdf Converter for .NET

PdfRenderingResult.PdfRenderingResult Properties
The PdfRenderingResult type exposes the following members.

Properties
Name
PdfPageLastIndex

PdfPageLastRectangle

Description
The index of the pdf page
where the rendering of
the page element ended.
The bounds inside the pdf
page where the rendering
of the page element
ended.

See Also
PdfRenderingResult Class
SelectPdf Namespace

612

SelectPdf Html To Pdf Converter for .NET

PdfRenderingResult.PdfPageLastIndex Property
The index of the pdf page where the rendering of the page element ended.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int PdfPageLastIndex { get; set; }
VB
Public Property PdfPageLastIndex As Integer
Get
Set
Property Value
Type: Int32

Remarks
This information is useful when other pdf elements are added to the PdfDocument
object.

See Also
PdfRenderingResult Class
SelectPdf Namespace

613

SelectPdf Html To Pdf Converter for .NET

PdfRenderingResult.PdfPageLastRectangle Property
The bounds inside the pdf page where the rendering of the page element ended.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public RectangleF PdfPageLastRectangle { get; set; }
VB
Public Property PdfPageLastRectangle As RectangleF
Get
Set
Property Value
Type: RectangleF

Remarks
This information is useful when other pdf elements are added to the PdfDocument
object.
Note: The last page is specified by the PdfPageLastIndex property.

See Also
PdfRenderingResult Class
SelectPdf Namespace

614

SelectPdf Html To Pdf Converter for .NET

PdfSectionElement Class
The base class for pdf elements that can be added to header and footer of a pdf
document.

Inheritance Hierarchy
System.Object SelectPdf.PdfSectionElement
PdfImageSection SelectPdf.PdfTextSection

SelectPdf.PdfHtmlSection

SelectPdf.

Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)


Version: 1.0

Syntax
C#
public abstract class PdfSectionElement
VB
Public MustInherit Class PdfSectionElement
The PdfSectionElement type exposes the following members.

Constructors
Name
PdfSectionElement

Description

See Also
SelectPdf Namespace

615

SelectPdf Html To Pdf Converter for .NET

PdfSectionElement Constructor
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
protected PdfSectionElement()
VB
Protected Sub New

See Also
PdfSectionElement Class
SelectPdf Namespace

616

SelectPdf Html To Pdf Converter for .NET

PdfSecurityOptions Class
This class provides the options to control the pdf document security.

Inheritance Hierarchy
System.Object SelectPdf.PdfSecurityOptions
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class PdfSecurityOptions
VB
Public Class PdfSecurityOptions
The PdfSecurityOptions type exposes the following members.

Constructors
Name
PdfSecurityOptions

Description

Name
CanAssembleDocument

Description
Allows inserting, rotating
or deleting pages or
bookmarks.
Allows copying page
contents such as text and
images.
Allows document
annotations editing.
Allows modifying
document content.
Allows filling in form
fields.
Allows printing.
Sets or gets the owner
password.
Gets or sets the user
password.

Properties

CanCopyContent

CanEditAnnotations
CanEditContent
CanFillFormFields
CanPrint
OwnerPassword
UserPassword

Remarks
The HtmlToPdfOptions class defines a reference to an object of this type.

617

SelectPdf Html To Pdf Converter for .NET

See Also
SelectPdf Namespace

618

SelectPdf Html To Pdf Converter for .NET

PdfSecurityOptions Constructor
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfSecurityOptions()
VB
Public Sub New

See Also
PdfSecurityOptions Class
SelectPdf Namespace

619

SelectPdf Html To Pdf Converter for .NET

PdfSecurityOptions.PdfSecurityOptions Properties
The PdfSecurityOptions type exposes the following members.

Properties
Name
CanAssembleDocument

CanCopyContent

CanEditAnnotations
CanEditContent
CanFillFormFields
CanPrint
OwnerPassword
UserPassword

Description
Allows inserting, rotating
or deleting pages or
bookmarks.
Allows copying page
contents such as text and
images.
Allows document
annotations editing.
Allows modifying
document content.
Allows filling in form
fields.
Allows printing.
Sets or gets the owner
password.
Gets or sets the user
password.

See Also
PdfSecurityOptions Class
SelectPdf Namespace

620

SelectPdf Html To Pdf Converter for .NET

PdfSecurityOptions.CanAssembleDocument Property
Allows inserting, rotating or deleting pages or bookmarks.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool CanAssembleDocument { get; set; }
VB
Public Property CanAssembleDocument As Boolean
Get
Set
Property Value
Type: Boolean

See Also
PdfSecurityOptions Class
SelectPdf Namespace

621

SelectPdf Html To Pdf Converter for .NET

PdfSecurityOptions.CanCopyContent Property
Allows copying page contents such as text and images.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool CanCopyContent { get; set; }
VB
Public Property CanCopyContent As Boolean
Get
Set
Property Value
Type: Boolean

See Also
PdfSecurityOptions Class
SelectPdf Namespace

622

SelectPdf Html To Pdf Converter for .NET

PdfSecurityOptions.CanEditAnnotations Property
Allows document annotations editing.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool CanEditAnnotations { get; set; }
VB
Public Property CanEditAnnotations As Boolean
Get
Set
Property Value
Type: Boolean

See Also
PdfSecurityOptions Class
SelectPdf Namespace

623

SelectPdf Html To Pdf Converter for .NET

PdfSecurityOptions.CanEditContent Property
Allows modifying document content.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool CanEditContent { get; set; }
VB
Public Property CanEditContent As Boolean
Get
Set
Property Value
Type: Boolean

See Also
PdfSecurityOptions Class
SelectPdf Namespace

624

SelectPdf Html To Pdf Converter for .NET

PdfSecurityOptions.CanFillFormFields Property
Allows filling in form fields.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool CanFillFormFields { get; set; }
VB
Public Property CanFillFormFields As Boolean
Get
Set
Property Value
Type: Boolean

See Also
PdfSecurityOptions Class
SelectPdf Namespace

625

SelectPdf Html To Pdf Converter for .NET

PdfSecurityOptions.CanPrint Property
Allows printing.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool CanPrint { get; set; }
VB
Public Property CanPrint As Boolean
Get
Set
Property Value
Type: Boolean

See Also
PdfSecurityOptions Class
SelectPdf Namespace

626

SelectPdf Html To Pdf Converter for .NET

PdfSecurityOptions.OwnerPassword Property
Sets or gets the owner password.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string OwnerPassword { get; set; }
VB
Public Property OwnerPassword As String
Get
Set
Property Value
Type: String

Remarks
This password is required to change permissions of the pdf document (like printing
or editing).

See Also
PdfSecurityOptions Class
SelectPdf Namespace

627

SelectPdf Html To Pdf Converter for .NET

PdfSecurityOptions.UserPassword Property
Gets or sets the user password.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string UserPassword { get; set; }
VB
Public Property UserPassword As String
Get
Set
Property Value
Type: String

Remarks
This password is required to open the pdf document.

See Also
PdfSecurityOptions Class
SelectPdf Namespace

628

SelectPdf Html To Pdf Converter for .NET

PdfStandard Enumeration
The list of pdf standards available.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum PdfStandard
VB
Public Enumeration PdfStandard

Members
Member name
Full

Value
0

PdfA

PdfX

PdfSiqQLevelA

PdfSiqQLevelB

Description
The full pdf
features can be
used in the
generated pdf
document.
The generated pdf
is in conformance
with PDF/A
standard which
makes the
document suitable
for long term
archiving.
The generated PDF
is in conformance
with PDF/X
standard which
makes the
document suitable
for graphics
exchange.
The generated PDF
is in conformance
with PDF/SiqQ
Level A standard
which makes the
document suitable
for being digitally
signed.
The generated PDF
is in conformance

629

SelectPdf Html To Pdf Converter for .NET


with PDF/SiqQ
Level B standard
which makes the
document suitable
for being digitally
signed.

See Also
SelectPdf Namespace

630

SelectPdf Html To Pdf Converter for .NET

PdfStandardCJKFont Enumeration
The Korean-Japanesse-Chinese (CJK) predefined fonts.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum PdfStandardCJKFont
VB
Public Enumeration PdfStandardCJKFont

Members
Member name
HeiseiKakuGothi
cW5
HeiseiMinchoW3

Value
0

HanyangSystem
sGothicMedium

HanyangSystem
sShinMyeongJoM
edium

MonotypeHeiMe
dium

MonotypeSungLi
ght

SinoTypeSongLig
ht

Description
Heisei Kaku Gothic
W5 Japanese font.
Heisei Mincho W3
Japanese font.
Hanyang Systems
Gothic Medium
Korean font.
Hanyang Systems
Shin MyeongJo
Medium Korean
font.
Monotype Hei
Medium Chinese
traditional font.
Monotype Sung
Light Chinese
traditional font.
SinoType Song
Light Chinese
simplified font.

See Also
SelectPdf Namespace

631

SelectPdf Html To Pdf Converter for .NET

PdfStandardFont Enumeration
Standard PDF font families.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum PdfStandardFont
VB
Public Enumeration PdfStandardFont

Members
Member name
Custom
Helvetica
HelveticaBold
HelveticaOblique
HelveticaBoldOb
lique
Courier
CourierBold
CourierOblique
CourierBoldObliq
ue
TimesRoman
TimesBold
TimesBoldItalic
TimesItalic
Symbol
ZapfDingbats

Value
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14

Description
Custom font.
Helvetica
Helvetica Bold
Helvetica Oblique
Helvetica Bold
Oblique
Courier
Courier Bold
Courier Oblique
Courier Bold
Oblique
Times Roman
Times Bold
Times Bold Italic
Times Italic
Symbol
ZapfDingbats

See Also
SelectPdf Namespace

632

SelectPdf Html To Pdf Converter for .NET

PdfTemplate Class
Represents a template in a pdf document. A template contains elements that are
repeated on each page of the pdf document.

Inheritance Hierarchy
System.Object SelectPdf.PdfCanvas

SelectPdf.PdfTemplate

Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)


Version: 1.0

Syntax
C#
public class PdfTemplate : PdfCanvas
VB
Public Class PdfTemplate
Inherits PdfCanvas
The PdfTemplate type exposes the following members.

Methods
Name
Add

MeasureString

Description
Adds a pdf element to the
template. (Overrides
PdfCanvas.Add(PdfPageEl
ement).)
Measures the size of the
specified string when
rendered with the
specified font. (Inherited
from PdfCanvas.)

Properties
Name
Anchoring

Background

Bounds
ClientRectangle

Description
Gets or sets the template
anchoring settings inside
the pdf page.
Controls whether the
template is rendered
behind the page main
content or not.
Gets or sets the template
bounds rectangle.
Gets the drawable area of
the canvas. The margins,
pdf document header and

633

SelectPdf Html To Pdf Converter for .NET

DisplayOnEvenPages

DisplayOnFirstPage

DisplayOnOddPages

Docking

FirstPageNumber

Foreground

Height
TotalPagesOffset

Width

footer are excluded.


(Inherited from
PdfCanvas.)
Controls the visibility of
the template on the even
numbered pages of the
pdf document.
Controls the visibility of
the template on the first
page of the generated pdf
document.
Controls the visibility of
the template on the odd
numbered pages of the
pdf document.
Gets or sets the template
docking style inside the
pdf page.
Controls the page number
for the first page being
rendered.
Controls whether the
template is rendered in
front of the page main
content or not.
Gets or sets the height for
a custom template.
Controls the total number
of pages offset in the pdf
document.
Gets or sets the width for
a custom template.

See Also
SelectPdf Namespace

634

SelectPdf Html To Pdf Converter for .NET

PdfTemplate.PdfTemplate Methods
The PdfTemplate type exposes the following members.

Methods
Name
Add

MeasureString

Description
Adds a pdf element to the
template. (Overrides
PdfCanvas.Add(PdfPageEl
ement).)
Measures the size of the
specified string when
rendered with the
specified font. (Inherited
from PdfCanvas.)

See Also
PdfTemplate Class
SelectPdf Namespace

635

SelectPdf Html To Pdf Converter for .NET

PdfTemplate.Add Method
Adds a pdf element to the template.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public override PdfRenderingResult Add(
PdfPageElement element
)
VB
Public Overrides Function Add (
element As PdfPageElement
) As PdfRenderingResult
Parameters
element
Type: SelectPdf.PdfPageElement
The page element to be added.
Return Value
Type: PdfRenderingResultThe result of element rendering.

See Also
PdfTemplate Class
SelectPdf Namespace

636

SelectPdf Html To Pdf Converter for .NET

PdfTemplate.PdfTemplate Properties
The PdfTemplate type exposes the following members.

Properties
Name
Anchoring

Background

Bounds
ClientRectangle

DisplayOnEvenPages

DisplayOnFirstPage

DisplayOnOddPages

Docking

FirstPageNumber

Foreground

Height
TotalPagesOffset

Description
Gets or sets the template
anchoring settings inside
the pdf page.
Controls whether the
template is rendered
behind the page main
content or not.
Gets or sets the template
bounds rectangle.
Gets the drawable area of
the canvas. The margins,
pdf document header and
footer are excluded.
(Inherited from
PdfCanvas.)
Controls the visibility of
the template on the even
numbered pages of the
pdf document.
Controls the visibility of
the template on the first
page of the generated pdf
document.
Controls the visibility of
the template on the odd
numbered pages of the
pdf document.
Gets or sets the template
docking style inside the
pdf page.
Controls the page number
for the first page being
rendered.
Controls whether the
template is rendered in
front of the page main
content or not.
Gets or sets the height for
a custom template.
Controls the total number
of pages offset in the pdf
637

SelectPdf Html To Pdf Converter for .NET

Width

document.
Gets or sets the width for
a custom template.

See Also
PdfTemplate Class
SelectPdf Namespace

638

SelectPdf Html To Pdf Converter for .NET

PdfTemplate.Anchoring Property
Gets or sets the template anchoring settings inside the pdf page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTemplateAnchoring Anchoring { get; set; }
VB
Public Property Anchoring As PdfTemplateAnchoring
Get
Set
Property Value
Type: PdfTemplateAnchoring

See Also
PdfTemplate Class
SelectPdf Namespace

639

SelectPdf Html To Pdf Converter for .NET

PdfTemplate.Background Property
Controls whether the template is rendered behind the page main content or not.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool Background { get; set; }
VB
Public Property Background As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value is false. Elements from the template will not be displayed behind
the other elements from the page.

See Also
PdfTemplate Class
SelectPdf Namespace

640

SelectPdf Html To Pdf Converter for .NET

PdfTemplate.Bounds Property
Gets or sets the template bounds rectangle.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public RectangleF Bounds { get; set; }
VB
Public Property Bounds As RectangleF
Get
Set
Property Value
Type: RectangleF

Remarks
This property has no effect for a default document template.

See Also
PdfTemplate Class
SelectPdf Namespace

641

SelectPdf Html To Pdf Converter for .NET

PdfTemplate.DisplayOnEvenPages Property
Controls the visibility of the template on the even numbered pages of the pdf
document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool DisplayOnEvenPages { get; set; }
VB
Public Property DisplayOnEvenPages As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
By default the template is displayed on both odd and even numbered pages.

See Also
PdfTemplate Class
SelectPdf Namespace

642

SelectPdf Html To Pdf Converter for .NET

PdfTemplate.DisplayOnFirstPage Property
Controls the visibility of the template on the first page of the generated pdf
document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool DisplayOnFirstPage { get; set; }
VB
Public Property DisplayOnFirstPage As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
When this property is true the template will be displayed on the first page of the pdf
document, otherwise it will not be visible. This property has priority over
DisplayOnOddPages. The default value is true.

See Also
PdfTemplate Class
SelectPdf Namespace

643

SelectPdf Html To Pdf Converter for .NET

PdfTemplate.DisplayOnOddPages Property
Controls the visibility of the template on the odd numbered pages of the pdf
document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool DisplayOnOddPages { get; set; }
VB
Public Property DisplayOnOddPages As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
By default the template is displayed on both odd and even numbered pages. The
DisplayOnFirstPage property has priority over DisplayOnOddPages.

See Also
PdfTemplate Class
SelectPdf Namespace

644

SelectPdf Html To Pdf Converter for .NET

PdfTemplate.Docking Property
Gets or sets the template docking style inside the pdf page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTemplateDocking Docking { get; set; }
VB
Public Property Docking As PdfTemplateDocking
Get
Set
Property Value
Type: PdfTemplateDocking

See Also
PdfTemplate Class
SelectPdf Namespace

645

SelectPdf Html To Pdf Converter for .NET

PdfTemplate.FirstPageNumber Property
Controls the page number for the first page being rendered.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int FirstPageNumber { get; set; }
VB
Public Property FirstPageNumber As Integer
Get
Set
Property Value
Type: Int32

See Also
PdfTemplate Class
SelectPdf Namespace

646

SelectPdf Html To Pdf Converter for .NET

PdfTemplate.Foreground Property
Controls whether the template is rendered in front of the page main content or not.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool Foreground { get; set; }
VB
Public Property Foreground As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value is true. Elements from the template will be displayed in front of
the other elements from the page.

See Also
PdfTemplate Class
SelectPdf Namespace

647

SelectPdf Html To Pdf Converter for .NET

PdfTemplate.Height Property
Gets or sets the height for a custom template.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Height { get; set; }
VB
Public Property Height As Single
Get
Set
Property Value
Type: Single

Remarks
This property has no effect for a default document template.

See Also
PdfTemplate Class
SelectPdf Namespace

648

SelectPdf Html To Pdf Converter for .NET

PdfTemplate.TotalPagesOffset Property
Controls the total number of pages offset in the pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int TotalPagesOffset { get; set; }
VB
Public Property TotalPagesOffset As Integer
Get
Set
Property Value
Type: Int32

See Also
PdfTemplate Class
SelectPdf Namespace

649

SelectPdf Html To Pdf Converter for .NET

PdfTemplate.Width Property
Gets or sets the width for a custom template.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Width { get; set; }
VB
Public Property Width As Single
Get
Set
Property Value
Type: Single

Remarks
This property has no effect for a default document template.

See Also
PdfTemplate Class
SelectPdf Namespace

650

SelectPdf Html To Pdf Converter for .NET

PdfTemplateAnchoring Enumeration
The anchoring position of a pdf template.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum PdfTemplateAnchoring
VB
Public Enumeration PdfTemplateAnchoring

Members
Member name
NotAnchored

Value
0

Center

TopLeft

TopRight

BottomLeft

BottomRight

Description
The template is
not anchored.
The template will
be anchored in the
center of the pdf
page.
The template will
be anchored in the
top left corner of
the pdf page.
The template will
be anchored in the
top right corner of
the pdf page.
The template will
be anchored in the
bottom left corner
of the pdf page.
The template will
be anchored in the
bottom left corner
of the pdf page.

See Also
SelectPdf Namespace

651

SelectPdf Html To Pdf Converter for .NET

PdfTemplateCollection Class
Represents the collection of pages in a pdf document. A pdf template is repeated on
each page of the pdf document.

Inheritance Hierarchy
System.Object SelectPdf.PdfTemplateCollection
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class PdfTemplateCollection
VB
Public Class PdfTemplateCollection
The PdfTemplateCollection type exposes the following members.

Methods
Name
Add(RectangleF)

Add(Single, Single)

GetEnumerator

Description
Adds a new template with
the specified bounds to
the pdf document
templates collection.
Adds a new template with
the specified width and
height to the pdf
document templates
collection.
Gets the collection
enumerator.

Properties
Name
Count

Footer

Header

Item

Description
The number of templates
in pdf templates
collection.
Represents the default
pdf document footer
template.
Represents the default
pdf document header
template.
Gets or sets the template
at the specified zero

652

SelectPdf Html To Pdf Converter for .NET


based index in the
templates collection.

See Also
SelectPdf Namespace

653

SelectPdf Html To Pdf Converter for .NET

PdfTemplateCollection.PdfTemplateCollection Methods
The PdfTemplateCollection type exposes the following members.

Methods
Name
Add(RectangleF)

Add(Single, Single)

GetEnumerator

Description
Adds a new template with
the specified bounds to
the pdf document
templates collection.
Adds a new template with
the specified width and
height to the pdf
document templates
collection.
Gets the collection
enumerator.

See Also
PdfTemplateCollection Class
SelectPdf Namespace

654

SelectPdf Html To Pdf Converter for .NET

PdfTemplateCollection.Add Method
Overload List
Name
Add(RectangleF)

Add(Single, Single)

Description
Adds a new template with
the specified bounds to
the pdf document
templates collection.
Adds a new template with
the specified width and
height to the pdf
document templates
collection.

See Also
PdfTemplateCollection Class
SelectPdf Namespace

655

SelectPdf Html To Pdf Converter for .NET

PdfTemplateCollection.Add Method (RectangleF)


Adds a new template with the specified bounds to the pdf document templates
collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTemplate Add(
RectangleF bounds
)
VB
Public Function Add (
bounds As RectangleF
) As PdfTemplate
Parameters
bounds
Type: System.Drawing.RectangleF
The template element bounds.
Return Value
Type: PdfTemplateThe newly added pdf template.

See Also
PdfTemplateCollection Class
Add Overload
SelectPdf Namespace

656

SelectPdf Html To Pdf Converter for .NET

PdfTemplateCollection.Add Method (Single, Single)


Adds a new template with the specified width and height to the pdf document
templates collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTemplate Add(
float width,
float height
)
VB
Public Function Add (
width As Single,
height As Single
) As PdfTemplate
Parameters
width
Type: System.Single
The pdf template width.
height
Type: System.Single
The pdf template height.
Return Value
Type: PdfTemplateThe newly added pdf template.

Remarks
The template location is top left corner of the pdf page. Use Add(RectangleF) to
specify another location for the template.

See Also
PdfTemplateCollection Class
Add Overload
SelectPdf Namespace

657

SelectPdf Html To Pdf Converter for .NET

PdfTemplateCollection.GetEnumerator Method
Gets the collection enumerator.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public IEnumerator GetEnumerator()
VB
Public Function GetEnumerator As IEnumerator
Return Value
Type: IEnumeratorThe collection enumerator.

See Also
PdfTemplateCollection Class
SelectPdf Namespace

658

SelectPdf Html To Pdf Converter for .NET

PdfTemplateCollection.PdfTemplateCollection Properties
The PdfTemplateCollection type exposes the following members.

Properties
Name
Count

Footer

Header

Item

Description
The number of templates
in pdf templates
collection.
Represents the default
pdf document footer
template.
Represents the default
pdf document header
template.
Gets or sets the template
at the specified zero
based index in the
templates collection.

See Also
PdfTemplateCollection Class
SelectPdf Namespace

659

SelectPdf Html To Pdf Converter for .NET

PdfTemplateCollection.Count Property
The number of templates in pdf templates collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int Count { get; }
VB
Public ReadOnly Property Count As Integer
Get
Property Value
Type: Int32

See Also
PdfTemplateCollection Class
SelectPdf Namespace

660

SelectPdf Html To Pdf Converter for .NET

PdfTemplateCollection.Footer Property
Represents the default pdf document footer template.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTemplate Footer { get; set; }
VB
Public Property Footer As PdfTemplate
Get
Set
Property Value
Type: PdfTemplate

Remarks
The footer space is automatically taken into account when calculating the available
space for rendering in a pdf page.

This template is automatically docked to the bottom of the pdf page.

See Also
PdfTemplateCollection Class
SelectPdf Namespace

661

SelectPdf Html To Pdf Converter for .NET

PdfTemplateCollection.Header Property
Represents the default pdf document header template.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTemplate Header { get; set; }
VB
Public Property Header As PdfTemplate
Get
Set
Property Value
Type: PdfTemplate

Remarks
The header space is automatically taken into account when calculating the available
space for rendering in a pdf page.

This template is automatically docked to the top of the pdf page.

See Also
PdfTemplateCollection Class
SelectPdf Namespace

662

SelectPdf Html To Pdf Converter for .NET

PdfTemplateCollection.Item Property
Gets or sets the template at the specified zero based index in the templates
collection.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTemplate this[
int index
] { get; }
VB
Public ReadOnly Default Property Item (
index As Integer
) As PdfTemplate
Get
Parameters
index
Type: System.Int32
The zero based template index in the pdf templates collection.
Return Value
Type: PdfTemplateThe pdf template at the specified index.

See Also
PdfTemplateCollection Class
SelectPdf Namespace

663

SelectPdf Html To Pdf Converter for .NET

PdfTemplateDocking Enumeration
The docking style of a pdf template.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum PdfTemplateDocking
VB
Public Enumeration PdfTemplateDocking

Members
Member name
NotDocked

Value
0

Top

Bottom

Left

Right

Fill

Description
The template is
not docked in the
pdf page.
The template is
docked to the top
of the pdf page.
The template is
docked to the
bottom of the pdf
page.
The template is
docked to the left
of the pdf page.
The template is
docked to the right
of the pdf page.
The template fills
the pdf page.

See Also
SelectPdf Namespace

664

SelectPdf Html To Pdf Converter for .NET

PdfTextHorizontalAlign Enumeration
Specifies horizontal alignment of text.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum PdfTextHorizontalAlign
VB
Public Enumeration PdfTextHorizontalAlign

Members
Member name
Default
Left
Center
Right
Justify

Value
0
1
2
3
4

Description
Default alignment.
Align left.
Center text.
Align right.
Justify text.

See Also
SelectPdf Namespace

665

SelectPdf Html To Pdf Converter for .NET

PdfTextSection Class
Represents a text that can be added to the header or footer templates of a pdf
document.

Inheritance Hierarchy
System.Object SelectPdf.PdfSectionElement

SelectPdf.PdfTextSection

Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)


Version: 1.0

Syntax
C#
public class PdfTextSection : PdfSectionElement
VB
Public Class PdfTextSection
Inherits PdfSectionElement
The PdfTextSection type exposes the following members.

Constructors
Name
PdfTextSection(Single,
Single, String, Font)

PdfTextSection(Single,
Single, Single, String,
Font)

PdfTextSection(Single,
Single, Single, Single,
String, Font)

PdfTextSection(Single,
Single, Single, String,
Font, Color)

PdfTextSection(Single,
Single, Single, Single,
String, Font, Color)

Description
Creates a text object
can be added to the
header or footer
templates of a pdf
document.
Creates a text object
can be added to the
header or footer
templates of a pdf
document.
Creates a text object
can be added to the
header or footer
templates of a pdf
document.
Creates a text object
can be added to the
header or footer
templates of a pdf
document.
Creates a text object
can be added to the
header or footer
templates of a pdf
document.

that

that

that

that

that

666

SelectPdf Html To Pdf Converter for .NET

Properties
Name
BackColor
CharacterSpacing

Direction
EmbedFont

Font
ForeColor
Height

HorizontalAlign
Leading

RightToLeft
Text

TextRise

Transparency
VerticalAlign
Width

WordSpacing

Description
Gets or sets the element
background color.
Gets or sets an additional
spacing between
characters.
Gets or sets an angle to
control the text direction.
A flag indicating if the
text font will be
embedded in the pdf
document.
The text font.
Gets or sets the element
foreground color.
The height of the
destination rectangle
where the text will be
rendered.
Gets or sets the
horizontal text alignment.
Gets or sets a value that
indicates the vertical
distance between the
baselines of adjacent
lines of text.
Indicates if the text is in a
right-to-left language.
The text string that will
be added to the pdf
document header or
footer.
Gets or sets the distance
to move the text baseline
up or down from its
default location.
Gets or sets the pdf
element transparency.
Gets or sets the vertical
text alignment.
The width of destination
rectangle where the text
will be rendered.
Gets or sets an additional

667

SelectPdf Html To Pdf Converter for .NET

X
Y

space between words.


Gets or sets the text start
position on the X axis.
Gets or sets the text start
position on the Y axis.

See Also
SelectPdf Namespace

668

SelectPdf Html To Pdf Converter for .NET

PdfTextSection Constructor
Overload List
Name
PdfTextSection(Single,
Single, String, Font)

PdfTextSection(Single,
Single, Single, String,
Font)

PdfTextSection(Single,
Single, Single, Single,
String, Font)

PdfTextSection(Single,
Single, Single, String,
Font, Color)

PdfTextSection(Single,
Single, Single, Single,
String, Font, Color)

Description
Creates a text object
can be added to the
header or footer
templates of a pdf
document.
Creates a text object
can be added to the
header or footer
templates of a pdf
document.
Creates a text object
can be added to the
header or footer
templates of a pdf
document.
Creates a text object
can be added to the
header or footer
templates of a pdf
document.
Creates a text object
can be added to the
header or footer
templates of a pdf
document.

that

that

that

that

that

See Also
PdfTextSection Class
SelectPdf Namespace

669

SelectPdf Html To Pdf Converter for .NET

PdfTextSection Constructor (Single, Single, String, Font)


Creates a text object that can be added to the header or footer templates of a pdf
document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTextSection(
float x,
float y,
string text,
Font font
)
VB
Public Sub New (
x As Single,
y As Single,
text As String,
font As Font
)
Parameters
x
Type: System.Single
The start X coordinate where the text will be rendered.
y
Type: System.Single
The start Y coordinate where the text will be rendered.
text
Type: System.String
The text to be rendered.
font
Type: System.Drawing.Font
The text font.

Remarks
The text element that will be rendered at the specified (x,y) position in the pdf
header or footer using the specified font. The height of the rendered text will be
auto-determined. The width is the available width in page.

See Also
PdfTextSection Class

670

SelectPdf Html To Pdf Converter for .NET


PdfTextSection Overload
SelectPdf Namespace

671

SelectPdf Html To Pdf Converter for .NET

PdfTextSection Constructor (Single, Single, Single, String,


Font)
Creates a text object that can be added to the header or footer templates of a pdf
document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTextSection(
float x,
float y,
float width,
string text,
Font font
)
VB
Public Sub New (
x As Single,
y As Single,
width As Single,
text As String,
font As Font
)
Parameters
x
Type: System.Single
The start X coordinate where the text will be rendered.
y
Type: System.Single
The start Y coordinate where the text will be rendered.
width
Type: System.Single
The width of the destination rectangle.
text
Type: System.String
The text to be rendered.
font
Type: System.Drawing.Font
The text font.

672

SelectPdf Html To Pdf Converter for .NET

Remarks
The text element that will be rendered at the specified (x,y) position in the pdf
header or footer using the specified font. The width of the text is specified as
parameter. The height of the rendered text will be auto-determined.

See Also
PdfTextSection Class
PdfTextSection Overload
SelectPdf Namespace

673

SelectPdf Html To Pdf Converter for .NET

PdfTextSection Constructor (Single, Single, Single, Single,


String, Font)
Creates a text object that can be added to the header or footer templates of a pdf
document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTextSection(
float x,
float y,
float width,
float height,
string text,
Font font
)
VB
Public Sub New (
x As Single,
y As Single,
width As Single,
height As Single,
text As String,
font As Font
)
Parameters
x
Type: System.Single
The start X coordinate where the text will be rendered.
y
Type: System.Single
The start Y coordinate where the text will be rendered.
width
Type: System.Single
The width of the destination rectangle.
height
Type: System.Single
The height of the destination rectangle.
text
Type: System.String
674

SelectPdf Html To Pdf Converter for .NET


The text to be rendered.
font
Type: System.Drawing.Font
The text font.

Remarks
The text element that will be rendered at the specified (x,y) position in the pdf
header or footer using the specified font. The width and height of the text on the
destination page are also specified.

See Also
PdfTextSection Class
PdfTextSection Overload
SelectPdf Namespace

675

SelectPdf Html To Pdf Converter for .NET

PdfTextSection Constructor (Single, Single, Single, String,


Font, Color)
Creates a text object that can be added to the header or footer templates of a pdf
document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTextSection(
float x,
float y,
float width,
string text,
Font font,
Color color
)
VB
Public Sub New (
x As Single,
y As Single,
width As Single,
text As String,
font As Font,
color As Color
)
Parameters
x
Type: System.Single
The start X coordinate where the text will be rendered.
y
Type: System.Single
The start Y coordinate where the text will be rendered.
width
Type: System.Single
The width of the destination rectangle.
text
Type: System.String
The text to be rendered.
font
Type: System.Drawing.Font
676

SelectPdf Html To Pdf Converter for .NET


The text font.
color
Type: System.Drawing.Color
The text color.

Remarks
The text element that will be rendered at the specified (x,y) position in the pdf
header or footer using the specified font and color. The width of the text is specified
as parameter. The height of the rendered text will be auto-determined.

See Also
PdfTextSection Class
PdfTextSection Overload
SelectPdf Namespace

677

SelectPdf Html To Pdf Converter for .NET

PdfTextSection Constructor (Single, Single, Single, Single,


String, Font, Color)
Creates a text object that can be added to the header or footer templates of a pdf
document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTextSection(
float x,
float y,
float width,
float height,
string text,
Font font,
Color color
)
VB
Public Sub New (
x As Single,
y As Single,
width As Single,
height As Single,
text As String,
font As Font,
color As Color
)
Parameters
x
Type: System.Single
The start X coordinate where the text will be rendered.
y
Type: System.Single
The start Y coordinate where the text will be rendered.
width
Type: System.Single
The width of the destination rectangle.
height
Type: System.Single
The height of the destination rectangle.

678

SelectPdf Html To Pdf Converter for .NET


text
Type: System.String
The text to be rendered.
font
Type: System.Drawing.Font
The text font.
color
Type: System.Drawing.Color
The text color.

Remarks
The text element that will be rendered at the specified (x,y) position in the pdf
header or footer using the specified font and color. The width and height of the text
on the destination page are also specified.

See Also
PdfTextSection Class
PdfTextSection Overload
SelectPdf Namespace

679

SelectPdf Html To Pdf Converter for .NET

PdfTextSection.PdfTextSection Properties
The PdfTextSection type exposes the following members.

Properties
Name
BackColor
CharacterSpacing

Direction
EmbedFont

Font
ForeColor
Height

HorizontalAlign
Leading

RightToLeft
Text

TextRise

Transparency
VerticalAlign
Width

Description
Gets or sets the element
background color.
Gets or sets an additional
spacing between
characters.
Gets or sets an angle to
control the text direction.
A flag indicating if the
text font will be
embedded in the pdf
document.
The text font.
Gets or sets the element
foreground color.
The height of the
destination rectangle
where the text will be
rendered.
Gets or sets the
horizontal text alignment.
Gets or sets a value that
indicates the vertical
distance between the
baselines of adjacent
lines of text.
Indicates if the text is in a
right-to-left language.
The text string that will
be added to the pdf
document header or
footer.
Gets or sets the distance
to move the text baseline
up or down from its
default location.
Gets or sets the pdf
element transparency.
Gets or sets the vertical
text alignment.
The width of destination
rectangle where the text
680

SelectPdf Html To Pdf Converter for .NET

WordSpacing
X
Y

will be rendered.
Gets or sets an additional
space between words.
Gets or sets the text start
position on the X axis.
Gets or sets the text start
position on the Y axis.

See Also
PdfTextSection Class
SelectPdf Namespace

681

SelectPdf Html To Pdf Converter for .NET

PdfTextSection.BackColor Property
Gets or sets the element background color.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public Color BackColor { get; set; }
VB
Public Property BackColor As Color
Get
Set
Property Value
Type: Color

See Also
PdfTextSection Class
SelectPdf Namespace

682

SelectPdf Html To Pdf Converter for .NET

PdfTextSection.CharacterSpacing Property
Gets or sets an additional spacing between characters.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float CharacterSpacing { get; set; }
VB
Public Property CharacterSpacing As Single
Get
Set
Property Value
Type: Single

See Also
PdfTextSection Class
SelectPdf Namespace

683

SelectPdf Html To Pdf Converter for .NET

PdfTextSection.Direction Property
Gets or sets an angle to control the text direction.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Direction { get; set; }
VB
Public Property Direction As Single
Get
Set
Property Value
Type: Single

Remarks
The default value is 0. Adding a value in degrees will rotate the text counterclockwise.

See Also
PdfTextSection Class
SelectPdf Namespace

684

SelectPdf Html To Pdf Converter for .NET

PdfTextSection.EmbedFont Property
A flag indicating if the text font will be embedded in the pdf document.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool EmbedFont { get; set; }
VB
Public Property EmbedFont As Boolean
Get
Set
Property Value
Type: Boolean

See Also
PdfTextSection Class
SelectPdf Namespace

685

SelectPdf Html To Pdf Converter for .NET

PdfTextSection.Font Property
The text font.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public Font Font { get; set; }
VB
Public Property Font As Font
Get
Set
Property Value
Type: Font

See Also
PdfTextSection Class
SelectPdf Namespace

686

SelectPdf Html To Pdf Converter for .NET

PdfTextSection.ForeColor Property
Gets or sets the element foreground color.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public Color ForeColor { get; set; }
VB
Public Property ForeColor As Color
Get
Set
Property Value
Type: Color

See Also
PdfTextSection Class
SelectPdf Namespace

687

SelectPdf Html To Pdf Converter for .NET

PdfTextSection.Height Property
The height of the destination rectangle where the text will be rendered.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Height { get; set; }
VB
Public Property Height As Single
Get
Set
Property Value
Type: Single

See Also
PdfTextSection Class
SelectPdf Namespace

688

SelectPdf Html To Pdf Converter for .NET

PdfTextSection.HorizontalAlign Property
Gets or sets the horizontal text alignment.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTextHorizontalAlign HorizontalAlign { get; set; }
VB
Public Property HorizontalAlign As PdfTextHorizontalAlign
Get
Set
Property Value
Type: PdfTextHorizontalAlign

See Also
PdfTextSection Class
SelectPdf Namespace

689

SelectPdf Html To Pdf Converter for .NET

PdfTextSection.Leading Property
Gets or sets a value that indicates the vertical distance between the baselines of
adjacent lines of text.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Leading { get; set; }
VB
Public Property Leading As Single
Get
Set
Property Value
Type: Single

See Also
PdfTextSection Class
SelectPdf Namespace

690

SelectPdf Html To Pdf Converter for .NET

PdfTextSection.RightToLeft Property
Indicates if the text is in a right-to-left language.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool RightToLeft { get; set; }
VB
Public Property RightToLeft As Boolean
Get
Set
Property Value
Type: Boolean

See Also
PdfTextSection Class
SelectPdf Namespace

691

SelectPdf Html To Pdf Converter for .NET

PdfTextSection.Text Property
The text string that will be added to the pdf document header or footer.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string Text { get; set; }
VB
Public Property Text As String
Get
Set
Property Value
Type: String

Remarks
If {page_number} placeholder appears in this property, it will be replaced with the
current pdf page number. By default the page numbering starts with 1. This can be
changed using the FirstPageNumber property.

If {total_pages} placeholder appears in this property, it will be replaced with the


total number of pages in the generated pdf document. The total number of pages
can be incremented with a value specified by the TotalPagesOffset property. This
could be useful when the generated pdf will be merged with other documents.

See Also
PdfTextSection Class
SelectPdf Namespace

692

SelectPdf Html To Pdf Converter for .NET

PdfTextSection.TextRise Property
Gets or sets the distance to move the text baseline up or down from its default
location.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float TextRise { get; set; }
VB
Public Property TextRise As Single
Get
Set
Property Value
Type: Single

Remarks
Adjustments to the baseline are useful for drawing superscripts or subscripts.

Positive values of text rise move the baseline up and creates a superscript text.

Negative values of text rise move the baseline down and creates a subscript text.

See Also
PdfTextSection Class
SelectPdf Namespace

693

SelectPdf Html To Pdf Converter for .NET

PdfTextSection.Transparency Property
Gets or sets the pdf element transparency.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public int Transparency { get; set; }
VB
Public Property Transparency As Integer
Get
Set
Property Value
Type: Int32

Remarks
The transparency is expressed as a value between 0 and 100.

The value 0 means completely transparent and 100 means completely opaque.

See Also
PdfTextSection Class
SelectPdf Namespace

694

SelectPdf Html To Pdf Converter for .NET

PdfTextSection.VerticalAlign Property
Gets or sets the vertical text alignment.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfTextVerticalAlign VerticalAlign { get; set; }
VB
Public Property VerticalAlign As PdfTextVerticalAlign
Get
Set
Property Value
Type: PdfTextVerticalAlign

See Also
PdfTextSection Class
SelectPdf Namespace

695

SelectPdf Html To Pdf Converter for .NET

PdfTextSection.Width Property
The width of destination rectangle where the text will be rendered.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Width { get; set; }
VB
Public Property Width As Single
Get
Set
Property Value
Type: Single

See Also
PdfTextSection Class
SelectPdf Namespace

696

SelectPdf Html To Pdf Converter for .NET

PdfTextSection.WordSpacing Property
Gets or sets an additional space between words.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float WordSpacing { get; set; }
VB
Public Property WordSpacing As Single
Get
Set
Property Value
Type: Single

Remarks
The words separator is consider the space character with code 32.

See Also
PdfTextSection Class
SelectPdf Namespace

697

SelectPdf Html To Pdf Converter for .NET

PdfTextSection.X Property
Gets or sets the text start position on the X axis.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float X { get; set; }
VB
Public Property X As Single
Get
Set
Property Value
Type: Single

See Also
PdfTextSection Class
SelectPdf Namespace

698

SelectPdf Html To Pdf Converter for .NET

PdfTextSection.Y Property
Gets or sets the text start position on the Y axis.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public float Y { get; set; }
VB
Public Property Y As Single
Get
Set
Property Value
Type: Single

See Also
PdfTextSection Class
SelectPdf Namespace

699

SelectPdf Html To Pdf Converter for .NET

PdfTextVerticalAlign Enumeration
Specifies vertical alignment of text.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum PdfTextVerticalAlign
VB
Public Enumeration PdfTextVerticalAlign

Members
Member name
Top
Middle
Bottom

Value
0
1
2

Description
Align top.
Align center.
Align bottom.

See Also
SelectPdf Namespace

700

SelectPdf Html To Pdf Converter for .NET

PdfViewerFullScreenExitMode Enumeration
Specifies how to display the pdf document on exiting full-screen mode.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum PdfViewerFullScreenExitMode
VB
Public Enumeration PdfViewerFullScreenExitMode

Members
Member name
UseNone

Value
0

UseOutlines

UseThumbs

UseOC

Description
Neither document
outline
(bookmarks) nor
thumbnail images
are visible.
Document outline
(bookmarks) are
visible.
Thumbnail images
are visible.
Optional content
group panel is
visible.

See Also
SelectPdf Namespace

701

SelectPdf Html To Pdf Converter for .NET

PdfViewerPageLayout Enumeration
Specifies the page layout to be used when the pdf document is opened in a viewer.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum PdfViewerPageLayout
VB
Public Enumeration PdfViewerPageLayout

Members
Member name
SinglePage

Value
0

OneColumn

TwoColumnLeft

TwoColumnRight

Description
Displays one page
at a time.
Displays the pages
in one column.
Displays the pages
in two columns,
with oddnumbered pages
on the left.
Displays the pages
in two columns,
with oddnumbered pages
on the right.

See Also
SelectPdf Namespace

702

SelectPdf Html To Pdf Converter for .NET

PdfViewerPageMode Enumeration
Specifies the pdf document's page mode.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum PdfViewerPageMode
VB
Public Enumeration PdfViewerPageMode

Members
Member name
UseNone

Value
0

UseOutlines

UseThumbs

FullScreen

UseOC

UseAttachments

Description
Neither document
outline
(bookmarks) nor
thumbnail images
are visible.
Document outline
(bookmarks) are
visible.
Thumbnail images
are visible.
Full-screen mode,
with no menu bar,
window controls or
any other window
visible.
Optional content
group panel is
visible.
Document
attachments are
visible.

See Also
SelectPdf Namespace

703

SelectPdf Html To Pdf Converter for .NET

PdfViewerPreferences Class
The pdf viewer preferences. Controls how the pdf document appears in a pdf viewer
(like Adobe Reader).

Inheritance Hierarchy
System.Object SelectPdf.PdfViewerPreferences
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class PdfViewerPreferences
VB
Public Class PdfViewerPreferences
The PdfViewerPreferences type exposes the following members.

Properties
Name
CenterWindow

DisplayDocTitle

FitWindow

HideMenuBar

HideToolbar

Description
Gets or sets a flag
specifying whether to
position the document's
window in the center of
the screen.
Gets or sets a flag
specifying whether the
window's title bar should
display the document
title.
Gets or sets a flag
specifying whether to
resize the document's
window to fit the size of
the first displayed page.
Gets or sets a flag
specifying whether to
hide the pdf viewer
application's menu bar
when the document is
active.
Gets or sets a flag
specifying whether to
hide the pdf viewer
application's tool bars
when the document is
704

SelectPdf Html To Pdf Converter for .NET

HideWindowUI

NonFullScreenPageMode

PageLayout

PageMode

active.
Gets or sets a flag
specifying whether to
hide user interface
elements in the
document's window (such
as scroll bars and
navigation controls),
leaving only the
document's contents
displayed.
Gets or sets the
document page mode
when the pdf viewer
application exits the full
screen mode.
Gets or sets the page
layout to be used when
the document is opened.
Gets or sets the
document page mode
when the pdf document is
opened in a pdf viewer.

See Also
SelectPdf Namespace

705

SelectPdf Html To Pdf Converter for .NET

PdfViewerPreferences.PdfViewerPreferences Properties
The PdfViewerPreferences type exposes the following members.

Properties
Name
CenterWindow

DisplayDocTitle

FitWindow

HideMenuBar

HideToolbar

HideWindowUI

NonFullScreenPageMode

Description
Gets or sets a flag
specifying whether to
position the document's
window in the center of
the screen.
Gets or sets a flag
specifying whether the
window's title bar should
display the document
title.
Gets or sets a flag
specifying whether to
resize the document's
window to fit the size of
the first displayed page.
Gets or sets a flag
specifying whether to
hide the pdf viewer
application's menu bar
when the document is
active.
Gets or sets a flag
specifying whether to
hide the pdf viewer
application's tool bars
when the document is
active.
Gets or sets a flag
specifying whether to
hide user interface
elements in the
document's window (such
as scroll bars and
navigation controls),
leaving only the
document's contents
displayed.
Gets or sets the
document page mode
when the pdf viewer

706

SelectPdf Html To Pdf Converter for .NET

PageLayout

PageMode

application exits the full


screen mode.
Gets or sets the page
layout to be used when
the document is opened.
Gets or sets the
document page mode
when the pdf document is
opened in a pdf viewer.

See Also
PdfViewerPreferences Class
SelectPdf Namespace

707

SelectPdf Html To Pdf Converter for .NET

PdfViewerPreferences.CenterWindow Property
Gets or sets a flag specifying whether to position the document's window in the
center of the screen.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool CenterWindow { get; set; }
VB
Public Property CenterWindow As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is false.

See Also
PdfViewerPreferences Class
SelectPdf Namespace

708

SelectPdf Html To Pdf Converter for .NET

PdfViewerPreferences.DisplayDocTitle Property
Gets or sets a flag specifying whether the window's title bar should display the
document title.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool DisplayDocTitle { get; set; }
VB
Public Property DisplayDocTitle As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is false.

See Also
PdfViewerPreferences Class
SelectPdf Namespace

709

SelectPdf Html To Pdf Converter for .NET

PdfViewerPreferences.FitWindow Property
Gets or sets a flag specifying whether to resize the document's window to fit the
size of the first displayed page.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool FitWindow { get; set; }
VB
Public Property FitWindow As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is false.

See Also
PdfViewerPreferences Class
SelectPdf Namespace

710

SelectPdf Html To Pdf Converter for .NET

PdfViewerPreferences.HideMenuBar Property
Gets or sets a flag specifying whether to hide the pdf viewer application's menu bar
when the document is active.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool HideMenuBar { get; set; }
VB
Public Property HideMenuBar As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is false.

See Also
PdfViewerPreferences Class
SelectPdf Namespace

711

SelectPdf Html To Pdf Converter for .NET

PdfViewerPreferences.HideToolbar Property
Gets or sets a flag specifying whether to hide the pdf viewer application's tool bars
when the document is active.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool HideToolbar { get; set; }
VB
Public Property HideToolbar As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is false.

See Also
PdfViewerPreferences Class
SelectPdf Namespace

712

SelectPdf Html To Pdf Converter for .NET

PdfViewerPreferences.HideWindowUI Property
Gets or sets a flag specifying whether to hide user interface elements in the
document's window (such as scroll bars and navigation controls), leaving only the
document's contents displayed.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public bool HideWindowUI { get; set; }
VB
Public Property HideWindowUI As Boolean
Get
Set
Property Value
Type: Boolean

Remarks
The default value for this property is false.

See Also
PdfViewerPreferences Class
SelectPdf Namespace

713

SelectPdf Html To Pdf Converter for .NET

PdfViewerPreferences.NonFullScreenPageMode Property
Gets or sets the document page mode when the pdf viewer application exits the full
screen mode.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfViewerFullScreenExitMode NonFullScreenPageMode { get;
set; }
VB
Public Property NonFullScreenPageMode As PdfViewerFullScreenExitMode
Get
Set
Property Value
Type: PdfViewerFullScreenExitMode

Remarks
This property is taken into account only if PageMode is set to FullScreen. Otherwise
it is ignored.
The default value for this property is UseNone.

See Also
PdfViewerPreferences Class
SelectPdf Namespace

714

SelectPdf Html To Pdf Converter for .NET

PdfViewerPreferences.PageLayout Property
Gets or sets the page layout to be used when the document is opened.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfViewerPageLayout PageLayout { get; set; }
VB
Public Property PageLayout As PdfViewerPageLayout
Get
Set
Property Value
Type: PdfViewerPageLayout

Remarks
The default value for this property is OneColumn.

See Also
PdfViewerPreferences Class
SelectPdf Namespace

715

SelectPdf Html To Pdf Converter for .NET

PdfViewerPreferences.PageMode Property
Gets or sets the document page mode when the pdf document is opened in a pdf
viewer.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public PdfViewerPageMode PageMode { get; set; }
VB
Public Property PageMode As PdfViewerPageMode
Get
Set
Property Value
Type: PdfViewerPageMode

Remarks
The default value for this property is UseNone.

See Also
PdfViewerPreferences Class
SelectPdf Namespace

716

SelectPdf Html To Pdf Converter for .NET

PdfViewerTextOrder Enumeration
Used in pdf document viewer preferences to specify the reading order for texts.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public enum PdfViewerTextOrder
VB
Public Enumeration PdfViewerTextOrder

Members
Member name
L2R
R2L

Value
0
1

Description
Left to right.
Right to left.

See Also
SelectPdf Namespace

717

SelectPdf Html To Pdf Converter for .NET

WebPageInformation Class
This class provides information about the converted web page (title, description,
keywords).

Inheritance Hierarchy
System.Object SelectPdf.WebPageInformation
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public class WebPageInformation
VB
Public Class WebPageInformation
The WebPageInformation type exposes the following members.

Constructors
Name
WebPageInformation

Description

Name
Description

Description
The web page
description.
The web page keywords.
The web page title.

Properties

Keywords
Title

See Also
SelectPdf Namespace

718

SelectPdf Html To Pdf Converter for .NET

WebPageInformation Constructor
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public WebPageInformation()
VB
Public Sub New

See Also
WebPageInformation Class
SelectPdf Namespace

719

SelectPdf Html To Pdf Converter for .NET

WebPageInformation.WebPageInformation Properties
The WebPageInformation type exposes the following members.

Properties
Name
Description
Keywords
Title

Description
The web page
description.
The web page keywords.
The web page title.

See Also
WebPageInformation Class
SelectPdf Namespace

720

SelectPdf Html To Pdf Converter for .NET

WebPageInformation.Description Property
The web page description.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string Description { get; set; }
VB
Public Property Description As String
Get
Set
Property Value
Type: String

See Also
WebPageInformation Class
SelectPdf Namespace

721

SelectPdf Html To Pdf Converter for .NET

WebPageInformation.Keywords Property
The web page keywords.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string Keywords { get; set; }
VB
Public Property Keywords As String
Get
Set
Property Value
Type: String

See Also
WebPageInformation Class
SelectPdf Namespace

722

SelectPdf Html To Pdf Converter for .NET

WebPageInformation.Title Property
The web page title.
Namespace: SelectPdfAssembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll)
Version: 1.0

Syntax
C#
public string Title { get; set; }
VB
Public Property Title As String
Get
Set
Property Value
Type: String

See Also
WebPageInformation Class
SelectPdf Namespace

723

Potrebbero piacerti anche