Returns the bytes of a page's embedded /Thumb image stream, if
the PDF carries one. PDF authoring tools sometimes embed a
low-resolution preview alongside each page; readers can display
that thumbnail without rendering the full page. Wraps
FPDFPage_GetRawThumbnailData and FPDFPage_GetDecodedThumbnailData.
Arguments
- page
A
pdfium_pagefrompdf_page_load(), or apdfium_doc.- page_num
One-based page index. Only used when
pageis apdfium_doc. Ignored otherwise.- decoded
If
TRUE(default) returns the decoded bitmap bytes after PDFium has applied any stream filter (e.g./FlateDecode). IfFALSE, returns the raw filtered bytes — useful when a caller wants to save the thumbnail back to disk in its original encoded form, or pipe it through a different decoder.
Details
Most PDFs produced by Cairo, LaTeX, or web tools do not embed
thumbnails — this function returns raw(0) in that common case.
See also
pdf_render_page() to rasterize the full page instead.