This sample shows how to create PDF/A compatible documents using Docotic.Pdf library.
To create a PDF/A 1-b compatible documents just use PdfDocument.SaveOptions.ProducePDFA property.
using System.Diagnostics; namespace BitMiracle.Docotic.Pdf.Samples { public static class PDFA { public static void Main() { // NOTE: // When used in trial mode, the library imposes some restrictions. // Please visit http://bitmiracle.com/pdf-library/trial-restrictions.aspx // for more information. PdfDocument pdf = new PdfDocument(); pdf.SaveOptions.ProducePdfA = true; string pathToFile = "PDFA.pdf"; pdf.Save(pathToFile); pdf.Dispose(); Process.Start(pathToFile); } } }
Imports System.Diagnostics Imports BitMiracle.Docotic.Pdf Namespace BitMiracle.Docotic.Pdf.Samples Public NotInheritable Class PDFA Public Shared Sub Main() ' NOTE: ' When used in trial mode, the library imposes some restrictions. ' Please visit http://bitmiracle.com/pdf-library/trial-restrictions.aspx ' for more information. Dim pdf As New PdfDocument() pdf.SaveOptions.ProducePdfA = True Dim pathToFile As String = "PDFA.pdf" pdf.Save(pathToFile) pdf.Dispose() Process.Start(pathToFile) End Sub End Class End Namespace
