Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Sat Jul 24, 2021 3:58 am

Hello,

I cannot replace text from documents that are edited with Adobe Acrobat Pro.

I Use PdfTextReplacer to edit the document, in order to keep polices for edited texts.

For each edit only the 3 firsts characters are replaced, and there are wrong characters after that. Here is an example for the effect it does.
BioLoire44400-x : the original file saved with Acrobat
BioLoire44400-modele : the result file

We can see lot of 'square' characters in the result file, as if the replacement text was corrupted.

I don't have the issue with a document not saved from Acrobat Pro.

I try different ways of saving the document from Acrobat Pro
- pdf - different compatibility versions
- police embedded
- all embedded
- pdf-x

The project is available from the post pdfdocument-usedfonts-exception-on-my-testfile-pdf-t10390.html

Cordially,
Sammy

sammy_Us
 
Posts: 4
Joined: Wed Jul 21, 2021 4:13 am

Mon Jul 26, 2021 8:27 am

Hello Sammy,

Thanks for your inquiry.
Please refer to the following modified code.
Code: Select all
//page.Canvas.DrawString(newText, font, brush, rec);
page.Canvas.DrawString(newText, font, brush, rec.X,rec.Y);

If there are any other issues related to our products, please fee free to contact us.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Thu Sep 16, 2021 10:29 am

Hello,

Greetings from E-iceblue!
Has your issue been resolved? Any feedback will be greatly appreciated.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Return to Spire.PDF