We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

ReplaceText Pdf.Kit not working

Received : 2007/10/18 16:23:02
Message : I downloaded the latest evaluation version. I tried to use ReplaceText and my Text is removed and nothing is added. Another result displayed the text but added additional characters and changed the spacing. I tried converting the pdf to v5, 6, 7 and even 4 nothing worked.

Email me and I send the code and the same files.
Andrew McCormack

This message was posted using Aspose.Live 2 Forum

Can you please post your pdf here and let us check it?

If you don’t want to post it here, please email to adeel.ahmad@aspose.com and include a link to this post in your mail.

I created a one word pdf document. I figured it was the simplest case to use ReplaceText. The text was removed but the document was blank. Another document, replaced the text but shifted the characters and entered garbage characters.

My code:
string file = Server.MapPath("TEST.pdf");
string dest = Server.MapPath(".") + "\\TEST1.pdf";
OutputTextDebug("DEST: " + dest);
OutputTextDebug("FILE: " + file);
OutputTextDebug("File Exist: " + File.Exists(file).ToString());
PdfContentEditor editor = new PdfContentEditor();
editor.ReplaceText("**REPLACETEXT**", "ANDREW");

I can not get ReplaceText to work on any pdf documents. I doubt I purchase your product without this feature.



Thank you for considering Aspose.

I am able to reproduce this error and logged it as PDFKITNET-3926. We will try to fix it as soon as possible. Sorry for inconvenience.


How do I track the progress of PDFKITNET-3926?


You can't track the progress but you can ask on support forums or Live Messenger about the progress of the issue. Whenever a fix is available you will be notified here.