Click or drag to resize
Pdf Library for .NET

SelectPdf.Universal Namespace

SelectPdf offers an API to create, modify, merge, split pdf documents. It also contains a powerful html to pdf converter that supports modern html5/css3.
Classes
 ClassDescription
Public classCode exampleDocumentInformation PDF document information returned by the PDF tools (DocumentInformation).
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 exampleHiddenWebElements Identifies web page elements that must be hidden and not rendered in the generated pdf document. The matching elements are removed from the page layout before the conversion snapshot is taken, so neither the elements nor any links inside them appear in the output.
Public classCode exampleHtmlToImage Converts HTML documents and web pages to raster images.
Public classCode exampleHtmlToImageElement Renders an HTML document or a web page to an image and draws it onto a pdf page (full edition only).
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 exampleLicenseException Thrown when LicenseKey is set to a value that cannot be decoded, does not match this product, targets an older major version, or has expired. All license-related failures surface as this single type; host code can switch on Message to distinguish causes.
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 examplePdfAction The base class for actions that can be triggered in a PDF document, for example when the document is opened. Use a concrete subclass such as PdfActionGoTo or PdfActionJavaScript.
Public classCode examplePdfActionGoTo An action that navigates to a destination within the same document (for example, as the document open action so a viewer jumps to a specific page and zoom on open).
Public classCode examplePdfActionJavaScript An action that runs a JavaScript script (for example, as the document open action so a viewer executes the script when the document is opened).
Public classCode examplePdfAnnotationElement Represents a text-note (sticky) annotation in a pdf document. Viewers display the icon at the given rectangle; clicking the icon opens a popup showing the annotation text.
Public classCode examplePdfBezierCurveElement Represents a cubic Bezier curve drawn in a pdf document. A Bezier curve is specified by 4 points: a start point, two control points, and an end point. The curve is stroke-only (no fill) using ForeColor (black by default) and LineStyle.
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 examplePdfCircleElement Represents a circle that can be added to a PDF page — an ellipse with equal horizontal and vertical radii. Fill it with BackColor (or Gradient) and outline it with ForeColor and LineStyle.
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 examplePdfDigitalCertificate This class represents a certificate used for digital signatures in a pdf document. Obtain instances from a PdfDigitalCertificatesCollection returned by PdfDigitalCertificatesStore.
Public classCode examplePdfDigitalCertificatesCollection Represents a collection of digital certificates that can be used to sign a pdf document. Returned by the PdfDigitalCertificatesStore factory methods.
Public classCode examplePdfDigitalCertificatesStore Provides an interface for getting digital certificates from the system certificates store or from a password protected PKCS#12 file.
Public classCode examplePdfDigitalSignatureElement Represents a digital signature in a 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 examplePdfDocumentOpenAction The action performed when the document is opened in a viewer. Accessed via OpenAction. Assign Action a PdfActionGoTo (jump to a destination) or PdfActionJavaScript (run a script).
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 examplePdfElement Abstract base class for graphic elements with common styling properties such as colors, transparency, line style, gradient, and transformations (translate, scale, rotate, skew). Concrete shape, text, and image elements inherit these members and are added to a page with Add(PdfPageElement).
Public classCode examplePdfEllipseArcElement Represents an ellipse arc drawn in a pdf document — the portion of an ellipse between two angles. The arc is stroke-only (no fill) using ForeColor (black by default) and LineStyle. The ellipse is inscribed in the rectangle (X, Y, Width, Height).
Public classCode examplePdfEllipseElement Represents an ellipse defined by a center point and horizontal / vertical radii. Fill it with BackColor (or Gradient) and outline it with ForeColor and LineStyle. Coordinates are in the page's client-area coordinate system.
Public classCode examplePdfEllipseSliceElement Represents a pie slice of an ellipse drawn in a pdf document. Supports both fill (BackColor / Gradient) and stroke (ForeColor + LineStyle). The ellipse is inscribed in the rectangle (X, Y, Width, Height).
Public classCode examplePdfExternalFileElement Represents a link to an external file in a pdf document. Clicking the rectangle in a viewer that honors launch actions opens the referenced file with the platform's default application. The referenced file is NOT embedded — use PdfFileAttachmentElement when you want the file carried inside the PDF.
Public classCode examplePdfExternalLinkElement Represents a link to an external url in a pdf document. When added to a page, it creates a clickable hotspot over the given rectangle that opens the destination url in the reader's default browser.
Public classCode examplePdfFileAttachmentElement Represents a file attachment in a pdf document. The attachment can be purely document-level (file travels with the PDF, no visual indicator) or page-level (a clickable paperclip-style icon is placed at LinkRectangle). Four constructors are provided: two with a link rectangle (page-level, visible icon) and two without (document-level only), each in file-path and stream+name flavors.
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 examplePdfFormFieldBase class for all AcroForm field wrappers.
Public classCode examplePdfFormFieldCheckBoxA check box field.
Public classCode examplePdfFormFieldComboBoxA combo box (drop-down) field.
Public classCode examplePdfFormFieldListBoxA list box field (single- or multi-select).
Public classCode examplePdfFormFieldRadioButtonListA radio-button group field.
Public classCode examplePdfFormFieldsCollection A read-only-count collection of the AcroForm fields in a loaded document. Index by position or by field name; enumerate to walk every field.
Public classCode examplePdfFormFieldTextBoxA single-line or multi-line text field.
Public classCode examplePdfFormFieldWidgetA single widget (visual placement) of a form field.
Public classCode examplePdfFormFieldWidgetsCollectionThe collection of widgets (visual placements) associated with a form field.
Public classCode examplePdfFormManager Reads and fills the AcroForm fields of an existing PDF document. Load a document with one of the Load overloads, read or set values through Fields, then persist the changes with Save(String) / GetDocument.
Public classCode examplePdfGradient Represents a linear gradient fill for PDF graphic elements. Assign an instance to a graphic element's Gradient property to fill it with a two-color gradient.
Public classCode examplePdfHeader Handles the properties of the header of the generated pdf document.
Public classCode examplePdfHtmlElement Represents a html element that can be added to a pdf page or document.
Public classCode examplePdfHtmlSection Represents a html element that can be added to the header or footer templates of a pdf document.
Public classCode examplePdfImageElement Represents an image that can be added to 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 examplePdfInternalLinkElement Represents an internal link in a pdf document (a clickable hotspot that jumps to a destination in the same document).
Public classCode examplePdfLineElement Represents a straight line between two points on a PDF page. The line is stroked with ForeColor (black by default) and LineStyle. Coordinates are in the page's client-area coordinate system.
Public classCode examplePdfLineStyle Represents the style of a line used in PDF drawing operations (width, cap, join and dash). Assign an instance to a graphic element's LineStyle property to control how its outline is stroked.
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 classCode examplePdfPageElement 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 classCode examplePdfPolygonElement Represents a polygon drawn in a pdf document, defined by an array of vertices that are connected in order and automatically closed. Fill it with BackColor (or Gradient) and outline it with ForeColor and LineStyle.
Public classCode examplePdfPortfolioFileRepresents a single embedded file of a pdf portfolio.
Public classCode examplePdfPortfolioFilesCollectionManages the embedded files of a pdf portfolio.
Public classCode examplePdfPortfolioManager Manages a pdf portfolio. Can transform an existing regular pdf into a portfolio, create a new portfolio, or manage the embedded files of an existing one.
Public classCode examplePdfRasterizer Converts PDF document pages to images, using the cross-platform native PDF engine.
Public classCode examplePdfRasterizerExceptionException thrown by PdfRasterizer.
Public classCode examplePdfRectangleElement Represents a rectangle that can be added to a PDF page. Fill it with BackColor (or Gradient) and outline it with ForeColor and LineStyle. Coordinates are in the page's client-area coordinate system.
Public classCode examplePdfRedactionManager Removes content from an existing PDF document: text, images, vector graphics, links and form fields inside the areas marked for redaction are deleted from the document, not just covered, and each area is painted over with a fill color.
Public classPdfRedactionResult One area removed by Redact.
Public classCode examplePdfRenderingResult 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 examplePdfResizeManager Resizes existing pdf documents — change the page size, orientation or margins, and scale / align the original page content into the new page.
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 examplePdfSecurityManager Applies security to an existing PDF document: encryption (passwords, permissions, key size and algorithm) and digital signing with a PFX certificate. Load a document with one of the Load overloads, configure it, then persist with Save(String) / GetDocument.
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 classPdfSignatureValidationResult The result of validating one digital signature of a pdf document, returned by ValidateSignatures.
Public classCode examplePdfSoundLinkElement Represents a link to an external sound file in a pdf document. Viewers that honor sound annotations play the referenced audio when the rectangle is clicked. Supported audio formats depend on the target viewer (Acrobat historically accepts WAV, AIFF).
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 classCode examplePdfTemplate Represents a template in a pdf document. A template contains elements that are repeated on more than one page of the pdf document.
Public classCode examplePdfTemplateCollection 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 examplePdfTextElement Represents a text that can be added to a pdf document. The text element supports pagination — when the rendered text does not fit on the current page, additional pages are created automatically to hold the remaining content.
Public classCode examplePdfTextElementRenderingResult The result of adding a PdfTextElement to a pdf page or template. Extends PdfRenderingResult with the text that did not fit in the destination bounds.
Public classCode examplePdfTextSection Represents a text that can be added to the header or footer templates of a pdf document.
Public classCode examplePdfTool Base class for the PDF tools that read an existing document through the native PDF engine (PdfToText, PdfRasterizer). Load a document with one of the Load overloads, then use the derived tool.
Public classCode examplePdfToText Extracts text from an existing PDF document and searches it for text, using the cross-platform native PDF engine.
Public classCode examplePdfToTextExceptionException thrown by PdfToText.
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 examplePdfWordElement Represents a Word document that can be added to a pdf page or template.
Public classCode examplePdfWordSection Represents a Word document that can be added to the header or footer templates of a pdf document.
Public classCode exampleTextPosition The position of a piece of text found in a PDF document by Search(String).
Public classCode exampleTimeStampAuthority Describes a time-stamp authority (TSA) server used to timestamp a digital signature. Pass an instance to Sign(String, String, String, String, String, String, Int32, RectangleF, TimeStampAuthority).
Public classCode exampleWebElement Represents the mapping of a HTML element in the PDF document as a collection of PDF rectangles. A HTML element can span on many pages in the generated PDF document and therefore, in general, many PDF rectangles are necessary to completely describe the mapping of a HTML element in PDF. Instances are produced by the conversion and obtained from Result.
Public classCode exampleWebElementPdfRectangle Represents the rectangle occupied by a HTML element in a page of the generated PDF document. Obtained from PdfRectangles; an element that spans several pages produces one rectangle per page.
Public classCode exampleWebElementsCollection A read-only collection of WebElement mappings produced by the conversion, one per HTML element matched by the mapping selectors. Obtained from Result; enumerate it, index into it, or look up an element by its HTML id or tag name.
Public classCode exampleWebElementsMappingOptions Requests that the converter track the position of specific web page elements in the generated pdf document. Set CssSelectors before conversion; after conversion, read the mapped positions from Result. Reached through WebElementsMappingOptions.
Public classCode exampleWebPageInformation Contains metadata read from the converted web page — its title, keywords, and description. Obtained from WebPageInformation after a conversion completes.
Public classCode exampleWordToPdf Word to Pdf Converter. This class offers the API needed to convert a Word document (docx, doc, rtf and the other formats of WordFormat) to pdf.
Public classWordToPdfException The exception thrown when a Word to PDF conversion cannot be performed.
Public classWordToPdfOptions Controls the Word to PDF conversion process and the properties of the generated PDF document.
Public classWordToPdfResult Information about the result of a Word to PDF conversion.
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 examplePdfAnnotationIcon Defines the set of icon styles available for PdfAnnotationElement (text-note / sticky annotations) displayed by a PDF viewer when the annotation is collapsed.
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 examplePdfBlending The blending mode that controls how a graphic element's colors are composited with the content already drawn beneath it.
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 examplePdfCertificateSystem The types of system certificates stores.
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 examplePdfGradientDirection The direction of a gradient fill.
Public enumerationCode examplePdfHorizontalAlignSpecifies horizontal alignment.
Public enumerationCode examplePdfImageFormat The output image format for Save.
Public enumerationCode examplePdfLineCapStyle The shape drawn at the endpoints of an open path (line ends).
Public enumerationCode examplePdfLineDashStyle The dash pattern applied when stroking a path.
Public enumerationCode examplePdfLineJoinStyle The shape of the corner where two connected line segments meet when a shape is stroked.
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 examplePdfPortfolioViewModeThe pdf portfolio view mode.
Public enumerationCode examplePdfRasterizerColorSpaceThe color space of the images produced by PdfRasterizer.
Public enumerationPdfRevocationStatus Whether the certificate that signed a document has been revoked by its issuer.
Public enumerationPdfSignatureStatus The overall outcome of validating a digital signature.
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 examplePdfTagType The standard structure types used to tag content in a tagged (accessible) PDF 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 enumerationPdfUAStandard The universal accessibility standard a document conforms to.
Public enumerationCode examplePdfVerticalAlignSpecifies vertical alignment.
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.
Public enumerationCode exampleTextLayoutThe text extraction layout used by Layout.
Public enumerationWordBookmarks What the PDF outline (bookmarks panel) of a Word to PDF conversion is built from.
Public enumerationWordFormat The file format of a Word document handed to the Word to PDF converter.
Public enumerationWordPageSetup Where the pages of a Word to PDF conversion take their size, orientation and margins from.
Public enumerationZugferdProfile The data profile of a ZUGFeRD / Factur-X hybrid electronic invoice. The profile determines how much of the EN 16931 semantic model the embedded XML carries, and is recorded in the invoice metadata as the conformance level.
Public enumerationZugferdSchema The metadata schema used to identify a hybrid invoice inside the PDF.