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!
Problem with MergeFileListFast in Delphi |
Post Reply |
Author | |
WilburWright
Beginner Joined: 15 Apr 16 Location: USA Status: Offline Points: 7 |
Post Options
Thanks(0)
Posted: 15 Apr 16 at 8:17PM |
Having trouble implementing then
MergeFileListFast function to Merge all PDF files into a common PDF file ... Here is my sample code in one function ... Function TForm1.AddSections2CommonDoc(FileName : String; DeleteSource : Boolean) : Boolean; Var FilePath : String; AddFileName : String; FileIndex : Integer; AddedFiles : Integer; CommonDocPDF: TDebenuPDFLibrary1212; SearchResult : TSearchRec; Begin If FileExists(FileName) = True then Begin Result := False; ShowMessage('File Exists: [' + FileName + ']'); Exit; End Else Begin CommonDocPDF := TDebenuPDFLibrary1212.Create(); End; FilePath := IncludeTrailingBackSlash(ExtractFileDir(FileName)); CommonDocPDF.SetTempPath('c:\temp\'); CommonDocPDF.ClearFileList('myList'); If FindFirst(FilePath + '*.pdf', faArchive, searchResult) = 0 then begin repeat AddedFiles := CommonDocPDF.AddToFileList('myList', FilePath+searchResult.Name); until FindNext(searchResult) <> 0; FindClose(searchResult); end; CommonDocPDF.MergeFileListFast('myList', Filename); FreeAndNil(CommonDocPDF); End; In case this helps, AddedFiles always returns 1, it is not incrementing with each file added. Development environment is Delphi Seattle 10 with Quick PDF library 12.12 Thank you for your help ... |
|
WilburWright
Beginner Joined: 15 Apr 16 Location: USA Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Solved this myself,
Function works as described, Just make sure to unlock the CommonDocPDF object before using it. Not real happy with brain. |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Wilbur,
... welcome here :) Ingo |
|
Cheers,
Ingo |
|
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