Class PdfMerger
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
PdfAStandarddocInfoBuilder
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 writablepublic 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
StreampagesBundle
IReadOnlyList<IReadOnlyList<int>>archiveStandard
PdfAStandarddocInfoBuilder
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
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
StreamarchiveStandard
PdfAStandarddocInfoBuilder
PdfDocumentBuilder.DocumentInformationBuilderfilePaths
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
stringfile2
stringfile1Selection
IReadOnlyList<int>file2Selection
IReadOnlyList<int>archiveStandard
PdfAStandarddocInfoBuilder
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
stringfile2
stringoutput
Streamfile1Selection
IReadOnlyList<int>file2Selection
IReadOnlyList<int>archiveStandard
PdfAStandarddocInfoBuilder
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
PdfAStandarddocInfoBuilder
PdfDocumentBuilder.DocumentInformationBuilderfilePaths
string[]
Returns
- byte[]