Sign In  Sign Up Live-Chat

Replace text in PDF

Last post 10-14-2008, 3:19 AM by Felix.Liu. 29 replies.
Page 1 of 2 (30 items)   1 2 Next >
Sort Posts: Previous Next
  •  06-07-2007, 2:13 PM 79834

    Replace text in PDF

    Hello,

    I've seen a recent post about replacing all the appearences of a string in a PDF with another string using PdfContentEditor.replaceText(). I have the same problem: text doesn't get replaced and the quotes are replaced by question marks. Has this problem been solved?

    My code is this:

    PdfContentEditor pdfContent = new PdfContentEditor();
            try{
                pdfContent.bindPdf("c:\\Curves.pdf");
                pdfContent.replaceText("curve", "ZZZZZZZZ");
                pdfContent.save("c:\\ReplacedCurves.pdf");
            }catch(Exception ex){
                ex.printStackTrace();
            }

    I would like to add that this feature is very important, I just haven't found any APIs on the web that do PDF text replacing properly.

    Thank you,

    Peergynt
     
  •  06-07-2007, 7:32 PM 79867 in reply to 79834

    Re: Replace text in PDF

    Can you please also provide the Pdf and let us check it?
    Tommy Wang
    Lead Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  06-08-2007, 8:34 AM 79945 in reply to 79867

    Re: Replace text in PDF

    Attachment: Present (inaccessible)
    I have attached a very simple pdf file for which text replacing just doesn't work.

    I'm trying to replace the string 'curve' with another string.

    Peergynt

     
  •  06-08-2007, 9:04 AM 79950 in reply to 79945

    Re: Replace text in PDF

    Hi,

    I have checked the document you send and found some other problem. I will discuss this with the developers and let you know as soon as solution is found.

    Thanks.

    Adeel Ahmad
    Support Developer
    Aspose Changsha Team
    http://www.aspose.com/Wiki/default.aspx/Aspose.Corporate/ContactChangsha.html

     
  •  07-02-2007, 4:08 AM 82458 in reply to 79950

    Re: Replace text in PDF

    This bug has been fixed in hotfix 2.5.2.
    Tommy Wang
    Lead Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  08-21-2007, 11:05 AM 91667 in reply to 82458

    Re: Replace text in PDF

    I am running Pdf.Kit in evaluation mode and the text isn't being replaced. Was this fix applied for those running in eval mode? My company is considering purchasing this and text replacement is one of our core needs so I need to see this work before purchasing. Thanks.
     
  •  08-21-2007, 3:05 PM 91691 in reply to 91667

    Re: Replace text in PDF

    Hi,

    Thank you for considering Aspose.

    Can you please send us your Pdf file and let us test this issue.

    Thanks.

     
  •  08-22-2007, 8:34 AM 91840 in reply to 91691

    Re: Replace text in PDF

    Attachment: Present (inaccessible)

    I have attached my sample file, created in LiveCycle Designer 8.0. I have also tried using replacement in the Aspose.Pdf.Kit.pdf file located in my "C:\Program Files\Aspose\Aspose.Pdf.Kit\Demos\Resources" directory.

    The attached sample file also includes some form fields. I can populate the logo image and the textbox, but inline fields don't show up in the fields collection recognized by the pdf kit library. I also need to find a way to handle this.

    Thanks.

     
  •  08-22-2007, 1:25 PM 91902 in reply to 91840

    Re: Replace text in PDF

    Hi,

    I have checked and able to reproduce the error. I will discuss this with the developers and we will let you know as soon as solution is found.

    Thanks.

     
  •  08-24-2007, 11:20 AM 92188 in reply to 91902

    Re: Replace text in PDF

    Thanks for looking into this. The project I am working on has a very tight deadline, what kind of turn around can be expected on this solution? With this functionality in place, we would definately buy an enterprise license. Thanks.
     
  •  08-24-2007, 1:04 PM 92204 in reply to 92188

    Re: Replace text in PDF

    Hi,

    I will ask the developer to give you an ETA soon.

    Thank you for your patience.

     
  •  08-27-2007, 12:08 PM 92408 in reply to 92204

    Re: Replace text in PDF

    Hi,

    We will fix the null reference bug in next hotfix, which will be available in early next month.

    Best Regards.

    Georgie Yuan
    Lead Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  09-18-2007, 4:37 AM 95254 in reply to 79834

    Re: Replace text in PDF

    My company is also considering purchasing your product PDF KIT only if text replacement is working. Does it work perfectly ? Can i see a demo ?

    Thanks 

     
  •  09-18-2007, 7:33 AM 95276 in reply to 95254

    Re: Replace text in PDF

    Hi,

    Thank you for considering Aspose.

    As you can see there are still some bugs in this feature but we are working to make it perfect. You can evaluate it first.

    Tommy Wang
    Lead Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  09-22-2007, 7:34 PM 95836 in reply to 95276

    Re: Replace text in PDF

    Hello,
    I also was unable to get the Text Replace function working. Simply, nothing happend after calling the function and saving the file. The output file is actually created but when I open it, the replacement is not applied at all.
    Additionaly, another problem start occuring unexpectivly. The problem is that after calling this function and saving the output file, the Adobe (Professional, v 7) is showing an error dialog box when I try to open the outputed file. An error is saying just: "Too few operands". And there is a blank page in the Adobe.

    Could you please do something in order to fix this issues. It is realy important and I'm running out of time for finishing the project I'm working on. And this was really unexpected problem. The company is currently preparing to buy the product mostly because of this functionality, because it is very urgent and its realy unexpected the fact that this function does not work.

    Thank You in advance
     
Page 1 of 2 (30 items)   1 2 Next >
View as RSS news feed in XML