Use Cases — Aspose.PDF FOSS for .NET
PDF Document Generation and Archival
Many .NET applications need to produce PDF documents programmatically — receipts, invoices, reports, or compliance records — without relying on paid libraries or external tools. Aspose.PDF FOSS for .NET lets you create a Document using Document.Create(), build the page tree, add annotations, and persist the result with Document.Save() or Document.ToArray(). Because the library requires no Adobe Acrobat or Ghostscript installation, it integrates cleanly into containerised CI/CD pipelines and serverless functions.
Key classes: Document, Page, PageCollection
PDF Merging and Batch Assembly
Document management systems frequently need to combine multiple PDF files — appending a cover page, merging form responses, or bundling reports into a single archive. Aspose.PDF FOSS exposes Document.Merge() and Document.MergeDocuments() for combining arrays of Document objects or file paths in a single call. The merged document can then be saved to a stream or file.
Key classes: Document, MergeOptions
Annotation Workflows
Review and approval workflows rely on annotations: highlights, stamps, text notes, link actions, and watermarks. Aspose.PDF FOSS exposes AnnotationCollection on each Page, with methods to add LinkAnnotation, TextAnnotation, HighlightAnnotation, StampAnnotation, WatermarkAnnotation, CaretAnnotation, and InkAnnotation objects. Changes are persisted by saving the document back with Document.Save().
Key classes: Document, Page, AnnotationCollection, LinkAnnotation, WatermarkAnnotation, StampAnnotation
AcroForm Field Formatting
PDF forms often require field values to be displayed with consistent formatting: dates in locale-specific patterns, currency amounts with the correct symbol and decimal separator, or percentages with a fixed precision. The JavascriptExtensions classes in Aspose.PDF FOSS implement the PDF JavaScript AF_* formatting functions on the server side, eliminating the need for a JavaScript engine. FieldDateTimeFormatter.Format() converts a raw date string according to an Acrobat date format pattern, FieldNumberCurrencyFormatter.Format() formats a numeric string as a currency value, and FieldNumberPercentFormatter.Format() formats a number as a percentage.
Key classes: FieldDateTimeFormatter, FieldNumberCurrencyFormatter, FieldNumberPercentFormatter
Hyperlink and Navigation Action Embedding
Interactive PDFs use PDF actions to navigate within the document or launch external URLs. Aspose.PDF FOSS supports PdfAction.CreateUri() for web links, PdfAction.CreateGoTo() for page-indexed navigation, PdfAction.CreateNamed() for standard named actions (e.g., NextPage, PrevPage), and PdfAction.CreateJavaScript() for scripted interactions. Actions are attached to LinkAnnotation objects and round-trip faithfully through open/save cycles.
Key classes: PdfAction, LinkAnnotation, GoToAction, NamedAction, JavascriptAction
Document Inspection and Metadata Extraction
Tooling that audits PDF content — checking page dimensions, listing annotations, reading document actions, or enumerating embedded JavaScript — can use Aspose.PDF FOSS’s read-only API surface. Document.Pages exposes the PageCollection, Page.Annotations provides typed access to each annotation, and Document.JavaScript holds the document-level JavaScript collection. This makes the library suitable for compliance scanners, content auditors, and automated report-verification pipelines.
Key classes: Document, Page, PageCollection, AnnotationCollection, JavaScriptCollection