HTML To PDF Converter For .NET by SelectPdf
HTML To PDF Converter For .NET by SelectPdf
NET
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")
See Also
Reference
SelectPdf
Other Resources
Select.Pdf Website
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
See Also
Other Resources
License Agreement
Deployment
Select.Pdf Website
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.
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
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.
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.
See Also
Other Resources
Installation
Licensing
License Agreement
8
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
11
See Also
Reference
SelectPdf
HtmlToPdf
12
Page size
Page orientation
Page margins
Page size
SelectPdf supports the following standard page sizes:
A0 to A10
B0 to B5
ArchA to ArchE
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
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
See Also
Reference
SelectPdf
HtmlToPdf
HtmlToPdfOptions
15
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
See Also
Reference
SelectPdf
HtmlToPdf
HtmlToPdfOptions
17
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
See Also
Reference
SelectPdf
HtmlToPdf
HtmlToPdfOptions
19
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.
20
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:
21
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
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
Title
Author
Subject
Keywords
Creation Date
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
See Also
Reference
PdfDocument
HtmlToPdf
HtmlToPdfResult
25
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
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
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
See Also
Reference
PdfDocument
HtmlToPdf
HtmlToPdfOptions
HtmlToPdfViewerPreferences
29
Owner Password
User Password
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
See Also
Reference
PdfDocument
HtmlToPdf
HtmlToPdfOptions
PdfSecurityOptions
31
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
See Also
Reference
HtmlToPdf
HtmlToPdfOptions
33
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:
FirstPageNumber - Controls the page number for the first page being
rendered.
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
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
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:
FirstPageNumber - Controls the page number for the first page being
rendered.
36
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
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()
38
39
See Also
Reference
HtmlToPdf
PdfHeader
PdfFooter
40
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:
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
See Also
Reference
PdfDocument
HtmlToPdf
HtmlToPdfOptions
42
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
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
45
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
See Also
Reference
HtmlToPdfOptions
47
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
See Also
Reference
HtmlToPdfOptions
PdfBookmarkOptions
Other Resources
CSS Selectors
49
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);
TxtValue1.Text)
TxtValue2.Text)
TxtValue3.Text)
TxtValue4.Text)
50
See Also
Reference
HtmlToPdfOptions
51
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);
TxtValue1.Text)
TxtValue2.Text)
TxtValue3.Text)
TxtValue4.Text)
52
See Also
Reference
HtmlToPdfOptions
53
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
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
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
See Also
Reference
HtmlToPdf
HtmlToPdfOptions
HtmlToPdfAuthenticationOptions
57
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
See Also
Reference
HtmlToPdfOptions
HtmlToPdfProxyOptions
59
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
61
62
63
64
See Also
Reference
HtmlToPdf
HtmlToPdfOptions
65
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
PdfAction
PdfActionGoTo
PdfActionJavaScript
PdfBookmark
PdfBookmarkOptions
PdfBookmarksCollection
PdfCanvas
PdfColor
PdfCustomPageSize
PdfDestination
PdfDocument
PdfDocumentException
PdfDocumentInformation
PdfDocumentOpenAction
PdfDocumentSecurity
PdfFont
PdfFontCollection
PdfFooter
PdfHtmlSection
PdfImageSection
PdfMargins
PdfPage
PdfPageCollection
PdfPageElement
PdfRenderingResult
PdfSectionElement
PdfSecurityOptions
PdfTemplate
PdfTemplateCollection
PdfTextSection
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
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
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
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
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
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
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
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
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
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
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
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
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
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
WebPageFixedSize
WebPageHeight
WebPageWidth
See Also
SelectPdf Namespace
83
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
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
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
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
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
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
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
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
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
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
WebPageFixedSize
WebPageHeight
WebPageWidth
See Also
HtmlToImage Class
SelectPdf Namespace
94
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
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
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
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
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
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
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
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
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
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
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
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
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.
See Also
HtmlToImage Class
SelectPdf Namespace
107
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
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
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
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
See Also
SelectPdf Namespace
112
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
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
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
See Also
HtmlToPdf Class
HtmlToPdf Overload
SelectPdf Namespace
HtmlToPdfOptions.WebPageWidth
HtmlToPdfOptions.WebPageHeight
116
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
See Also
HtmlToPdf Class
HtmlToPdf Overload
SelectPdf Namespace
HtmlToPdfOptions.WebPageWidth
HtmlToPdfOptions.WebPageHeight
118
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
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
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
See Also
HtmlToPdf Class
ConvertHtmlString Overload
SelectPdf Namespace
122
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
See Also
HtmlToPdf Class
ConvertHtmlString Overload
SelectPdf Namespace
124
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
See Also
HtmlToPdf Class
SelectPdf Namespace
126
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
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
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
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
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
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
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
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
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
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
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
Description
Default (screen)
css styles are
loaded
Print css styles are
loaded
See Also
SelectPdf Namespace
137
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
See Also
SelectPdf Namespace
139
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
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
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
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
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
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
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
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
HtmlToPdfException Class
Exception thrown by the html to pdf converter related objects.
Inheritance Hierarchy
System.Object System.Exception
SelectPdf.HtmlToPdfException
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
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
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
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
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
EmbedFonts
ExternalLinksEnabled
HttpCookies
HttpHeaders
InternalLinksEnabled
JavaScriptEnabled
JpegCompressionEnabled
JpegCompressionLevel
KeepImagesTogether
KeepTextsTogether
MarginBottom
MarginLeft
MarginRight
MaxPageLoadTime
MinPageLoadTime
PdfBookmarkOptions
PdfCompressionLevel
PdfDocumentInformation
PdfPageCustomSize
PdfPageOrientation
PdfPageSize
PdfStandard
PluginsEnabled
ProxyOptions
SecurityOptions
ViewerPreferences
WebPageFixedSize
WebPageHeight
WebPageWidth
Remarks
The HtmlToPdf class defines a reference to an object of this type.
See Also
SelectPdf Namespace
155
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
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
JpegCompressionEnabled
JpegCompressionLevel
KeepImagesTogether
KeepTextsTogether
MarginBottom
MarginLeft
MarginRight
MarginTop
MaximumConcurrentConv
ersions
MaxPageLoadTime
MinPageLoadTime
PdfBookmarkOptions
PdfCompressionLevel
PdfDocumentInformation
PdfPageCustomSize
PdfPageOrientation
PdfPageSize
PdfStandard
PluginsEnabled
ProxyOptions
SecurityOptions
ViewerPreferences
WebPageFixedSize
WebPageHeight
WebPageWidth
See Also
HtmlToPdfOptions Class
SelectPdf Namespace
160
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
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
163
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
See Also
HtmlToPdfOptions Class
SelectPdf Namespace
165
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
See Also
HtmlToPdfOptions Class
SelectPdf Namespace
201
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
203
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
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
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
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
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
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
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
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
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
WebPageSize
Remarks
After a successful conversion the ConversionResult property is initialized with an
instance of this class.
See Also
SelectPdf Namespace
213
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
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
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
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
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
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
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
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
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
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
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
HideToolbar
HideWindowUI
NonFullScreenPageMode
PageLayout
PageMode
See Also
SelectPdf Namespace
225
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
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
PageLayout
PageMode
See Also
HtmlToPdfViewerPreferences Class
SelectPdf Namespace
228
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
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
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
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
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
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
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
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
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
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
PdfAction Class
Base class for the pdf actions.
Inheritance Hierarchy
System.Object SelectPdf.PdfAction
avaScript
SelectPdf.PdfActionGoTo
SelectPdf.PdfActionJ
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
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
PdfActionGoTo Class
Represents a Go To action in a pdf document.
Inheritance Hierarchy
System.Object SelectPdf.PdfAction
SelectPdf.PdfActionGoTo
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
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
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
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
PdfActionJavaScript Class
Represents a JavaScript action in a pdf document.
Inheritance Hierarchy
System.Object SelectPdf.PdfAction
SelectPdf.PdfActionJavaScript
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
See Also
SelectPdf Namespace
262
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
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
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
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
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
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
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
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
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
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
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
PdfCanvas Class
Base class for classes that can render pdf page elements.
Inheritance Hierarchy
System.Object SelectPdf.PdfCanvas
SelectPdf.PdfPage
SelectPdf.PdfTemplate
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
See Also
SelectPdf Namespace
275
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
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
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
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
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
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
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)
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
See Also
SelectPdf Namespace
283
PdfColor Constructor
Overload List
Name
PdfColor(Color)
PdfColor(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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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)
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
JpegCompressionEnabled
JpegCompressionLevel
Margins
Pages
Security
Templates
ViewerPreferences
Remarks
This class provides the API to create, load, modify and save a pdf document.
See Also
SelectPdf Namespace
358
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
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
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
See Also
PdfDocument Class
SelectPdf Namespace
362
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
390
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
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
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
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
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
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
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
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
See Also
PdfDocument Class
SelectPdf Namespace
399
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
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
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
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
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.
See Also
PdfDocument Class
SelectPdf Namespace
404
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.
See Also
PdfDocument Class
SelectPdf Namespace
405
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
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
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
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
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
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
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
PdfDocumentException Class
Exception thrown by the pdf document related objects.
Inheritance Hierarchy
System.Object System.Exception
SelectPdf.PdfDocumentException
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
PdfDocumentException Constructor
Overload List
Name
PdfDocumentException(St
ring)
PdfDocumentException(St
ring, Exception)
Description
Constructor.
Constructor.
See Also
PdfDocumentException Class
SelectPdf Namespace
414
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
See Also
SelectPdf Namespace
439
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
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
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
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
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
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
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
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
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
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
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
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
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
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
GetEnumerator
IndexOf
Insert
Remove
Properties
Name
Item
Description
Gets or sets the font at
the specified zero based
index in the fonts
collection.
See Also
SelectPdf Namespace
454
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
MaxPageLoadTime
MinPageLoadTime
PluginsEnabled
ProxyOptions
StartupMode
StartupScript
VisibleWebElementId
WebPageFixedSize
WebPageHeight
WebPageWidth
Remarks
The html can be specified by either an url or a html string.
See Also
SelectPdf Namespace
500
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
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
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
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
505
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
See Also
PdfHtmlSection Class
PdfHtmlSection Overload
SelectPdf Namespace
507
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
See Also
PdfHtmlSection Class
PdfHtmlSection Overload
SelectPdf Namespace
509
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
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
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
MaxPageLoadTime
MinPageLoadTime
PluginsEnabled
ProxyOptions
StartupMode
StartupScript
VisibleWebElementId
WebPageFixedSize
WebPageHeight
WebPageWidth
513
See Also
PdfHtmlSection Class
SelectPdf Namespace
514
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
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
517
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
See Also
PdfHtmlSection Class
SelectPdf Namespace
519
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
See Also
PdfHtmlSection Class
SelectPdf Namespace
539
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
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
Image
Transparency
Width
X
Y
See Also
SelectPdf Namespace
541
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
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
See Also
PdfImageSection Class
PdfImageSection Overload
SelectPdf Namespace
544
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
See Also
PdfImageSection Class
PdfImageSection Overload
SelectPdf Namespace
546
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
PdfMargins.PdfMargins Properties
The PdfMargins type exposes the following members.
Properties
Name
Empty
Description
Empty margins object
See Also
PdfMargins Class
SelectPdf Namespace
563
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
PdfPage Class
Represents a page in a pdf document.
Inheritance Hierarchy
System.Object SelectPdf.PdfCanvas
SelectPdf.PdfPage
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
582
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
Remove
RemoveAt
See Also
PdfPageCollection Class
SelectPdf Namespace
584
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
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
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
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
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
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
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
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
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
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
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
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
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
598
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
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
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
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
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
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
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
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
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
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
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
See Also
SelectPdf Namespace
610
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
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
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
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
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.
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
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
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
See Also
SelectPdf Namespace
618
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
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
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
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
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
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
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
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
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
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
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
See Also
SelectPdf Namespace
630
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
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
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
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
DisplayOnEvenPages
DisplayOnFirstPage
DisplayOnOddPages
Docking
FirstPageNumber
Foreground
Height
TotalPagesOffset
Width
See Also
SelectPdf Namespace
634
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
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
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
Width
document.
Gets or sets the width for
a custom template.
See Also
PdfTemplate Class
SelectPdf Namespace
638
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
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
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
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
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
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
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
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
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
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
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
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
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
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
See Also
SelectPdf Namespace
653
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
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
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
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
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
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
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
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.
See Also
PdfTemplateCollection Class
SelectPdf Namespace
661
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.
See Also
PdfTemplateCollection Class
SelectPdf Namespace
662
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
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
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
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
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
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
X
Y
See Also
SelectPdf Namespace
668
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
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
671
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
See Also
PdfTextSection Class
SelectPdf Namespace
692
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
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
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
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
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
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
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
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
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
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
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
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
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
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
PageLayout
PageMode
See Also
PdfViewerPreferences Class
SelectPdf Namespace
707
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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