public static void Main()
 {
     // The path to the documents directory.
     string dataDir = Path.GetFullPath("../../../Data/");
     //open input PDF
     PdfContentEditor pdfContentEditor = new PdfContentEditor();
     pdfContentEditor.BindPdf(dataDir+ "input.pdf");
     //replace text on all pages
     pdfContentEditor.ReplaceText("Hello", 1, "World");
     //save output PDF
     pdfContentEditor.Save(dataDir+ "ReplaceText.pdf");
 }
Example #2
0
        public static void Main()
        {
            // The path to the documents directory.
            string dataDir = Path.GetFullPath("../../../Data/");
            //open input PDF
            PdfContentEditor pdfContentEditor = new PdfContentEditor();

            pdfContentEditor.BindPdf(dataDir + "input1.pdf");
            //replace text on all pages
            pdfContentEditor.ReplaceText("Hello", "World");
            //save output PDF
            pdfContentEditor.Save(dataDir + "ReplaceTextOnAllPages.pdf");
        }
Example #3
0
        public static void Run()
        {
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_AsposePdfFacades_Text();
            //open input PDF
            PdfContentEditor pdfContentEditor = new PdfContentEditor();

            pdfContentEditor.BindPdf(dataDir + "ReplaceText-Page.pdf");
            //replace text on all pages
            pdfContentEditor.ReplaceText("Hello", 1, "World");
            //save output PDF
            pdfContentEditor.Save(dataDir + "ReplaceText.pdf");
        }
Example #4
0
 public static void Run()
 {
     // The path to the documents directory.
     string dataDir = RunExamples.GetDataDir_AsposePdfFacades_Text();
     //open input PDF
     PdfContentEditor pdfContentEditor = new PdfContentEditor();
     pdfContentEditor.BindPdf(dataDir+ "input1.pdf");
     //replace text on all pages
     pdfContentEditor.ReplaceText("Hello", "World");
     //save output PDF
     pdfContentEditor.Save(dataDir+ "ReplaceTextOnAllPages.pdf");
     
 }
 public static void Run()
 {
     // ExStart:ReplaceText
     // The path to the documents directory.
     string dataDir = RunExamples.GetDataDir_AsposePdfFacades_Text();
     // Open input PDF
     PdfContentEditor pdfContentEditor = new PdfContentEditor();
     pdfContentEditor.BindPdf(dataDir + "ReplaceText.pdf");
     // Replace text on all pages
     pdfContentEditor.ReplaceText("Hello", "World");
     // Save output PDF
     pdfContentEditor.Save(dataDir + "ReplaceText_out.pdf");
     // ExEnd:ReplaceText
 }