コード例 #1
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+ "input.pdf");
     //replace text on all pages
     pdfContentEditor.ReplaceText("Hello", 1, "World");
     //save output PDF
     pdfContentEditor.Save(dataDir+ "ReplaceText.pdf");
 }
コード例 #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");
        }
コード例 #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");
        }
コード例 #4
0
ファイル: ReplaceText.cs プロジェクト: joyang1/Aspose_Pdf_NET
 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");
     
 }
コード例 #5
0
 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
 }