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.AnywhereAssembly: ExpertPdf.Anywhere (in ExpertPdf.Anywhere.dll) Version: 22.0
Syntaxpublic byte[][] ConvertToThumbnails(
Stream pdfStream,
int maxWidth,
int maxHeight
)
Public Function ConvertToThumbnails (
pdfStream As Stream,
maxWidth As Integer,
maxHeight As Integer
) As Byte()()
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
ByteOne 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.
RemarksThe 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