Click or drag to resize

PdfEncoder Class

An ImageEncoder that will write one or more images to a PDF file.
Inheritance Hierarchy
SystemObject
  Atalasoft.Imaging.CodecImageEncoder
    Atalasoft.Imaging.CodecMultiFramedImageEncoder
      Atalasoft.Imaging.Codec.PdfPdfEncoder

Namespace:  Atalasoft.Imaging.Codec.Pdf
Assembly:  Atalasoft.dotImage.Pdf (in Atalasoft.dotImage.Pdf.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public class PdfEncoder : MultiFramedImageEncoder

The PdfEncoder type exposes the following members.

Constructors
  NameDescription
Public methodPdfEncoder
Creates a new instance of PdfEncoder.
Public methodPdfEncoder(PdfDocumentType)
Creates a new instance of PdfEncoder specifying the document type.
Public methodPdfEncoder(PdfMetadata)
Creates a new instance of PdfEncoder specifying metadata.
Public methodPdfEncoder(PdfPageSizeMode, Size, Int32, PdfMetadata)
Creates a new instance of PdfEncoder specifying sizeMode, pageSize, pageBorder and metadata.
Public methodPdfEncoder(Int32, PdfPageSizeMode, Size, Int32, PdfMetadata)
Creates an instance of PdfEncoder specifying jpegQuality, sizeMode, pageSize, pageBorder and metadata.
Public methodPdfEncoder(PdfPageSizeMode, Size, Int32, PdfMetadata, PdfDocumentType)
Creates a new instance of PdfEncoder specifying sizeMode, pageSize, pageBorder, metadata and document type.
Top
Properties
  NameDescription
Public propertyAdjustPdfVersionAsNeeded
Gets or sets a value indicating whether to adjust PDF version as needed. If the document is saved using features that surpass the version of the PDF spec to adhere to specified in PdfVersion, this will automatically adjust the version to match.
Public propertyBookmarkTree
Gets or sets the PDF bookmark tree that will be used with this document. Default value is null (no tree).
Public propertyCreateSelfPrintingPdf
Gets or sets a boolean indicating if the output PDF file should be self-printing
Public propertyDocumentType
Specifies the type of PDF document that will be produced, including PDF-A.
Public propertyEncryptMetadata
Sets or gets a boolean indicating that metadata stream should be encrypted. Default is true.
Public propertyJpeg2000Quality
Gets or sets Jpeg2000 quality value.
Public propertyJpegQuality
Gets or sets the JPEG quality used when the image compression is set to Jpeg.
Public propertyLinearized
Gets or sets a value indicating whether the PDF document will be saved as linearized.
Public propertyMetadata
Gets or sets the metadata information used for this PDF.
Public propertyMode
Gets or sets a value indicating how to compress each page.
Public propertyOwnerPassword Obsolete.
Sets or gets an owner password to use for the document. Default value is null (no password).
Public propertyPageBorder
Gets or sets the amount of border space around the image in PDF Page Units.
Public propertyPageSize

Gets or sets the size of the PDF pages in PDF Page Units.

PDF uses an internal resolution of 72dpi, so an 8.5 x 11 inch page would be 612 x 792 pixels.

Public propertyPdfVersion
Gets or sets the desired PDF version for the output document. Currently, this will accept 2.0 value and values from 1.0 to 1.7 in increments of 0.1. Other values will be rejected. Defaults to 1.4.
Public propertyPermissions
Sets or gets the set of allowable actions for this PDF.
Public propertySelfPrintingShowsPrintOptions
When set to true, self-printing shows the print options dialog.
Public propertySelfPrintingShrinksToFitPage
When set to true, self-printing adjusts the content to fit the page size.
Public propertySizeMode
Public propertySupportedPixelFormats
Returns an array of the legal pixel formats accepted by the PdfEncoder.
(Overrides ImageEncoderSupportedPixelFormats.)
Public propertyUseAdvancedImageCompression
Allows the PdfEncoder to use JPEG2000 or JBIG2 image compression for color and black and white documents respectively.
Public propertyUseCompressedObjectStreams

Gets or sets a value indicating whether the PDF document contains compressed object streams.

Public propertyUseJbig2LossyCompression
Gets or sets a value indicating whether to use Lossy mode in case of Jbig2 compression.
Public propertyUserPassword Obsolete.
Sets or gets a user password to use for the document. Default value is null (no password).
Public propertyXmp
Gets or sets a byte array containing XMP data.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Protected methodGetGrayImage
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Protected methodGetOneBitImage
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsPixelFormatSupported
Returns true if the given PixelFormat can be encoded with the derived encoder.
(Inherited from ImageEncoder.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnProcessSegment
Protected methodOnSetEncoderCompression
Called when the encoder needs to select a compression.
(Inherited from MultiFramedImageEncoder.)
Public methodSave(Stream, AtalaImage, ProgressEventHandler)
Saves an image to a PDF file.
(Overrides ImageEncoderSave(Stream, AtalaImage, ProgressEventHandler).)
Public methodSave(Stream, PdfImage, ProgressEventHandler)
Creates a single or multipage page PDF file from the specified PdfImage object.
Public methodSave(Stream, PdfImageCollection, ProgressEventHandler)
Saves one or more images to a PDF file.
Public methodSave(Stream, ImageCollection, ProgressEventHandler)
Saves all of the images in an ImageCollection to a PDF file.
(Overrides MultiFramedImageEncoderSave(Stream, ImageCollection, ProgressEventHandler).)
Public methodSave(Stream, ImageSource, ProgressEventHandler)
Saves all of the images in an ImageSource to a PDF file. Only one Image of the ImageSource is in memory at any one time.
(Overrides MultiFramedImageEncoderSave(Stream, ImageSource, ProgressEventHandler).)
Public methodSave(Stream, AtalaImage, PdfCompressionType, ProgressEventHandler)
Creates a single page PDF file from the specified image and compression.
Public methodSetOneTimePasswords
Sets user and owner passwords and generates one-time keys for saving encrypted PDF document. Keys will be reset after calling Save method.
Public methodToByteArray(AtalaImage, ProgressEventHandler)
Saves a single image as a PDF to a byte array.
Public methodToByteArray(ImageCollection, ProgressEventHandler)
Save an ImageCollection as PDF to a byte array.
Public methodToByteArray(PdfImageCollection, ProgressEventHandler)
Saves a PdfImageCollection as PDF to a byte array.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Events
  NameDescription
Public eventProcessSegment
With this event users may control color type of each segment and even set desired color type for the segments found by PdfEncoder during saving PDFs when segmentation algorithm is used to compress PDFs (see Mode).
Public eventSetEncoderCompression
Occurs when the encoder needs to select a compression.
(Inherited from MultiFramedImageEncoder.)
Top
Remarks

To use the PdfEncoder, simply pass an instance of the PdfEncoder to the Save(Stream, ImageEncoder) or Save(String, ImageEncoder, ProgressEventHandler) method and it will save all images from the Images Property of the Workspace object into the PDF File. To compose a multipage PDF document from images not in memory all at once, or at a specified compression format, follow the steps in the example above.

DotImage Document Imaging is required for PDF Encode functionality.

See Also