Replace text in PDF

Last post 10-11-2011, 2:38 AM by jan-hendrikroehrs. 37 replies.
Page 3 of 3 (38 items)   < Previous 1 2 3
Sort Posts: Previous Next
  •  06-29-2009, 1:30 PM 185920 in reply to 95276

    Re: Replace text in PDF

    This post is over 2 years old and I still cannot get the code to work. It is creating the new document but the text is not replaced. If I can get the evaluation to work I will buy the product, but not unless it does. Please advise...

    using Aspose.Pdf.Kit;

    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            PdfContentEditor pdfContent = new PdfContentEditor();
            try
            {
                pdfContent.BindPdf(Server.MapPath("template.pdf"));
                pdfContent.ReplaceText("the", "zzzzzzzzzzzzzzzzz");
                pdfContent.Save(Server.MapPath("new.pdf"));
            }
            catch (Exception ex)
            {
                Response.Write(ex);
            }
        }
    }

     
  •  06-30-2009, 1:21 AM 185984 in reply to 185920

    Re: Replace text in PDF

    Hi,

    Thank you very much for considering Aspose.

    Can you please share the PDF file with us? We'll test the issue at our end and will update you accordingly.

    We're sorry for the inconvenience.

    Regards,

     


    Shahzad Latif - [Follow me on Twitter!]
    Support Developer/Developer Evangelist
    Aspose Sialkot Team
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  07-01-2009, 1:44 PM 186457 in reply to 185920

    Re: Replace text in PDF

    Attachment: Present (inaccessible)
    I got the replace text working, but it's putting a tab in the middle of the words.  attached is the pdf file I am using

    For example, I replace {DATE} with the date, but the PDF displayed it like this 7-1-2   009

    PdfContentEditor pdfContent = new PdfContentEditor();
                try
                {
                    pdfContent.bindPdf("old.pdf");
                    pdfContent.replaceText("{DATE}", "7-1-2009");

                    pdfContent.save("new.pdf");
                }
                catch (Exception ex)
                {
                    ex.printStackTrace();
                }    
     
  •  07-02-2009, 1:54 AM 186534 in reply to 186457

    Re: Replace text in PDF

    Hi George,

    I have reproduced the issue and logged it as PDFKITJAVA-9536  in our issue tracking system. Our team will be looking into the matter and you'll be updated via this forum as the issue is resolved.

    We're sorry for the inconvenience.

    Regards,

     


    Shahzad Latif - [Follow me on Twitter!]
    Support Developer/Developer Evangelist
    Aspose Sialkot Team
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  03-01-2010, 12:04 PM 224692 in reply to 79834

    Re: Replace text in PDF

    The issues you have found earlier (filed as 9536) have been fixed in this update.


    This message was posted using Notification2Forum from Downloads module by aspose.notifier.
     
  •  10-10-2011, 2:52 AM 334714 in reply to 95836

    Re: Replace text in PDF

    I'm evaluating Aspose.PDF and trying to replace some text. But I get an Exception: "At most 4 elements (for any collection) can be viewed in evaluation mode."

    How am I supposed to evaluate your component if I can't use basic methods? Isn't timebomb and watermark enough?

     
  •  10-10-2011, 3:13 AM 334719 in reply to 334714

    Re: Replace text in PDF

    Hi Hinek,

    Please get a temporary license for 30 days to evaluate the component without any limitations.

    I hope this helps. If you find any further questions, please do let us know.
    Regards,

    Shahzad Latif - [Follow me on Twitter!]
    Support Developer/Developer Evangelist
    Aspose Sialkot Team
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  10-11-2011, 2:38 AM 335024 in reply to 334719

    Re: Replace text in PDF

    thanks, got it now :)
     
Page 3 of 3 (38 items)   < Previous 1 2 3
View as RSS news feed in XML