BCL easyPDF SDK
easyPDF SDK Usermanual
PDF Creator Programming API  |  Download Free Trial  |  Contact Us to Purchase

MergeMem Method

Merges two in-memory PDF files without using the file system.

Function MergeMem(InputStream1 As Variant, InputStream2 As Variant) As Variant

byte[] MergeMem(byte[] InputStream1, byte[] InputStream2)

byte[] MergeMem(byte[] InputStream1, byte[] InputStream2) throws PDFProcessorException

Parameters

Return Values

The merged PDF as a byte array in (VT_ARRAY | VT_UI1) format.

Remarks

N/A.

Example Usage in VB.NET

Dim oProcessor As PDFProcessor = New PDFProcessor

Dim inMem1() As Byte = File.ReadAllBytes("C:\test\input1.pdf")
Dim inMem2() As Byte = File.ReadAllBytes("C:\test\input2.pdf")

Dim outMem() As Byte = oProcessor.MergeMem(inMem1, inMem2)

File.WriteAllBytes("C:\test\output.pdf", outMem)

Example Usage in C#

PDFProcessor oProcessor = new PDFProcessor();

byte[] inMem1 = File.ReadAllBytes(@"c:\test\input1.pdf");
byte[] inMem2 = File.ReadAllBytes(@"c:\test\input2.pdf");

byte[] outMem = (byte[])oProcessor.MergeMem(inMem1, inMem2);

File.WriteAllBytes(@"c:\test\output.pdf", outMem);