Table of Contents

Class PdfMerger

Namespace
UglyToad.PdfPig.Writer
Assembly
UglyToad.PdfPig.dll

Merges PDF documents into each other.

public static class PdfMerger
Inheritance
PdfMerger
Inherited Members

Methods

Merge(IReadOnlyList<byte[]>, IReadOnlyList<IReadOnlyList<int>>, PdfAStandard, DocumentInformationBuilder)

Merge the set of PDF documents.

public static byte[] Merge(IReadOnlyList<byte[]> files, IReadOnlyList<IReadOnlyList<int>> pagesBundle = null, PdfAStandard archiveStandard = PdfAStandard.None, PdfDocumentBuilder.DocumentInformationBuilder docInfoBuilder = null)

Parameters

files IReadOnlyList<byte[]>
pagesBundle IReadOnlyList<IReadOnlyList<int>>
archiveStandard PdfAStandard
docInfoBuilder PdfDocumentBuilder.DocumentInformationBuilder

Returns

byte[]

Merge(IReadOnlyList<Stream>, Stream, IReadOnlyList<IReadOnlyList<int>>, PdfAStandard, DocumentInformationBuilder)

Merge the set of PDF documents into the output stream The caller must manage disposing the stream. The created PdfDocument will not dispose the stream.

A list of streams for the files contents, this must support reading and seeking. Must be writable
public static void Merge(IReadOnlyList<Stream> streams, Stream output, IReadOnlyList<IReadOnlyList<int>> pagesBundle = null, PdfAStandard archiveStandard = PdfAStandard.None, PdfDocumentBuilder.DocumentInformationBuilder docInfoBuilder = null)

Parameters

streams IReadOnlyList<Stream>
output Stream
pagesBundle IReadOnlyList<IReadOnlyList<int>>
archiveStandard PdfAStandard
docInfoBuilder PdfDocumentBuilder.DocumentInformationBuilder

Merge(Stream, params string[])

Merge multiple PDF documents together with the pages in the order the file paths are provided into the output stream

public static void Merge(Stream output, params string[] filePaths)

Parameters

output Stream
filePaths string[]

Merge(Stream, PdfAStandard, DocumentInformationBuilder, params string[])

Merge multiple PDF documents together with the pages in the order the file paths are provided into the output stream

public static void Merge(Stream output, PdfAStandard archiveStandard, PdfDocumentBuilder.DocumentInformationBuilder docInfoBuilder, params string[] filePaths)

Parameters

output Stream
archiveStandard PdfAStandard
docInfoBuilder PdfDocumentBuilder.DocumentInformationBuilder
filePaths string[]

Merge(string, string, IReadOnlyList<int>, IReadOnlyList<int>, PdfAStandard, DocumentInformationBuilder)

Merge two PDF documents together with the pages from file1 followed by file2.

public static byte[] Merge(string file1, string file2, IReadOnlyList<int> file1Selection = null, IReadOnlyList<int> file2Selection = null, PdfAStandard archiveStandard = PdfAStandard.None, PdfDocumentBuilder.DocumentInformationBuilder docInfoBuilder = null)

Parameters

file1 string
file2 string
file1Selection IReadOnlyList<int>
file2Selection IReadOnlyList<int>
archiveStandard PdfAStandard
docInfoBuilder PdfDocumentBuilder.DocumentInformationBuilder

Returns

byte[]

Merge(string, string, Stream, IReadOnlyList<int>, IReadOnlyList<int>, PdfAStandard, DocumentInformationBuilder)

Merge two PDF documents together with the pages from file1 followed by file2 into the output stream.

public static void Merge(string file1, string file2, Stream output, IReadOnlyList<int> file1Selection = null, IReadOnlyList<int> file2Selection = null, PdfAStandard archiveStandard = PdfAStandard.None, PdfDocumentBuilder.DocumentInformationBuilder docInfoBuilder = null)

Parameters

file1 string
file2 string
output Stream
file1Selection IReadOnlyList<int>
file2Selection IReadOnlyList<int>
archiveStandard PdfAStandard
docInfoBuilder PdfDocumentBuilder.DocumentInformationBuilder

Merge(params string[])

Merge multiple PDF documents together with the pages in the order the file paths are provided.

public static byte[] Merge(params string[] filePaths)

Parameters

filePaths string[]

Returns

byte[]

Merge(PdfAStandard, DocumentInformationBuilder, params string[])

Merge multiple PDF documents together with the pages in the order the file paths are provided.

public static byte[] Merge(PdfAStandard archiveStandard, PdfDocumentBuilder.DocumentInformationBuilder docInfoBuilder, params string[] filePaths)

Parameters

archiveStandard PdfAStandard
docInfoBuilder PdfDocumentBuilder.DocumentInformationBuilder
filePaths string[]

Returns

byte[]