Class PdfDocumentMergingSource
PdfDocumentSource that merges several different sources into one PdfDocument.
Implements
Namespace: Sartorius.SAF.Pdf
Assembly: Sartorius.SAF.Pdf.dll
Syntax
public sealed class PdfDocumentMergingSource : PdfDocumentSource, IDisposable
Methods
View SourceAppendSource(PdfDocumentSource)
Appends the given PdfDocumentSource.
Declaration
public void AppendSource(PdfDocumentSource source)
Parameters
Type | Name | Description |
---|---|---|
PdfDocumentSource | source | The source that should be appended. |
Remarks
The PdfDocumentMergingSource becomes the owner of the source
and will dispose of it.
Dispose(Boolean)
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
|
Overrides
View SourceEquals(PdfDocumentSource)
Determines if another instance of PdfDocumentSource is equal to this instance.
Declaration
protected override bool Equals(PdfDocumentSource other)
Parameters
Type | Name | Description |
---|---|---|
PdfDocumentSource | other | The other. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
View SourceGetHashCode()
Serves as a hash function for a particular type.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for the current object. |
Overrides
View SourceLoadDocument()
Loads the document.
Declaration
public override PdfDocument LoadDocument()
Returns
Type | Description |
---|---|
PdfDocument | The PdfDocument merged from the sources. |
Overrides
Remarks
This will load the documents from the child PdfDocumentSources and merges them into one document. If any PdfDocumentSource is using a System.IO.Stream this can only be done once.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The document source was not specified ORThe source is a System.IO.Stream and LoadDocument() has already been called once. |