Introduction
PDF/A is a special topic not much can be found about, so we have covered the creation of PDF/A documents our recent blog post. Sometimes you may need to check whether the PDF document already uses PDF/A standard, and we’ll show how you can get this done using Apitron PDF Kit for .NET component.
Code sample (C#)
staticvoid Main(string[] args)
{
using (Stream fileStream = File.Open("../../Data/document.pdf",FileMode.Open))
{
using (FixedDocument doc = newFixedDocument(fileStream))
{
// PdfStandard property can be used to check whether the document
// uses PDFA standard. It will return PDfStandard.Default if the
// doc doesn't use PDFA or PdfStandard.PDFA if it does.
Console.WriteLine(string.Format("Document uses '{0}' standard",
Enum.GetName(typeof(PdfStandard),doc.PdfStandard)));
}
}
Console.ReadLine();
}
The output is shown below:
![]() |
Pic. 1 Checking document standard (PDF/A document) |
Conclusion
You can download the Apitron PDF Kit for .NET component from our websiteand try it out. In addition, you can also find more samples inside the component’s package. Should you have any questions, just send us an email and we’ll be happy to help.
Downloadable version of this article can be found by the following link [PDF].
Downloadable version of this article can be found by the following link [PDF].