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

Free Support Forum - aspose.com

PDF Kit - Replace Text issue - scrambled text


I am trying to replace a text string in a PDF file but I'm finding that the output has scrambled text. I have attached the output PDF and the code is below.

I would appreciate any thoughts on how to resolve this one.



DialogResult result = openFileDialog1.ShowDialog();

if (result == DialogResult.OK)


Aspose.Pdf.Kit.PdfContentEditor editor = new Aspose.Pdf.Kit.PdfContentEditor();


editor.ReplaceText("replace", "jkl123 here is the new text");

editor.Save(System.IO.Path.GetDirectoryName(openFileDialog1.FileName) + \\output.pdf);



I have tested this with my PDF and could not reproduce the error. Can you also provide us with your input file that you are having problems with. Also tell us how you created the input PDF.


I have attached the input.pdf.

This pdf was created using 'Real PDF Server v2' (virual print driver) from a MS Word document.



Hi Scott,

I'm able to reproduce the error and have logged this as PdfKitNet-4848 in our issue tracking system. It is a known issue that the feature of replacing text is not quite stable in our product, so we need more time than general issues to solve the problem, and your patience will be appreciated.


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

This message was posted using Notification2Forum from Downloads module by aspose.notifier.