Replace text by image in pdf

1 Answer 193 Views
PdfProcessing
Adrian
Top achievements
Rank 1
Iron
Adrian asked on 27 Jun 2023, 12:24 PM

Hi all,

 

I would like to replace a temporary page content (a placeholder text) with an image in a Pdf. In order to do this, I use the telerik solution here.

My problem is that it doesn't work always : it often bugs because the placeholder text seems to be splitted in multiple text fragment.

Here is an example :

In my document : the placeholder text

The text fragments found in pdf :

And sometimes it works well:

Is there any solution to help me with this please?

 

Thank you,
Regards,
Adrian

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 28 Jun 2023, 06:41 AM

Hello Adrian,

You probably found that the PdfProcessing currently doesn't provide a Repalce API. You can cast your vote for this feature implementation as well as subscribe to the task by clicking the Follow button so we can notify you when its status changes.

So, until this feature is implemented I could suggest iterating the document content and evaluating whether consecutive TextFragments are part of the marker you are searching for. 

I prepared a sample example of how you can achieve such functionality which you can find attached.

I hope this helps.

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
PdfProcessing
Asked by
Adrian
Top achievements
Rank 1
Iron
Answers by
Martin
Telerik team
Share this question
or