Document

Overview

Document is a class in Aspose.PDF FOSS for .NET. Inherits from: IDisposable.

Represents a PDF document.

This class declares 151 methods for Document objects in .NET programs. Available methods include: AddEmbeddedFile, AddNamedDestination, BindXml, ChangePasswords, Check, Convert, ConvertPageToPNGMemoryStream, Create, Decrypt, Dispose, Document, Encrypt, and 42 additional methods. Public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: Actions, AllowReusePageContent, AssociateEmbeddedFiles, Background, CenterWindow, ChecksumEmbeddedFiles, and 73 more.

Properties

NameTypeAccessDescription
JavaScriptJavaScriptCollectionReadDocument-level JavaScript (PDF spec §12.6.4.16 — /Names/JavaScript name tree in the catalog).
PagesPageCollectionReadThe collection of pages in this document.
InfoDocumentInfoReadThe document information dictionary (title, author, etc.).
FileNamestring?ReadThe file name/path this document was loaded from, or null if loaded from a stream.
PdfVersionstring?ReadThe PDF version from the file header (e.g., “1.4”, “1.7”, “2.0”).
PageCountintReadShortcut for Pages.Count.
Versionstring?ReadAlias for PdfVersion.
IsPdfaCompliantboolReadTrue if the document declares itself PDF/A compliant.
PdfFormatAspose.Pdf.PdfFormatReadReturns the PDF format declared by this document.
IsLinearizedboolRead/WriteGets or sets the is linearized.
EnableSignatureSanitizationboolRead/WriteWhen true (default), the writer scrubs invalid signature references during save.
FormFormReadThe interactive form (AcroForm).
DisableFontLicenseVerificationsboolRead/WriteWhether the face licence gate is lifted for this document: with it set, a face whose OS/2 fsType forbids embedding is embedded anyway and no FontEmbeddingException is raised.
FontUtilitiesIDocumentFontUtilitiesReadFont utilities for subsetting and font management.
OutlinesOutlineCollectionReadThe document outline (bookmarks), or null if none exists.
CollectionCollection?Read/WritePDF Portfolio (collection) wrapper — returns the catalog’s Collection dictionary as a Collection, or null if the document is not a portfolio.
MetadataMetadataReadXMP metadata for the document.
EncryptionInfoEncryptionInfo?ReadEncryption details, or null if not encrypted.
PermissionsintReadRaw /P permissions bitmask from the encryption dictionary (PDF 32000-1:2008 Table 22).
OpenActionIAppointment?Read/WriteThe document open action (action or destination executed when opening the PDF), or null.
PageInfoPageInfoRead/WriteDefault page dimensions/margins applied to pages added after this is set.
EmbeddedFilesEmbeddedFileCollectionReadEmbedded files collection.
HasEmbeddedFilesboolReadWhether the document has embedded files.
PageLabelsPageLabelCollectionReadPage labels, or null.
OutputIntentsOutputIntentsReadOutput intents declared in the document catalog.
DestinationsDestinationCollectionReadProvides destination lookup methods (e.g., GetPageNumber by destination name).
NamedDestinationsNamedDestinationCollectionReadNamed destinations in the document.
OptionalContentOptionalContentProperties?ReadOptional content properties (layers), or null if none.
ViewerPreferencesViewerPreferences?ReadViewer preferences that control how the document is displayed.
CenterWindowboolRead/Write/CenterWindow viewer preference: position document window in the centre of the screen.
FitWindowboolRead/Write/FitWindow viewer preference: resize the window to fit the first displayed page.
DisplayDocTitleboolRead/Write/DisplayDocTitle viewer preference: show the document title in the window’s title bar instead of the file name.
PageLayoutNamestring?Read/WriteRaw /PageLayout name read from the catalog (e.g., “SinglePage”, “TwoColumnLeft”).
PageModeNamestring?Read/WriteRaw /PageMode name read from the catalog (e.g., “UseNone”, “UseOutlines”).
PageLayoutPageLayoutRead/WriteThe /PageLayout entry as a typed enum.
PageModePageModeRead/WriteThe /PageMode entry as a typed enum.
NonFullScreenPageModePageModeRead/WriteThe /NonFullScreenPageMode viewer preference (which page mode to revert to when leaving full-screen).
PrintScalingPrintScalingRead/WriteThe /PrintScaling viewer preference.
DuplexPrintDuplexRead/WriteThe /Duplex viewer preference (default Simplex when unset).
DirectionDirectionRead/WriteThe /Direction viewer preference (text-flow direction).
CryptoAlgorithmCryptoAlgorithm?ReadThe encryption algorithm in use, or null when the document is not encrypted.
IdId?ReadThe /ID array from the trailer, or null when no /ID entry is present.
IsPdfUaCompliantboolReadTrue when the document’s XMP metadata carries a pdfuaid:part entry (PDF/UA-1 identifier).
Languagestring?Read/WriteThe natural language of the document (BCP 47).
IsTaggedboolReadWhether the document is tagged PDF.
StructTreeRootAspose.Pdf.Tagged.StructTreeRoot?ReadThe structure-tree root (/StructTreeRoot) for reading a tagged document’s logical structure, or null when the document is not tagged.
LogicalStructureAspose.Pdf.Structure.RootElementReadThe root of the document’s logical-structure tree.
TaggedContentTagged.ITaggedContentReadTagged-content surface for accessibility metadata and the logical-structure tree.
AssociateEmbeddedFilesboolRead/WriteAdd an embedded file to the document.
ChecksumEmbeddedFilesboolRead/WriteWhether an embedded file’s /Params carries a /CheckSum of the bytes it embeds.
HasFormboolReadWhether the document has an interactive form.
HasOutlinesboolReadWhether the document has bookmarks.
HasMetadataboolReadWhether the document has XMP metadata.
HasPageLabelsboolReadWhether the document has page labels.
HasCollectionboolReadWhether the document is a PDF Portfolio (has a /Collection dictionary in the catalog).
HasDestinationsboolReadWhether the document has named destinations.
HasLayersboolReadWhether the document has optional content (layers).
HasStructTreeboolReadWhether the document has a structure tree.
EnableObjectUnloadboolRead/WriteWhether to unload large objects after use to reduce memory pressure.
EncryptMetadataboolRead/WriteWhether the next encryption carries the document’s METADATA with everything else, or leaves the packet in the clear for a reader that indexes it without the password.
OptimizeSizeboolRead/WriteGets or sets a flag indicating whether the document should be optimized for size on save.
EmbedStandardFontsboolRead/WriteWhen true, the standard 14 PostScript fonts (Helvetica / Times / Courier × 4 styles + Symbol + ZapfDingbats) are embedded into the saved document so the output renders identically without relying on viewer-side font fallbacks.
IgnoreCorruptedObjectsboolRead/WriteWhen true, the parser tolerates corrupted indirect-object declarations (extra/garbled bytes between objects) instead of throwing.
IsLicensedboolReadWhether a license is currently applied.
IsEncryptedboolReadWhether the document is encrypted.
IsDecryptedboolReadWhether the document has been successfully decrypted (i.e., the decryptor was initialised).
BackgroundColor?Read/WriteDocument-wide background colour painted on every page before content during Save.
ActionsAnnotations.DocumentActionCollectionReadCatalog /AA additional-action dictionary.
CustomSecurityHandlerSecurity.ICustomSecurityHandler?ReadStored custom security handler when set via the ICustomSecurityHandler Encrypt overloads.
AllowReusePageContentboolRead/WriteWhether the saver may reuse identical page-content streams.
EnableNotificationLoggingboolRead/WriteWhether the document emits notification log entries.
HandleSignatureChangeboolRead/WriteWhether signature fields fire change-handlers when their dict mutates.
HideMenubarboolRead/WriteViewer preference: hide the menu bar (/ViewerPreferences /HideMenubar).
HideToolBarboolRead/WriteViewer preference: hide the toolbar (/ViewerPreferences /HideToolbar).
HideWindowUIboolRead/WriteViewer preference: hide window UI chrome (/ViewerPreferences /HideWindowUI).
IsXrefGapsAllowedboolRead/WriteAllow gaps in the xref table during parse.
PickTrayByPdfSizeboolRead/WriteViewer preference: pick the paper tray by PDF page size (/ViewerPreferences /PickTrayByPDFSize).
FileSizeLimitToMemoryLoadingintRead/WriteMaximum file size (bytes) loaded entirely into memory.
DefaultNodesNumInSubtreesbyteReadDefault page-tree branching factor (PDF table 30 /Count vs /Kids ratio).

Methods

SignatureDescription
Create()Create a new empty PDF document.
RemoveNamedDestination(name: string)Remove a named destination from the document’s /Names → /Dests name tree.
ImportPage(source: Document, pageNumber: int, insertAt: int)Import a single page from another document into this document.
Dispose()Calls Dispose on this Document instance.
PlaceOnFinalPage(pageNumber: int, fragment: Text.TextFragment)Place an explicitly positioned fragment on the page that will bear pageNumber ONCE THE DOCUMENT HAS PAGINATED, rather than on whatever page holds that number right now.
AddEmbeddedFile(fileName: string, fileData: byte[]?, description: string?, mimeType: string?, compress: bool, creationDate: DateTime?, modDate: DateTime?)Calls AddEmbeddedFile(fileName, fileData, description, mimeType, compress, creationDate, modDate) on this Document instance.
GetCatalogValue(key: string)Reads a value from the document’s /Catalog by name.
GetOrCreateMetadata()Get or create XMP metadata for this document.
SetVersion(version: string)Set the PDF version for the output header (e.g., “1.7”, “2.0”).
Document()Create a new empty PDF document (parameterless constructor, matches public API).
Document(filename: string)Open a PDF document from a file path.
Document(version: PdfVersion)Create an empty document targeting the given PDF specification version.
Document(filename: string, password: string)Open an encrypted PDF document from a file path with a password.
Document(filename: string, certOptions: Security.CertificateEncryptionOptions)Open a Public-Key security-handler encrypted document from a file path using the supplied certificate-encryption options.
Document(filename: string, certOptions: Security.CertificateEncryptionOptions, isManagedStream: bool)File ctor with cert options and the isManagedStream flag (stored only — the in-memory byte buffer is always reusable).
Document(input: Stream, certOptions: Security.CertificateEncryptionOptions)Open a Public-Key security-handler encrypted document from a stream.
Document(input: Stream, certOptions: Security.CertificateEncryptionOptions, isManagedStream: bool)Stream ctor with cert options and the isManagedStream flag.
Document(input: Stream, password: string)Open an encrypted PDF document from a stream with a password.
Document(path: string, options: HtmlLoadOptions)Open an HTML file and convert to PDF using the given options.
Document(stream: Stream, options: HtmlLoadOptions)Open an HTML stream and convert to PDF using the given options.
Document(path: string, options: TxtLoadOptions)Open a plain-text (.txt) file and convert it to PDF using the given options.
Document(stream: Stream, options: TxtLoadOptions)Open a plain-text stream and convert it to PDF using the given options.
Document(path: string, options: MdLoadOptions)Open a Markdown file and convert it to PDF using the given options.
Document(stream: Stream, options: MdLoadOptions)Open a Markdown stream and convert it to PDF using the given options.
Document(path: string, options: SvgLoadOptions)Open an SVG file and convert it to PDF using the given options.
Document(stream: Stream, options: SvgLoadOptions)Open an SVG stream and convert it to PDF using the given options.
Open(data: byte[])Open a PDF document from a byte array.
Open(data: byte[], password: string)Open an encrypted PDF document from a byte array with a password.
Open(path: string)Open a PDF document from a file path.
Open(path: string, password: string)Open an encrypted PDF document from a file path with a password.
Document(input: Stream)Open a PDF document from a stream (constructor, matches public API).
Open(stream: Stream)Open a PDF document from a stream.
Open(stream: Stream, password: string)Open an encrypted PDF document from a stream with a password.
Open(path: string, options: MdLoadOptions)Open a Markdown file and convert it to a PDF document.
Open(data: byte[], options: MdLoadOptions)Open a Markdown file from bytes and convert it to a PDF document.
Open(path: string, options: SvgLoadOptions)Open an SVG file and convert it to a PDF document.
Open(path: string, options: HtmlLoadOptions)Open an HTML file and convert it to a PDF document.
Open(data: byte[], options: HtmlLoadOptions)Open an HTML file from bytes and convert it to a PDF document.
Open(data: byte[], options: SvgLoadOptions)Open an SVG file from bytes and convert it to a PDF document.
BindXml(file: string)Bind an Aspose.Pdf XML template to this document.
BindXml(stream: Stream)Bind an Aspose.Pdf XML template from a stream to this document.
BindXml(xmlStream: Stream, xslStream: Stream?)Bind an Aspose.Pdf XML template from a stream with an optional XSLT stylesheet stream.
BindXml(xmlStream: Stream, xslStream: Stream?, settings: System.Xml.XmlReaderSettings?)Bind an Aspose.Pdf XML template from a stream with an optional XSLT stylesheet stream and explicit XmlReader settings for the input parse.
BindXml(xmlFile: string, xslFile: string?)Bind an Aspose.Pdf XML template with an optional XSLT stylesheet.
LinearizeDocument()Linearize the document for fast web viewing.
RemoveFormField(fieldName: string)Remove a form field by name from all pages and the AcroForm.
Convert(callback: CallBackGetHocr, flattenImages: bool)Render each page to an image, hand it to the OCR callback, then overlay the returned hOCR text on the page as an invisible text layer (text rendering mode 3, /Tr 3) so the PDF becomes searchable / copy-pasteable.
Convert(callback: CallBackGetHocrWithPage, flattenImages: bool)Calls Convert(callback, flattenImages) on this Document instance.
Convert(callback: CallBackGetHocr)Convenience overload: same as Convert(CallBackGetHocr, bool) with flattenImages = false.
Convert(callback: CallBackGetHocrWithPage)Convenience overload of Convert(CallBackGetHocrWithPage, bool) with flattenImages = false.
MergeDocuments(documents)Represents a PDF document. This is the main entry point for the library.
MergeDocuments(files)Calls MergeDocuments(files) on this Document instance.
Merge(documents)Merge every page of each documents entry into this document, preserving source order.
Merge(files)Merge every page of each file in files into this document.
Merge(mergeOptions: MergeOptions, documents)Merge with explicit options.
Merge(mergeOptions: MergeOptions, files)Merge files with explicit options — same semantics as the Document[] overload.
MergeDocuments(mergeOptions: MergeOptions, files)Static Merge: build a fresh Document containing every page from files, then apply mergeOptions.
SendTo(device: Devices.DocumentDevice, output: Stream)Render this document through device into output — delegates to Stream).
SendTo(device: Devices.DocumentDevice, outputFileName: string)File overload of DocumentDevice, Stream).
SendTo(device: Devices.DocumentDevice, fromPage: int, toPage: int, output: Stream)Render a page range — delegates to the device’s page-range Process overload.
SendTo(device: Devices.DocumentDevice, fromPage: int, toPage: int, outputFileName: string)File-pair page-range overload.
GetObjectById(id: string)Resolve a PDF object by string id.
Convert(fixup: Fixup, outputLog: Stream, onlyValidation: bool, parameters)Run a pre-defined fixup operation.
Convert(fixup: Fixup, outputLog: string, onlyValidation: bool, parameters)File-log overload of Convert(Fixup, Stream, bool, object[]).
Convert(fixup: Fixup, outputLog: string)Apply fixup and write a log to outputLog (the common, non-validation case).
Convert(srcFileName: string, loadOptions: LoadOptions, dstFileName: string, saveOptions: SaveOptions)Open srcFileName via the load-options hierarchy (HtmlLoadOptions / SvgLoadOptions / MdLoadOptions all derive from LoadOptions) and save to dstFileName.
Convert(srcFileName: string, loadOptions: LoadOptions, dstStream: Stream, saveOptions: SaveOptions)Opens the source file with the given load options (HTML, SVG, Markdown and so on) and writes the result to a stream.
Convert(srcStream: Stream, loadOptions: LoadOptions, dstFileName: string, saveOptions: SaveOptions)Reads the source from a stream with the given load options (HTML, SVG, Markdown and so on) and saves the result to a file.
Convert(srcStream: Stream, loadOptions: LoadOptions, dstStream: Stream, saveOptions: SaveOptions)Reads the source from a stream with the given load options (HTML, SVG, Markdown and so on) and writes the result to another stream.
Encrypt(userPassword: string, ownerPassword: string, permissions: DocumentPrivilege?, algorithm: CryptoAlgorithm)Encrypt the document with the specified algorithm, passwords, and permissions.
Encrypt(userPassword: string, ownerPassword: string, privileges: DocumentPrivilege?, cryptoAlgorithm: CryptoAlgorithm, usePdf20: bool)Encrypt overload accepting an explicit usePdf20 flag.
Encrypt(userPassword: string, ownerPassword: string, permissions: Aspose.Pdf.Permissions, cryptoAlgorithm: CryptoAlgorithm, usePdf20: bool)Encrypt overload accepting the Permissions flags enum and an explicit usePdf20 flag.
Encrypt(userPassword: string, ownerPassword: string, permissions: Aspose.Pdf.Permissions, cryptoAlgorithm: CryptoAlgorithm)Encrypt overload accepting the legacy Permissions flags enum.
ChangePasswords(ownerPassword: string, newUserPassword: string, newOwnerPassword: string)Change the password on the bound document.
Decrypt()Remove encryption from the document.
Optimize()Optimize document resources by removing unused objects and deduplicating streams, and linearize the document for fast web view.
ProcessParagraphs()Process paragraphs in the document (layout step before save).
Convert(options: PdfFormatConversionOptions)Convert the document to the specified PDF/A conformance level.
Convert(outputLogFileName: string, format: PdfFormat, action: ConvertErrorAction)Convert the document to a specific PDF/A format with a log file.
Convert(outputLogFileName: string, format: PdfFormat, action: ConvertErrorAction, transparencyAction: ConvertTransparencyAction)Convert the document to a specific PDF/A format with a log file, specifying transparency handling.
Convert(outputLogStream: Stream, format: PdfFormat, action: ConvertErrorAction)Convert the document to a specific PDF/A format with a log stream.
Convert(outputLogStream: Stream, format: PdfFormat, action: ConvertErrorAction, transparencyAction: ConvertTransparencyAction)Stream-log overload with explicit transparency action.
GetPdfACompliance()Returns the PDF/A compliance level detected from XMP metadata, or null if not a PDF/A document.
Flatten()Flatten all form fields — renders their visual appearance into page content and removes the interactive form.
Flatten(flattenSettings: Forms.Form.FlattenSettings)Flatten with explicit settings.
AddNamedDestination(name: string, destination: DestinationArray)Add a named destination to the document using the /Names → /Dests name tree.
ImportPages(source: Document, pageNumbers: int[], insertAt: int)Import specified pages from another document into this document.
RemovePdfaCompliance()Remove PDF/A compliance identification from XMP metadata.
IsRepairNeeded(options: RepairOptions)Check whether the document needs repair.
Repair()Repair the document by re-serializing it.
HasIncrementalUpdate()Returns true if this PDF uses incremental updates (has multiple %%EOF markers).
OptimizeResources()Shrinks the document using the default settings: unused resources and objects are dropped, duplicate streams are linked and duplicate images are removed.
OptimizeResources(strategy: Aspose.Pdf.Optimization.OptimizationOptions)Shrinks the document using the given settings (unused resources and objects, duplicate streams and images, image compression and downsampling, font subsetting or unembedding, metadata removal).
ToArray()Serialize the document into a fresh byte array.
Encrypt(userPassword: string, ownerPassword: string, privileges: Facades.DocumentPrivilege, customHandler: Security.ICustomSecurityHandler)Encrypt with a custom security handler, which supplies the /O and U values, the file key and the per-object cipher in place of the Standard handler.
Encrypt(userPassword: string, ownerPassword: string, permissions: Aspose.Pdf.Permissions, customHandler: Security.ICustomSecurityHandler)Same — Permissions-typed overload.
Encrypt(permissions: Aspose.Pdf.Permissions, cryptoAlgorithm: CryptoAlgorithm, publicCertificates: System.Collections.Generic.IList<System.Security.Cryptography.X509Certificates.X509Certificate2>)Encrypt with a list of recipient public certificates (Public-Key /Filter security handler).
SetDefaultFileSizeLimitToMemoryLoading()Reset FileSizeLimitToMemoryLoading to its built-in default.
SetTitle(title: string)Update the /Info /Title entry.
PageNodesToBalancedTree(nodesNumInSubtrees: byte)Rebuild the page tree so each subtree has nodesNumInSubtrees children.
RemoveMetadata()Remove all metadata: the document information and every XMP packet - the document’s, and those of its pages, images, fonts and forms.
RemovePdfUaCompliance()Withdraw the document’s claim to PDF/UA-1 conformance: the pdfuaid entries in the XMP packet and the extension schema that declares them.
FlattenTransparency()Flatten transparency to opaque graphics.
SplitSharedImages(pages)Give each of the passed pages a private copy of the image XObjects they share, so an in-place edit reached through one page (e.g.
Repair(options: RepairOptions)Apply the requested repair pass.
ExportAnnotationsToXfdf(stream: Stream)Export every annotation in the document to an XFDF stream.
ExportAnnotationsToXfdf(fileName: string)Export every annotation in the document to an XFDF file.
ImportAnnotationsFromXfdf(stream: Stream)Import annotations from an XFDF stream into the document.
ImportAnnotationsFromXfdf(fileName: string)Import annotations from an XFDF file into the document.
ConvertPageToPNGMemoryStream(page: Page)Convert one page to a PNG memory stream.
SaveXml(file: string)Write the document’s generator DOM as Aspose.Pdf template XML — the counterpart of BindXml(string), so a document can be saved and read back.
SaveXml(stream: Stream)Write the generator DOM as template XML to a stream.
Check(doRepair: bool)Validate / repair the document.
Check(doRepair: bool, output: System.IO.Stream)Validate the document’s page content streams and write an XML report of any problems to output.
LoadFrom(filename: string, options: LoadOptions)Async file load wrapper (currently synchronous).
Document(filename: string, isManagedStream: bool)Single-arg ctor whose parameter keeps the established name filename.
Document(input: Stream, isManagedStream: bool)Stream ctor with managed-stream flag.
Document(input: Stream, password: string, isManagedStream: bool)Stream ctor with password + managed-stream flag.
Document(filename: string, password: string, isManagedStream: bool)File ctor with password + managed-stream flag.
Document(input: Stream, password: string, customSecurityHandler: Aspose.Pdf.Security.ICustomSecurityHandler)Stream ctor with password + ICustomSecurityHandler.
Document(input: Stream, password: string, isManagedStream: bool, customSecurityHandler: Aspose.Pdf.Security.ICustomSecurityHandler)Stream ctor with password + managed-stream + ICustomSecurityHandler.
Document(filename: string, password: string, customSecurityHandler: Aspose.Pdf.Security.ICustomSecurityHandler)File ctor with password + ICustomSecurityHandler.
Document(filename: string, password: string, isManagedStream: bool, customSecurityHandler: Aspose.Pdf.Security.ICustomSecurityHandler)File ctor with password + managed-stream + ICustomSecurityHandler.
Document(input: Stream, options: LoadOptions)Stream ctor with LoadOptions.
Document(filename: string, options: LoadOptions)File ctor with LoadOptions — same runtime dispatch as the stream overload.
FreeMemory()Clears memory.
Save()Save the document in-place: writes back to the file the document was opened from (FileName), or performs an incremental save to the original source stream when the document was opened from a writable FileStream.
Save(outputFileName: string)Save the document to a file.
Save(outputFileName: string, format: SaveFormat)Save the document to a file in the specified format.
Save(outputStream: Stream, format: SaveFormat)Save the document to a stream in the specified format.
Save(output: Stream, options: HtmlSaveOptions)Save the document as HTML to a stream using the specified options.
Save(path: string, options: HtmlSaveOptions)Save the document as HTML to a file using the specified options.
Save(outputStream: Stream, options: SaveOptions)Save to a stream using general SaveOptions (stub type from Aspose.Pdf namespace).
Save(outputFileName: string, options: SaveOptions)Save to a file using general SaveOptions (stub type from Aspose.Pdf namespace).
Save(options: SaveOptions)Save the document using the configured SaveOptions.
SaveAsync(cancellationToken: System.Threading.CancellationToken)Async wrapper around Save().
SaveAsync(options: SaveOptions, cancellationToken: System.Threading.CancellationToken)Async wrapper around Save(SaveOptions).
SaveAsync(output: Stream, cancellationToken: System.Threading.CancellationToken)Async wrapper around Save(Stream).
SaveAsync(outputStream: Stream, format: SaveFormat, cancellationToken: System.Threading.CancellationToken)Async wrapper around Save(Stream, SaveFormat).
SaveAsync(outputStream: Stream, options: SaveOptions, cancellationToken: System.Threading.CancellationToken)Async wrapper around Save(Stream, SaveOptions).
SaveAsync(outputFileName: string, cancellationToken: System.Threading.CancellationToken)Async wrapper around Save(string).
SaveAsync(outputFileName: string, format: SaveFormat, cancellationToken: System.Threading.CancellationToken)Async wrapper around Save(string, SaveFormat).
SaveAsync(outputFileName: string, options: SaveOptions, cancellationToken: System.Threading.CancellationToken)Async wrapper around Save(string, SaveOptions).
Save(output: Stream)Save the document to a stream.
Validate()Validate the document structure and return any issues found.
Validate(outputLogStream: Stream, format: PdfFormat)Validate the document against a specific PDF format (PDF/A, PDF/X).
Validate(options: PdfFormatConversionOptions)Validate the document against a specific PDF format using conversion options.
Validate(outputLogFileName: string, format: PdfFormat)Validate the document against a specific PDF format, writing log to a file.
GetOrCreateViewerPreferences()Get or create viewer preferences for this document.
GetXmpMetadata(stream: Stream)Write the document’s XMP /Metadata packet to stream.
SetXmpMetadata(stream: Stream)Replace the document’s XMP /Metadata packet from stream.

See Also

 English