Write the conforming PDF document.




void Save(Doc doc, string path)
void Save(Doc doc, Stream stream)

[Visual Basic]
Sub Save(doc As Doc, path As String)
Sub Save(doc As Doc, stream As Stream)

Throws Exceptions may throw Exception()



Name Description
doc The document.
path The destination file path.
stream The destination stream.




This method writes the document in a conforming PDF format according to the Conformance property. Any conformance error is reported in the Errors property after the method finishes.




Here we save a document in PDF/A-1b format.


using (Doc doc = new Doc()) {   doc.Read(Server.MapPath("mypics/Acrobat.pdf"));   string thePath = Server.MapPath("pdfa.pdf");   using (PdfConformityOperation theOperation = new PdfConformityOperation()) {     theOperation.Conformance = PdfConformance.PdfA1b;     theOperation.Save(doc, thePath);     if (theOperation.Errors.Count > 0) {       Console.WriteLine("Errors:");       for (int i = 0; i < theOperation.Errors.Count; ++i)         Console.WriteLine(theOperation.Errors[i]);     }   } }