Print Page | Close Window

Search & Replace Text

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2355
Printed Date: 29 Apr 25 at 11:39AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Search & Replace Text
Posted By: pranavs
Subject: Search & Replace Text
Date Posted: 30 Jul 12 at 9:29PM
Does QuickPDF Library supports Search & Replace Text function?
 
For example, I want to search for [This information is For:] and replace it with person's name.
 
Thanks,
Pranav...



Replies:
Posted By: Ingo
Date Posted: 31 Jul 12 at 6:59AM
Hi Pranav!

You can try the embedded text extract funcionalities.
There are options to get informations like used font,
fontheight, fontcolour and the whole text coordinates
while extraction, too.
So you can extract the text page by page,
search for your text and with the draw functionalities
you can fill the background on the same coordinates with
white colour and on the same position you can write your
new text.

This you can do with QuickPDF. This is not a real search
and replace but it looks like ;-)

Cheers and welcome here,
Ingo



Posted By: AndrewC
Date Posted: 02 Aug 12 at 11:10AM
PDF files are not designed for Search and Replace which is why most libraries only allow you to add / append commands to an existing PDF file.

There are some options.

1. DrawText(x,y, text)  - but you would need to know where the text is.

2. Use form fields and then you can flatten their contents.

If you are loading existing PDF files that you have no control of then you may be out of luck.

Andrew.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk