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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Problem with MergeFileListFast in Delphi
  FAQ FAQ  Forum Search   Register Register  Login Login

Problem with MergeFileListFast in Delphi

 Post Reply Post Reply
Author
Message Reverse Sort Order
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Topic: Problem with MergeFileListFast in Delphi
    Posted: 15 Apr 16 at 9:41PM
Hi Wilbur,

... welcome here :)
Ingo

Cheers,
Ingo

Back to Top
WilburWright View Drop Down
Beginner
Beginner
Avatar

Joined: 15 Apr 16
Location: USA
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote WilburWright Quote  Post ReplyReply Direct Link To This Post Posted: 15 Apr 16 at 8:42PM
Solved this myself,
Function works as described,
Just make sure to unlock the CommonDocPDF object before using it.

Not real happy with brain.
Back to Top
WilburWright View Drop Down
Beginner
Beginner
Avatar

Joined: 15 Apr 16
Location: USA
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote WilburWright Quote  Post ReplyReply Direct Link To This Post 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 ...

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store