Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
fpdf_thumbnail.h
Go to the documentation of this file.
1// Copyright 2019 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef PUBLIC_FPDF_THUMBNAIL_H_
6#define PUBLIC_FPDF_THUMBNAIL_H_
7
8#include <stdint.h>
9
10// NOLINTNEXTLINE(build/include)
11#include "fpdfview.h"
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17// Experimental API.
18// Gets the decoded data from the thumbnail of |page| if it exists.
19// This only modifies |buffer| if |buflen| less than or equal to the
20// size of the decoded data. Returns the size of the decoded
21// data or 0 if thumbnail DNE. Optional, pass null to just retrieve
22// the size of the buffer needed.
23//
24// page - handle to a page.
25// buffer - buffer for holding the decoded image data.
26// buflen - length of the buffer in bytes.
27FPDF_EXPORT unsigned long FPDF_CALLCONV
29 void* buffer,
30 unsigned long buflen);
31
32// Experimental API.
33// Gets the raw data from the thumbnail of |page| if it exists.
34// This only modifies |buffer| if |buflen| is less than or equal to
35// the size of the raw data. Returns the size of the raw data or 0
36// if thumbnail DNE. Optional, pass null to just retrieve the size
37// of the buffer needed.
38//
39// page - handle to a page.
40// buffer - buffer for holding the raw image data.
41// buflen - length of the buffer in bytes.
42FPDF_EXPORT unsigned long FPDF_CALLCONV
43FPDFPage_GetRawThumbnailData(FPDF_PAGE page,
44 void* buffer,
45 unsigned long buflen);
46
47// Experimental API.
48// Returns the thumbnail of |page| as a FPDF_BITMAP. Returns a nullptr
49// if unable to access the thumbnail's stream.
50//
51// page - handle to a page.
52FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV
53FPDFPage_GetThumbnailAsBitmap(FPDF_PAGE page);
54
55#ifdef __cplusplus
56}
57#endif
58
59#endif // PUBLIC_FPDF_THUMBNAIL_H_
CPDF_Document * GetDocument() const override
Definition cpdf_page.cpp:51
CPDF_Page * CPDFPageFromFPDFPage(FPDF_PAGE page)
FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFPage_GetRawThumbnailData(FPDF_PAGE page, void *buffer, unsigned long buflen)
FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFPage_GetDecodedThumbnailData(FPDF_PAGE page, void *buffer, unsigned long buflen)
FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV FPDFPage_GetThumbnailAsBitmap(FPDF_PAGE page)
#define FPDF_CALLCONV
Definition fpdfview.h:227
#define FPDF_EXPORT
Definition fpdfview.h:221