Free Support Forum - aspose.com

PDF Kit - Replace Text issue - scrambled text

Hello,

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.

Thanks,

Scott.

DialogResult result = openFileDialog1.ShowDialog();

if (result == DialogResult.OK)

{

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

editor.BindPdf(openFileDialog1.FileName);

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

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

}

Hi,

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.

Thanks.

I have attached the input.pdf.

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

Thanks,

Scott.

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.

Thanks,

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.