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.Open, System.IO.FileAccess.Read); Enum[] annotType = { AnnotationType.FreeText, AnnotationType.Line }; AnnotationEditor.ImportAnnotationFromXfdf(fileStream, 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 + "ImportAnnotations.pdf"); //import annotations FileStream fileStream = new System.IO.FileStream(dataDir + "annotations.xfdf", System.IO.FileMode.Open, System.IO.FileAccess.Read); Enum[] annotType = { AnnotationType.FreeText, AnnotationType.Line }; AnnotationEditor.ImportAnnotationFromXfdf(fileStream, annotType); //save output PDF AnnotationEditor.Save(dataDir + "ImportAnnotations_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+ "ImportAnnotations.pdf"); //import annotations FileStream fileStream = new System.IO.FileStream(dataDir+ "annotations.xfdf", System.IO.FileMode.Open, System.IO.FileAccess.Read); Enum[] annotType = { AnnotationType.FreeText, AnnotationType.Line }; AnnotationEditor.ImportAnnotationFromXfdf(fileStream, annotType); //save output PDF AnnotationEditor.Save(dataDir + "ImportAnnotations_out.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.Open, System.IO.FileAccess.Read); Enum[] annotType = { AnnotationType.FreeText, AnnotationType.Line }; AnnotationEditor.ImportAnnotationFromXfdf(fileStream, annotType); //save output PDF AnnotationEditor.Save(dataDir + "output.pdf"); }
public static void Run() { // ExStart:AnnotationsImport // 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 input XFDF file to import annotations FileStream fileStream = new FileStream(dataDir + "exportannotations.xfdf", FileMode.Open, FileAccess.Read); // Create an enumeration of all the annotation types which you want to import Enum[] annType = { AnnotationType.Text }; // Import annotations of specified type(s) from XFDF file editor.ImportAnnotationFromXfdf(fileStream, annType); // Save output pdf file editor.Save(dataDir + "ImportAnnotations_out.pdf"); // ExEnd:AnnotationsImport }