GetDocumentConformance() Method (PdfDocument)
In This Topic
Returns the PDF document conformance from the PDF document metadata.
Syntax
Return Value
The PDF document conformance.
Remarks
The method supports the detection of following PDF/A family standards:
- PDF/A-1a
- PDF/A-1b
- PDF/A-2a
- PDF/A-2b
- PDF/A-2u
- PDF/A-3a
- PDF/A-3b
- PDF/A-3u
Example
Here is an example that shows how to get the PDF document conformance from the PDF document metadata:
''' <summary>
''' Returns the PDF document conformance from the PDF document metadata.
''' </summary>
''' <param name="pdfFilename">The filename of PDF document.</param>
Public Shared Sub GetDocumentConformanceInfo(pdfFilename As String)
' open PDF document
Using document As New Vintasoft.Imaging.Pdf.PdfDocument(pdfFilename)
' get the PDF document conformance
Dim conformance As Vintasoft.Imaging.Pdf.PdfDocumentConformance = document.GetDocumentConformance()
' output information about the PDF document conformance
If conformance = Vintasoft.Imaging.Pdf.PdfDocumentConformance.Undefined Then
System.Console.WriteLine("Conformance is undefined.")
Else
System.Console.WriteLine(String.Format("Document metadata declares conformance with {0} format.", conformance))
End If
End Using
End Sub
/// <summary>
/// Returns the PDF document conformance from the PDF document metadata.
/// </summary>
/// <param name="pdfFilename">The filename of PDF document.</param>
public static void GetDocumentConformanceInfo(string pdfFilename)
{
// open PDF document
using (Vintasoft.Imaging.Pdf.PdfDocument document =
new Vintasoft.Imaging.Pdf.PdfDocument(pdfFilename))
{
// get the PDF document conformance
Vintasoft.Imaging.Pdf.PdfDocumentConformance conformance = document.GetDocumentConformance();
// output information about the PDF document conformance
if (conformance == Vintasoft.Imaging.Pdf.PdfDocumentConformance.Undefined)
{
System.Console.WriteLine("Conformance is undefined.");
}
else
{
System.Console.WriteLine(string.Format("Document metadata declares conformance with {0} format.",
conformance));
}
}
}
Requirements
Target Platforms: .NET9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5
See Also