Here we save a document in PDF/A-1b format.
[C#]
Doc theDoc =
...; string thePath = Server.MapPath("pdfa.pdf"); using(PdfConformityOperation
theOperation = new PdfConformityOperation())
{ theOperation.Conformance =
PdfConformance.PdfA1b; theOperation.Save(theDoc,
thePath);
if(theOperation.Errors.Count>0)
{ Console.WriteLine("Errors:"); for(int
i = 0; i<theOperation.Errors.Count;
++i) Console.WriteLine(theOperation.Errors[i]); } } [Visual
Basic]
Dim theDoc As Doc =
... Dim thePath As String = Server.MapPath("pdfa.pdf") Using
theOperation As New
PdfConformityOperation theOperation.Conformance =
PdfConformance.PdfA1b theOperation.Save(theDoc, thePath)
If
theOperation.Errors.Count > 0
Then Console.WriteLine("Errors:") For
i As Integer = 0 To theOperation.Errors.Count -
1 Console.WriteLine(theOperation.Errors(i)) Next End
If End Using
|