Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
Replacing Text in multipage document |
Post Reply ![]() |
Author | |
AusMike ![]() Beginner ![]() Joined: 17 Apr 12 Status: Offline Points: 1 |
![]() ![]() ![]() ![]() ![]() Posted: 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 Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
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 ![]() |
|
Tweet
|
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 © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store