alexa
menu

WinUI

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download

    Show / Hide Table of Contents

    Class PdfConformanceExtension

    Inheritance
    System.Object
    PdfConformanceExtension
    Namespace: Syncfusion.Pdf
    Assembly: Syncfusion.Pdf.Imaging.NET.dll
    Syntax
    public static class PdfConformanceExtension : Object

    Methods

    ConvertToPDFA(PdfLoadedDocument, PdfConformanceOptions)

    Convert the existing PDF document to PDF/A document.

    Declaration
    public static void ConvertToPDFA(this PdfLoadedDocument ldoc, PdfConformanceOptions options)
    Parameters
    Type Name Description
    PdfLoadedDocument ldoc
    PdfConformanceOptions options
    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 
    PdfConformanceOptions options = new PdfConformanceOptions();
    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 
    PdfConformanceOptions options = new PdfConformanceOptions()
    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)

    ConvertToPDFA(PdfLoadedDocument, PdfConformanceLevel)

    Convert the existing PDF document to PDF/A document.

    Declaration
    public static void ConvertToPDFA(this PdfLoadedDocument ldoc, PdfConformanceLevel conformanceLevel)
    Parameters
    Type Name Description
    PdfLoadedDocument ldoc
    PdfConformanceLevel conformanceLevel
    Examples
    //Load an existing PDF document
    FileStream docStream = new FileStream(@"Input.pdf", FileMode.Open, FileAccess.Read);
    PdfLoadedDocument doc = new PdfLoadedDocument(docStream);
    //Sample level Font event handling
    doc.SubstituteFont += LoadedDocument_SubstituteFont;
    //Convert the loaded document to PDF/A document
    doc.ConvertToPDFA(PdfConformanceLevel.Pdf_A1B);
    MemoryStream stream = new MemoryStream();
    //Save the document
    doc.Save(stream);
    //Close the document
    doc.Close(true);
    'Load an existing PDF document
    Dim docStream As FileStream = New FileStream("Input.pdf", FileMode.Open, FileAccess.Read)
    Dim document As New PdfLoadedDocument(docStream)
    document.SubstituteFont += LoadedDocument_SubstituteFont
    'Convert the loaded document to PDF/A document
    document.ConvertToPDFA(PdfConformanceLevel.Pdf_A1B)
    Dim stream As MemoryStream = New MemoryStream()
    'Save the document
    doc.Save(stream)
    'Close the document.
    document.Close(True)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved