MergeStreams

Document manipulation

Description

This function is similar to the MergeFiles function, however instead of working with files on disk, it merges two PDF documents stored in different TStream objects and saves the merged document into a third stream.

Outlines (bookmarks), form fields and annotations from the both documents will be present in the merged document.

Syntax

Delphi

function TPDFlib.MergeStreams(FirstStream, SecondStream, OutputStream: TStream): Integer;

ActiveX

Function PDFlib::MergeStreams(FirstStream As Long, SecondStream As Long, OutputStream As Long) As Long

Parameters

FirstStreamThe stream containing the first document
SecondStreamThe stream containing the second document
OutputStreamThe merged document is written into this stream

Return values

0The documents could not be merged. Use the LastErrorCode function to determine the cause of the failure.
1The merge process was successful