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 > Sample Code
  New Posts New Posts RSS Feed - Stream merging of PDF files using Delphi
  FAQ FAQ  Forum Search   Register Register  Login Login

Stream merging of PDF files using Delphi

 Post Reply Post Reply
Author
Message
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Topic: Stream merging of PDF files using Delphi
    Posted: 26 Apr 11 at 9:10PM
Here is some Delphi code for merging two PDFs in a stream. Alternatively the MergeStreams function can be used.

  function MergeStreamsViaMergeDocument(FirstStream, SecondStream,
    OutputStream: TMemoryStream): Integer;
  var
    doc1, doc2: Integer;
  begin
    with TQuickPDF.Create do
    try
      FirstStream.Seek(0, soFromBeginning);
      LoadFromStream(FirstStream);
      doc1 := SelectedDocument;
      SecondStream.Seek(0, soFromBeginning);
      LoadFromStream(SecondStream);
      doc2 := SelectedDocument;
      SelectDocument(doc1);
      MergeDocument(doc2);
      OutputStream.Seek(0, soFromBeginning);
      SaveToStream(OutputStream);
    finally
      Free;
    end;
  end;
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