Click or drag to resize

PdfToImageConverterConvertToThumbnails(Stream, Int32, Int32) Method

Converts the PDF pages from the specified PDF stream to thumbnails: images that fit in a box of the specified size, keeping the aspect ratio of each page.

Namespace: ExpertPdf.Anywhere
Assembly: ExpertPdf.Anywhere (in ExpertPdf.Anywhere.dll) Version: 22.0
Syntax
public byte[][] ConvertToThumbnails(
	Stream pdfStream,
	int maxWidth,
	int maxHeight
)

Parameters

pdfStream  Stream
The PDF stream from where the pages will be converted. It can be for example a MemoryStream or a FileStream.
maxWidth  Int32
The maximum width of a thumbnail in pixels. 0 means that only the height is limited.
maxHeight  Int32
The maximum height of a thumbnail in pixels. 0 means that only the width is limited.

Return Value

Byte
One thumbnail for each converted page, encoded in the format given by the ImagesFormat property. A thumbnail is as large as the box allows: its width is maxWidth or its height is maxHeight.
Remarks
The converted pages are given by the StartPageNumber and EndPageNumber properties. The Resolution property is not used: each page is rendered at the resolution its thumbnail needs.
See Also