Click or drag to resize

PdfToImageConverterConvertPageToImageBytes(Stream, Int32, ImageFormat) Method

Converts one page of the specified PDF stream to an image file in memory, at the resolution given by the Resolution property.

Namespace: ExpertPdf.Anywhere
Assembly: ExpertPdf.Anywhere (in ExpertPdf.Anywhere.dll) Version: 22.0
Syntax
public byte[] ConvertPageToImageBytes(
	Stream pdfStream,
	int pageNumber,
	ImageFormat imageFormat
)

Parameters

pdfStream  Stream
The PDF stream. It can be for example a MemoryStream or a FileStream.
pageNumber  Int32
The number of the page to convert (starting with 1).
imageFormat  ImageFormat
The format of the image, for example ImageFormat.Png or ImageFormat.Jpeg. A JPEG image is saved with the JpegQuality property, a TIFF image with the TiffCompression property and a PNG image with the PngCompressionLevel property.

Return Value

Byte
The bytes of the image file.
Remarks
The StartPageNumber and EndPageNumber properties are not used and not changed.
See Also