Do you own a Debenu Quick PDF Library 8 or earlier license? Upgrade to Debenu Quick PDF Library 9 today!
![]() |
Replacing Text in multipage document |
Post Reply
|
| Author | |
AusMike
Beginner
Joined: 17 Apr 12 Online Status: Offline Posts: 1 |
Post Options
Quote Reply
Topic: Replacing Text in multipage documentPosted: 17 Apr 12 at 1:47AM |
|
I am hoping someone can tell me what I am missing?
I need to create two large multipage documents that take several minutes to produce. The documents are identical except for a couple of pieces of text. To speed the whole system up, I am trying to create the document with a placeholder for my text, then replace it with he correct text for each file. ie after I have created the document: quickpdf.CombineContentStreams; workstring := quickpdf.savetostring; Newstring := stringreplace(workstring,’@placeholder@’,’new
data’,[rfrepalceall]); i := Quickpdf.loadfromstring(newstring,''); if = 1 then begin
QuickPDf.CompressContent;
QuickPDf.SaveToFile(filename1); End; Newstring :=
stringreplace(workstring,’@placeholder@’,’alternate data’,[rfrepalceall]); i := Quickpdf.loadfromstring(newstring,''); if = 1 then begin
QuickPDf.CompressContent;
QuickPDf.SaveToFile(Filename2); End; |
|
![]() |
|
AndrewC
Moderator Group
Joined: 08 Dec 10 Location: Geelong, Aust Online Status: Offline Posts: 499 |
Post Options
Quote Reply
Posted: 17 Apr 12 at 1:48PM |
|
You probably need to make sure the strings you are replacing are the same length.
Another option is to create the initial document with out the text place holders and then use DrawText later if you know where the text should be drawn. |
|
![]() |
|
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2013 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store