Class PdfConformanceExtension
Inheritance
System.Object
PdfConformanceExtension
Namespace: Syncfusion.Pdf
Assembly: Syncfusion.Pdf.Imaging.Portable.dll
Syntax
public static class PdfConformanceExtension : Object
Methods
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)