PdfConverter

Overview

PdfConverter is a class in Aspose.PDF FOSS for .NET. Inherits from: IDisposable.

Facade for converting PDF pages to images.

This class provides 63 methods for working with PdfConverter objects in .NET programs. Available methods include: BindPdf, Close, Dispose, DoConvert, GetNextImage, HasNextImage, MergeImages, MergeImagesAsTiff, PdfConverter, SaveAsTIFF, SaveAsTIFFClassF. All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: CoordinateType, Document, EndPage, FormPresentationMode, PageCount, Password, and 5 more.

Properties

NameTypeAccessDescription
ResolutionResolutionRead/WriteOutput resolution in DPI.
Passwordstring?Read/WriteOwner password used when binding encrypted PDFs.
UserPasswordstring?Read/WriteUser password used when binding encrypted PDFs.
StartPageintRead/Write1-based start page (inclusive).
EndPageintRead/Write1-based end page (inclusive).
PageCountintReadNumber of pages in the bound document, or 0 if none bound.
CoordinateTypePageCoordinateTypeRead/WriteWhich page box is used as the rendering bounds.
FormPresentationModeFormPresentationModeRead/WriteForm-field presentation mode.
ShowHiddenAreasboolRead/WriteRender content outside the page crop area.
RenderingOptionsAspose.Pdf.RenderingOptions?Read/WritePer-render rendering options.
DocumentDocument?ReadThe bound document, or null if none.

Methods

SignatureDescription
PdfConverter()Default constructor.
PdfConverter(renderer: IPageRenderer)Calls PdfConverter on this PdfConverter instance.
PdfConverter(renderer: IPageRenderer, resolution: Resolution)
PdfConverter(document: Document)Construct with a PDF document already bound.
BindPdf(srcDoc: Document)Bind a PDF document for conversion.
BindPdf(inputFile: string)Bind a PDF document from a file path.
BindPdf(inputStream: Stream)Bind a PDF document from a stream.
BindPdf(data: byte[])Bind a PDF document from file bytes.
DoConvert()Initialize the conversion iterator.
HasNextImage()Check if there is another page available for conversion.
GetNextImage(format: PdfConverterImageFormat)Render the next page to image bytes.
GetNextImage(outputStream: Stream)Render the next page as PNG and write to stream.
GetNextImage(outputFile: string)Render the next page as PNG and save to a file path.
GetNextImage(outputStream: Stream, format: PdfConverterImageFormat)Render the next page and write to stream.
GetNextImage(outputFile: string, format: PdfConverterImageFormat)Render the next page and save to a file path with specified format.
GetNextImage(outputFile: string, format: SdiImageFormat)Render the next page and save to a file path using a ImageFormat.
GetNextImage(outputStream: Stream, format: SdiImageFormat)Render the next page to stream using a ImageFormat.
GetNextImage(outputFile: string, format: SdiImageFormat, quality: int)Render next page with a JPEG quality hint.
GetNextImage(outputStream: Stream, format: SdiImageFormat, quality: int)Calls GetNextImage on this PdfConverter instance.
GetNextImage(outputFile: string, pageSize: PageSize)Render the next page at an explicit PageSize (JPEG by default) and save to file.
GetNextImage(outputFile: string, pageSize: PageSize, format: PdfConverterImageFormat)Render the next page at an explicit PageSize with the supplied image format, to file.
GetNextImage(outputFile: string, pageSize: PageSize, format: SdiImageFormat)Render the next page at an explicit PageSize with the supplied image format, to file.
GetNextImage(outputFile: string, pageSize: PageSize, format: SdiImageFormat, quality: int)Render the next page at an explicit PageSize with the supplied image format and a JPEG quality hint, to file.
GetNextImage(outputStream: Stream, pageSize: PageSize)Render the next page at an explicit PageSize (JPEG by default) and write to stream.
GetNextImage(outputStream: Stream, pageSize: PageSize, format: SdiImageFormat)Render the next page at an explicit PageSize with the supplied image format, to stream.
GetNextImage(outputStream: Stream, pageSize: PageSize, format: SdiImageFormat, quality: int)Render the next page at an explicit PageSize with the supplied image format and a JPEG quality hint, to stream.
GetNextImage(outputFile: string, format: SdiImageFormat, imageWidth: int, imageHeight: int, quality: int)Render the next page at an explicit pixel size with the supplied image format and JPEG quality, to file.
GetNextImage(outputFile: string, format: SdiImageFormat, imageWidth: int, imageHeight: int)Render the next page at an explicit pixel size with the supplied image format, to file.
GetNextImage(outputStream: Stream, format: SdiImageFormat, imageWidth: int, imageHeight: int)Render the next page at an explicit pixel size with the supplied image format, to stream.
GetNextImage(outputStream: Stream, format: SdiImageFormat, imageWidth: int, imageHeight: int, quality: int)Render the next page at an explicit pixel size with the supplied image format and JPEG quality, to stream.
GetNextImage(outputFile: string, format: SdiImageFormat, imageWidth: double, imageHeight: double, quality: int)Double-precision width/height variant of GetNextImage(string, SdiImageFormat, int, int, int).
GetNextImage(outputStream: Stream, format: SdiImageFormat, imageWidth: double, imageHeight: double, quality: int)Double-precision width/height variant of GetNextImage(Stream, SdiImageFormat, int, int, int).
GetNextImage(output: Stream, pageSize: PageSize, format: PdfConverterImageFormat)Render the next page at an explicit PageSize with the supplied image format, to stream.
SaveAsTIFF(outputFile: string)Save all bound pages as TIFF to a file.
SaveAsTIFF(outputStream: Stream)Save all bound pages as TIFF to a stream.
SaveAsTIFF(outputFile: string, settings: TiffSettings?)Save all bound pages as a multi-page TIFF using the supplied settings.
SaveAsTIFF(outputStream: Stream, settings: TiffSettings?)Save all bound pages as TIFF to a stream using the supplied settings.
SaveAsTIFF(outputStream: Stream, settings: TiffSettings, converter: IIndexBitmapConverter?)Save all bound pages as TIFF to a stream using the supplied settings.
SaveAsTIFF(outputFile: string, settings: TiffSettings, converter: IIndexBitmapConverter?)Save all bound pages as TIFF to a file using the supplied settings.
SaveAsTIFF(outputFile: string, compressionType: CompressionType)Save all bound pages as TIFF, compression preset.
SaveAsTIFF(outputStream: Stream, compressionType: CompressionType)Calls SaveAsTIFF on this PdfConverter instance.
SaveAsTIFF(outputFile: string, imageWidth: int, imageHeight: int)Save all bound pages as a multi-page TIFF at an explicit pixel size.
SaveAsTIFF(outputFile: string, imageWidth: int, imageHeight: int, settings: TiffSettings?)
SaveAsTIFF(outputStream: Stream, imageWidth: int, imageHeight: int)
SaveAsTIFF(outputStream: Stream, imageWidth: int, imageHeight: int, settings: TiffSettings?)
SaveAsTIFF(outputFile: string, imageWidth: int, imageHeight: int, compressionType: CompressionType)
SaveAsTIFF(outputStream: Stream, imageWidth: int, imageHeight: int, compressionType: CompressionType)
SaveAsTIFF(outputStream: Stream, imageWidth: int, imageHeight: int, settings: TiffSettings, converter: IIndexBitmapConverter?)Save all bound pages as TIFF at an explicit pixel size using the supplied settings.
SaveAsTIFF(outputFile: string, imageWidth: int, imageHeight: int, settings: TiffSettings, converter: IIndexBitmapConverter?)Save all bound pages as TIFF at an explicit pixel size to a file.
SaveAsTIFF(outputFile: string, pageSize: PageSize)Save all bound pages as TIFF fitted to the given PageSize.
SaveAsTIFF(outputFile: string, pageSize: PageSize, settings: TiffSettings?)
SaveAsTIFF(outputStream: Stream, pageSize: PageSize)
SaveAsTIFF(outputStream: Stream, pageSize: PageSize, settings: TiffSettings?)
SaveAsTIFFClassF(outputFile: string)Save all bound pages as TIFF Class F (CCITT4, 1bpp) — the ITU-T fax format.
SaveAsTIFFClassF(outputStream: Stream)Calls SaveAsTIFFClassF on this PdfConverter instance.
SaveAsTIFFClassF(outputFile: string, imageWidth: int, imageHeight: int)Class F (CCITT4, 1bpp) at an explicit pixel size.
SaveAsTIFFClassF(outputStream: Stream, imageWidth: int, imageHeight: int)
SaveAsTIFFClassF(outputFile: string, pageSize: PageSize)Class F (CCITT4, 1bpp) fitted to the given PageSize.
SaveAsTIFFClassF(outputStream: Stream, pageSize: PageSize)
Close()Release the bound document reference.
Dispose()Calls Dispose on this PdfConverter instance.
MergeImages(inputImagesStreams: List<Stream>, outputImageFormat: Aspose.Pdf.Drawing.ImageFormat, mergeMode: ImageMergeMode, horizontal: int?, vertical: int?)Combine multiple input image streams into a single composite image, laid out according to mergeMode (vertical stack, horizontal row, or centered overlap), encoded into outputImageFormat.
MergeImagesAsTiff(inputImagesStreams: List<Stream>)Combine multiple input TIFF images into a single multi-frame TIFF stream — one frame per input.

See Also