Click or drag to resize
Pdf Library for .NET

SelectPdf.Universal Namespace

SelectPdf Html To Pdf Converter contains a powerful html to pdf converter that supports modern html5/css3.
Classes
 ClassDescription
Public classCode exampleGlobalProperties Global configuration knobs for the SelectPdf SDK. Settings here apply to every conversion and every document produced in the current application domain.
Public classCode exampleHtmlToPdf Html To Pdf Converter. This class offers the API needed to convert any web page url or html string to pdf.
Public classCode exampleHtmlToPdfAuthenticationOptions Holds the credentials sent to a web server that protects the converted page with HTTP authentication. Reached through Authentication; the credentials are used only when the server challenges the request.
Public classCode exampleHtmlToPdfDocumentInformation Specifies the document metadata (title, author, subject, keywords, creation date, language) written into the generated pdf document. Reached through PdfDocumentInformation.
Public classCode exampleHtmlToPdfException The exception thrown when an HTML to PDF conversion fails, for example on a navigation timeout, an unreachable URL, or a rendering engine error. Catch it around ConvertUrl(String) / ConvertHtmlString(String).
Public classCode exampleHtmlToPdfOptions This class contains various options used for the html to pdf conversion (page size and orientation, margins, web page dimensions, JavaScript, css media type, compression, security, document information, and more).
Public classCode exampleHtmlToPdfProxyOptions Specifies the network proxy the converter uses to reach the web page being converted. Reached through ProxyOptions; a proxy is used only when Type is set to a value other than None.
Public classCode exampleHtmlToPdfResult Holds detailed information produced by a completed HTML to PDF conversion — page counts, web and pdf page sizes, the scale factor, the drawn rectangles, and the captured console log. Obtained from ConversionResult after a convert call returns; all properties are read-only to consumer code.
Public classCode exampleHtmlToPdfViewerPreferences Controls how the generated pdf document is presented when opened in a pdf viewer such as Adobe Reader — which chrome to hide, how to fit and position the window, and the initial page mode and layout. Reached through ViewerPreferences.
Public classCode exampleLoginOptions Drives an interactive, form-based login the converter performs before rendering a protected page: it navigates to LoginPage, types Username and Password into the fields identified by the CSS selectors, and clicks the submit button. Reached through LoginOptions. Use this for pages behind an HTML login form; use Authentication for HTTP authentication.
Public classCode examplePdfBookmark Represents a bookmark (outline entry) in a pdf document. Bookmarks appear in the navigation pane of PDF readers and let users jump to specific locations in the document.
Public classCode examplePdfBookmarkOptions Instructs the converter to automatically create pdf outline bookmarks from the web page elements matched by CssSelectors, optionally nesting them into a hierarchy. Reached through PdfBookmarkOptions.
Public classCode examplePdfBookmarksCollection Represents the collection of bookmarks in a pdf document (accessed via Bookmarks) or the children of a parent bookmark (accessed via ChildNodes).
Public classCode examplePdfCanvas Base class for objects that can render pdf page elements.
Public classCode examplePdfColor Represents a color used in PDF graphic elements. Construct one from red / green / blue byte components, from a gray level, from CMYK components, or convert implicitly to and from Color.
Public classCode examplePdfCustomPageSize Represents a custom page size for PDF documents, specified in points. Construct one with explicit dimensions, or use a predefined static size such as A4 or Letter.
Public classCode examplePdfDestination Represents a destination in a pdf document.
Public classCode examplePdfDocument Represents a PDF document. Can be used to create a new empty PDF document or to load an existing one.
Public classCode examplePdfDocumentException Represents errors that occur during PDF document operations (loading, saving, page manipulation, security, and rendering).
Public classCode examplePdfDocumentInformation Represents the document information properties of a PDF document (title, author, subject, etc.). Accessed through DocumentInformation.
Public classCode examplePdfDocumentSecurity Represents the security settings of a PDF document, including passwords, encryption algorithm / key size, and per-operation permissions. Accessed through Security. Encryption is written to the output only when at least one password is set or a permission is restricted; clearing both passwords on a loaded document and saving strips existing encryption.
Public classCode examplePdfFont Represents a font in a pdf document. Five ways to create one:
Public classCode examplePdfFontCollection Collection of fonts associated with a PdfDocument. Accessed through Fonts.
Public classCode examplePdfFooter Handles the properties of the footer of the generated pdf document.
Public classCode examplePdfHeader Handles the properties of the header of the generated pdf document.
Public classCode examplePdfHtmlSection Represents a html element that can be added to the header or footer templates of a pdf document.
Public classCode examplePdfImageSection Represents an image that can be added to the header or footer templates of a pdf document.
Public classCode examplePdfMargins Represents the margins (in points) of a PDF page or element. Used, for example, when adding a page with Add(PdfCustomPageSize, PdfMargins) or when configuring the conversion output.
Public classCode examplePdfPage Represents a page in a PDF document. Obtained from AddPage or the document's Pages collection; add graphic elements to it with Add(PdfPageElement).
Public classCode examplePdfPageCollection Represents the collection of pages in a PDF document. Accessed through Pages; supports indexing, enumeration, and adding, inserting, or removing pages.
Public classPdfPageElement Abstract base class for all graphic elements that can be added to a PDF page or template (text, images, shapes, links). Concrete elements are created directly and placed on a page with Add(PdfPageElement). In the full edition this base also carries the tagging properties used when producing a tagged (accessible) document.
Public classPdfRenderingResult Contains the result of adding an element to a PDF page or template — the index of the last page the element rendered on and the bounding rectangle of the content on that page. Returned by Add(PdfPageElement).
Public classCode examplePdfSectionElement The abstract base class for the elements that can be added to the header or footer of a pdf document.
Public classCode examplePdfSecurityOptions Specifies the encryption and permission settings applied to the generated pdf document — user and owner passwords, encryption key size and algorithm, and per-action permissions such as printing, copying, and editing. Reached through SecurityOptions. Encryption is written only when a password is set or a permission is restricted.
Public classCode examplePdfSystemFont Descriptor for a system-installed font. Resolves to an actual font file on the host machine via PdfSystemFonts when the descriptor is handed to Add(PdfSystemFont) or CreateFromSystemFont(PdfSystemFont).
Public classCode examplePdfSystemFonts Discovery of fonts installed on the host system. Works on Windows, Linux and macOS.
Public classPdfTemplate Represents a template in a pdf document. A template contains elements that are repeated on more than one page of the pdf document.
Public classPdfTemplateCollection Represents the collection of templates of a pdf document. A template is repeated on more than one page of the pdf document. Reached via Templates.
Public classCode examplePdfTextSection Represents a text that can be added to the header or footer templates of a pdf document.
Public classCode examplePdfViewerPreferences Controls how the pdf document appears in a pdf viewer (Adobe Reader, Foxit, etc.) — which panels are visible when the document opens, whether the viewer's chrome is hidden, whether the window resizes to fit the first page, and so on. Obtained via ViewerPreferences; mutations write through to the underlying PDF immediately — no explicit apply step is needed. Works on every document origin: new documents, loaded documents, and HtmlToPdf output.
Public classCode exampleWebPageInformation Contains metadata read from the converted web page — its title, keywords, and description. Obtained from WebPageInformation after a conversion completes.
Enumerations
 EnumerationDescription
Public enumerationCode exampleChromiumEngineHostMode Selects how the Chromium engine is hosted while converting HTML.
Public enumerationCode exampleHtmlToPdfCssMediaType The CSS media type the converter emulates when rendering the HTML page.
Public enumerationCode exampleHtmlToPdfStartupMode Controls when the conversion of a page is started by the converter.
Public enumerationCode exampleHttpCacheMode Selects what the Chromium engine's HTTP cache keeps from one conversion for the next.
Public enumerationCode exampleManagedContentTrimmingMode How the rendering engine finds where the rendered content ends, when the library decides where each page is cut (ManagedContentTrimming).
Public enumerationCode exampleNetworkProxyType The type of network proxy used when the converter retrieves the web page.
Public enumerationCode examplePdfAttachmentRelationship The relationship between an embedded associated file and the document content, as recorded in the file's AFRelationship entry. Used with AddAssociatedFile(String, PdfAttachmentRelationship, String, String).
Public enumerationCode examplePdfBookmarkStyle The font style applied to a bookmark's title in the document outline. The values can be combined (for example Bold | Italic).
Public enumerationCode examplePdfColorSpace The color space of the generated PDF document.
Public enumerationCode examplePdfCompressionLevel The level of stream and font compression applied when the PDF document is saved.
Public enumerationCode examplePdfDestinationFitMode Specifies the auto-fit mode for a PdfDestination object.
Public enumerationCode examplePdfEncryptionAlgorithm The encryption algorithm used for PDF security.
Public enumerationCode examplePdfEncryptionKeySize The encryption key size used for PDF security.
Public enumerationCode examplePdfFontStyle Selection style for a system font resolved by family name. Describes which weight / slant variant of the family to load (Regular, Bold, Italic, or Bold+Italic).
Public enumerationCode examplePdfFontType Identifies one of the standard PDF font faces (the built-in Helvetica, Courier, Times, Symbol, and ZapfDingbats variants).
Public enumerationCode examplePdfPageOrientation The page orientation used for the PDF document.
Public enumerationCode examplePdfPageRotation Standard clockwise rotation angles that can be applied to a PDF page through Rotation.
Public enumerationCode examplePdfPageSize The page size used for the PDF document.
Public enumerationCode examplePdfStandard The PDF conformance standard the document is produced against (for example an archival PDF/A level, or Full for a standard PDF with no conformance constraints).
Public enumerationCode examplePdfStandardCJKFont The Korean / Japanese / Chinese (CJK) predefined fonts. Shipped with the PDF/A family of readers, so they don't need to be embedded into the document — yet still render full CJK text correctly.
Public enumerationCode examplePdfStandardFont One of the 14 built-in standard PDF fonts (Helvetica, Courier, Times, Symbol and ZapfDingbats, with their style variants). These fonts are not embedded in the document.
Public enumerationCode examplePdfTemplateAnchoring Specifies how a template is anchored inside the PDF page.
Public enumerationCode examplePdfTemplateDocking Specifies how a template is docked to an edge of the PDF page.
Public enumerationCode examplePdfTextHorizontalAlign The horizontal alignment of text in a PDF element.
Public enumerationCode examplePdfTextVerticalAlign The vertical alignment of text within the bounds of a PDF element.
Public enumerationCode examplePdfViewerFullScreenExitMode The page mode a viewer returns to when the document leaves full-screen mode.
Public enumerationCode examplePdfViewerPageLayout The page layout a viewer uses when the document is opened.
Public enumerationCode examplePdfViewerPageMode How a viewer displays the document (which navigation panel is shown, or full-screen) when it is opened.
Public enumerationCode exampleRenderingEngine The rendering engine used by the converter to render HTML.