|
PDFsharp - moved to http://forum.pdfsharp.net/ Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
|
Important Notice:
We regret to inform you that our free phpBB forum hosting service will be discontinued by the end of June 30, 2024.
If you wish to migrate to our paid hosting service, please contact billing@hostonnet.com.
View previous topic :: View next topic |
Author |
Message |
yogesh@performixinc.com
Joined: 01 Apr 2008 Posts: 4
|
Posted: Tue Apr 01, 2008 10:16 am Post subject: Sample to Find and Replace Text |
|
|
Hello,
Does someone have code to do the following.
1) Go through a PDF document and look for string with value
say %TEMPLATE_TEXT%
2) Replace this %TEMPLATE_TEXT% with SomeText and
save the changed pdf document.
Basically I want to write an application which would read a TemplatePDF document, replace some Text contents of the TemplatePDF and
generate new PDF file with changed Text.
Regards, Yogesh |
|
Back to top |
|
|
aknuth
Joined: 23 Mar 2007 Posts: 16 Location: Berlin
|
Posted: Wed Apr 02, 2008 3:17 pm Post subject: |
|
|
hi there, i wouldnt use that low-level approach as its very dirty. for example multiple lines cannot be found easily.
in fact you could load the pdf, decompress the pdf-markup, look for text-groups and replace it. but i'd recommend creating the document using migradoc and then applying the template data. |
|
Back to top |
|
|
SunsetTowers
Joined: 16 Jun 2008 Posts: 2
|
Posted: Mon Jun 16, 2008 11:41 pm Post subject: |
|
|
I've been looking for a way to decompress the markup as stated in the previous reply. But have been unable to find a way to do this. Could someone elaborate on this. |
|
Back to top |
|
|
bmkennedy21
Joined: 04 Sep 2008 Posts: 1
|
Posted: Thu Sep 04, 2008 3:37 am Post subject: Same Problem |
|
|
I have a similiar issue. I'd like to do this because I have a graphic designer that creates the templates, and then leaves them for me to load to a website, the only thing I can find is text strings, since they are using graphic design tools to generate the PDF. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|