menu

Document Processing

PdfConformanceOptions Class - C# PDF Library API Reference | Syncfusion

    Show / Hide Table of Contents

    PdfConformanceOptions Class

    Provides options for converting a document to PDF/A conformance.

    Inheritance
    System.Object
    PdfConformanceOptions
    Namespace: Syncfusion.Pdf.Parsing
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public class PdfConformanceOptions : Object
    Remarks

    The PdfConformanceOptions class allows you to specify various settings for converting a PDF document to meet PDF/A conformance standards.

    Constructors

    PdfConformanceOptions()

    Initializes a new instance of the PdfConformanceOptions class.

    Declaration
    public PdfConformanceOptions()

    Properties

    ConformanceLevel

    Gets or sets the PDF/A conformance level to apply to the document during conversion.

    Declaration
    public PdfConformanceLevel ConformanceLevel { get; set; }
    Property Value
    Type Description
    PdfConformanceLevel

    A PdfConformanceLevel value that specifies the conformance level. The default value is None.

    Remarks

    Specifies the PDF/A conformance level to ensure the document meets archival standards. Supported levels are defined by the PdfConformanceLevel enum.

    Examples
    //Load an existing PDF document
    PdfLoadedDocument doc = new PdfLoadedDocument("Input.pdf");
    //Sample level Font event handling
    doc.SubstituteFont += LoadedDocument_SubstituteFont;
    //Convert to PDF/A conformance 
    PdfConversionOptions options = new PdfConversionOptions();
    options.ConformanceLevel = PdfConformanceLevel.Pdf_A1B; 
    //Set the SubsetFonts or not 
    options.SubsetFonts = true; 
    doc.ConvertToPDFA(options); 
    //Save the document
    doc.Save("Output.pdf");
    //Close the document
    doc.Close(true);
    'Load an existing PDF document
    Dim doc As New PdfLoadedDocument("Input.pdf")
    doc.SubstituteFont += LoadedDocument_SubstituteFont
    'Convert to PDF/A conformance 
    PdfConversionOptions options = new PdfConversionOptions()
    options.ConformanceLevel = PdfConformanceLevel.Pdf_A1B
    'Set the SubsetFonts or not 
    options.SubsetFonts = true
    'Convert loaded document to PDF/A document
    doc.ConvertToPDFA(options)
    'Save the document
    doc.Save("Output.pdf")
    'Close the document.
    doc.Close(True)

    SubsetFonts

    Gets or sets a value indicating whether fonts are embedded as subsets in the document.

    Declaration
    public bool SubsetFonts { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if fonts should be embedded as subsets; otherwise, false. The default value is false.

    Remarks

    Embedding fonts as subsets includes only the glyphs used in the document, reducing file size and ensuring the document renders correctly on different devices.

    Examples
    //Load an existing PDF document
    PdfLoadedDocument doc = new PdfLoadedDocument("Input.pdf");
    //Sample level Font event handling
    doc.SubstituteFont += LoadedDocument_SubstituteFont;
    //Convert to PDF/A conformance 
    PdfConversionOptions options = new PdfConversionOptions();
    options.ConformanceLevel = PdfConformanceLevel.Pdf_A1B; 
    //Set the SubsetFonts or not 
    options.SubsetFonts = true; 
    doc.ConvertToPDFA(options); 
    //Save the document
    doc.Save("Output.pdf");
    //Close the document
    doc.Close(true);
    'Load an existing PDF document
    Dim doc As New PdfLoadedDocument("Input.pdf")
    doc.SubstituteFont += LoadedDocument_SubstituteFont
    'Convert to PDF/A conformance 
    PdfConversionOptions options = new PdfConversionOptions()
    options.ConformanceLevel = PdfConformanceLevel.Pdf_A1B
    'Set the SubsetFonts or not 
    options.SubsetFonts = true
    'Convert loaded document to PDF/A document
    doc.ConvertToPDFA(options)
    'Save the document
    doc.Save("Output.pdf")
    'Close the document.
    doc.Close(True)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved