Docotic.Pdf Library Help > Samples > General operations > Create PDF/A compatible document

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.

C#
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.

            string pathToFile = "PDFA.pdf";

            using (PdfDocument pdf = new PdfDocument())
            {
                pdf.SaveOptions.ProducePdfA = true;

                pdf.Save(pathToFile);
            }

            Process.Start(pathToFile);
        }
    }
}
VB
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 pathToFile As String = "PDFA.pdf"

            Using pdf As New PdfDocument()
                pdf.SaveOptions.ProducePdfA = True

                pdf.Save(pathToFile)
            End Using

            Process.Start(pathToFile)
        End Sub
    End Class
End Namespace