public static void Main() { // The path to the documents directory. string dataDir = Path.GetFullPath("../../../Data/"); //create PdfAnnotationEditor object PdfAnnotationEditor AnnotationEditor = new PdfAnnotationEditor(); //open PDF document AnnotationEditor.BindPdf(dataDir+ "input.pdf"); //import annotations FileStream fileStream = new System.IO.FileStream(dataDir+ "annotations.xfdf", System.IO.FileMode.Create); Enum[] annotType = { AnnotationType.FreeText, AnnotationType.Line }; AnnotationEditor.ExportAnnotationsXfdf(fileStream, 1, 5, annotType); //save output PDF AnnotationEditor.Save(dataDir+ "output.pdf"); }
public static void Main() { // The path to the documents directory. string dataDir = Path.GetFullPath("../../../Data/"); //create PdfAnnotationEditor object PdfAnnotationEditor AnnotationEditor = new PdfAnnotationEditor(); //open PDF document AnnotationEditor.BindPdf(dataDir + "input.pdf"); //import annotations FileStream fileStream = new System.IO.FileStream(dataDir + "annotations.xfdf", System.IO.FileMode.Create); Enum[] annotType = { AnnotationType.FreeText, AnnotationType.Line }; AnnotationEditor.ExportAnnotationsXfdf(fileStream, 1, 5, annotType); //save output PDF AnnotationEditor.Save(dataDir + "output.pdf"); }
public static void Run() { // The path to the documents directory. string dataDir = RunExamples.GetDataDir_AsposePdfFacades_Annotations(); //create PdfAnnotationEditor object PdfAnnotationEditor AnnotationEditor = new PdfAnnotationEditor(); //open PDF document AnnotationEditor.BindPdf(dataDir + "ExportAnnotations.pdf"); //import annotations FileStream fileStream = new System.IO.FileStream(dataDir + "annotations.xfdf", System.IO.FileMode.Create); Enum[] annotType = { AnnotationType.FreeText, AnnotationType.Line }; AnnotationEditor.ExportAnnotationsXfdf(fileStream, 1, 5, annotType); //save output PDF AnnotationEditor.Save(dataDir + "ExportAnnotations_out.pdf"); }
public static void Run() { // The path to the documents directory. string dataDir = RunExamples.GetDataDir_AsposePdfFacades_Annotations(); //create PdfAnnotationEditor object PdfAnnotationEditor AnnotationEditor = new PdfAnnotationEditor(); //open PDF document AnnotationEditor.BindPdf(dataDir+ "ExportAnnotations.pdf"); //import annotations FileStream fileStream = new System.IO.FileStream(dataDir+ "annotations.xfdf", System.IO.FileMode.Create); Enum[] annotType = { AnnotationType.FreeText, AnnotationType.Line }; AnnotationEditor.ExportAnnotationsXfdf(fileStream, 1, 5, annotType); //save output PDF AnnotationEditor.Save(dataDir+ "ExportAnnotations_out.pdf"); }
public static void Run() { // ExStart:AnnotationsExport // The path to the documents directory. string dataDir = RunExamples.GetDataDir_AsposePdfFacades_TechnicalArticles(); // Create an object of PdfAnnotationEditor class PdfAnnotationEditor editor = new PdfAnnotationEditor(); // Bind input PDF file editor.BindPdf(dataDir + "inFile.pdf"); // Create a file stream for output XFDF file to export annotations FileStream fileStream = new FileStream(dataDir + "exportannotations.xfdf", FileMode.Create, FileAccess.Write); // Create an enumeration of all the annotation types which you want to export Enum[] annoType = { AnnotationType.Text }; // Export annotations of specified type(s) to XFDF file editor.ExportAnnotationsXfdf(fileStream, 1, 5, annoType); // ExEnd:AnnotationsExport }
public static void Run() { // ExStart:AnnotationsExport // The path to the documents directory. string dataDir = RunExamples.GetDataDir_AsposePdfFacades_TechnicalArticles(); // Create an object of PdfAnnotationEditor class PdfAnnotationEditor editor = new PdfAnnotationEditor(); // Bind input PDF file editor.BindPdf(dataDir + "inFile.pdf"); // Create a file stream for output XFDF file to export annotations FileStream fileStream = new FileStream(dataDir + "exportannotations.xfdf", FileMode.Create, FileAccess.Write); // Create an enumeration of all the annotation types which you want to export string[] annoType = { AnnotationType.Text.ToString() }; // Export annotations of specified type(s) to XFDF file editor.ExportAnnotationsXfdf(fileStream, 1, 5, annoType); // ExEnd:AnnotationsExport }
public static void Run() { // ExStart:ExportAnnotations // The path to the documents directory. string dataDir = RunExamples.GetDataDir_AsposePdfFacades_Annotations(); // Create PdfAnnotationEditor object PdfAnnotationEditor AnnotationEditor = new PdfAnnotationEditor(); // Open PDF document AnnotationEditor.BindPdf(dataDir + "ExportAnnotations.pdf"); // Export annotations FileStream fileStream = new System.IO.FileStream(dataDir + "exportannotations.xfdf", System.IO.FileMode.Create); string[] annotType = { AnnotationType.FreeText.ToString(), AnnotationType.Line.ToString() }; AnnotationEditor.ExportAnnotationsXfdf(fileStream, 1, 5, annotType); // Save output PDF AnnotationEditor.Save(dataDir + "ExportAnnotations_out.pdf"); fileStream.Flush(); fileStream.Close(); // ExEnd:ExportAnnotations }