Classes | |
| struct | FPDF_FILEACCESS |
| struct | FPDF_GLYPHPROVIDER |
| Define an interface for generating glyph bitmaps. This interface does not exist on desktop Windows system. But on alternative systems, including mobile system, this interface must be implemented in order to display non-embedded non-western fonts, like Chinese/Japanese/Korean characters. To make use of a glyph provider, call FPDF_SetGlyphProvider function. More... | |
Files | |
| file | fpdfview.h |
Header file for the view module - to render PDF documents and obtain basic PDF information. | |
Defines | |
| #define | DLLEXPORT |
| #define | STDCALL |
| #define | CDECL |
| #define | FPDFERR_OUT_OF_MEMORY 1 |
| #define | FPDFERR_MISSING_FEATURE 2 |
Typedefs | |
| typedef void * | FPDF_MODULEMGR |
| typedef void * | FPDF_DOCUMENT |
| typedef void * | FPDF_PAGE |
| typedef void * | FPDF_PAGEOBJECT |
| typedef void * | FPDF_PATH |
| typedef void * | FPDF_CLIPPATH |
| typedef void * | FPDF_BITMAP |
| typedef void * | FPDF_FONT |
| typedef void * | FPDF_TEXTPAGE |
| typedef void * | FPDF_SCHHANDLE |
| typedef void * | FPDF_PAGELINK |
| typedef void * | FPDF_HMODULE |
| typedef void * | FPDF_DOCSCHHANDLE |
| typedef void * | FPDF_BOOKMARK |
| typedef void * | FPDF_DEST |
| typedef void * | FPDF_ACTION |
| typedef void * | FPDF_LINK |
| typedef int | FPDF_BOOL |
| typedef int | FPDF_ERROR |
| typedef unsigned long | FPDF_DWORD |
| typedef unsigned short | FPDF_WORD |
| typedef unsigned char | FPDF_BYTE |
| typedef unsigned short | FPDF_WCHAR |
| typedef unsigned char const * | FPDF_LPCBYTE |
| typedef const char * | FPDF_BYTESTRING |
| typedef const unsigned short * | FPDF_WIDESTRING |
| typedef const char * | FPDF_STRING |
| typedef void(* | FPDF_ENUMPAGESIZEPROC )(int page_index, double width, double height) |
| typedef void(* | FPDF_ErrorHandler )(int code, FPDF_BYTESTRING msg) |
Functions | |
| DLLEXPORT void STDCALL | FPDF_InitLibrary (void *hInstance) |
| DLLEXPORT FPDF_MODULEMGR STDCALL | FPDF_GetModuleMgr () |
| DLLEXPORT void STDCALL | FPDF_DestroyLibrary () |
| DLLEXPORT void STDCALL | FPDF_UnlockDLL (FPDF_BYTESTRING license_id, FPDF_BYTESTRING unlock_code) |
| DLLEXPORT FPDF_DOCUMENT STDCALL | FPDF_LoadDocument (FPDF_STRING file_path, FPDF_BYTESTRING password) |
| DLLEXPORT FPDF_DOCUMENT STDCALL | FPDF_LoadMemDocument (const void *data_buf, int size, FPDF_BYTESTRING password) |
| DLLEXPORT FPDF_DOCUMENT STDCALL | FPDF_LoadCustomDocument (FPDF_FILEACCESS *pFileAccess, FPDF_BYTESTRING password) |
| DLLEXPORT unsigned long STDCALL | FPDF_GetLastError () |
| DLLEXPORT unsigned long STDCALL | FPDF_GetDocPermissions (FPDF_DOCUMENT document) |
| DLLEXPORT int STDCALL | FPDF_GetPageCount (FPDF_DOCUMENT document) |
| DLLEXPORT FPDF_PAGE STDCALL | FPDF_LoadPage (FPDF_DOCUMENT document, int page_index) |
| DLLEXPORT double STDCALL | FPDF_GetPageWidth (FPDF_PAGE page) |
| DLLEXPORT double STDCALL | FPDF_GetPageHeight (FPDF_PAGE page) |
| DLLEXPORT int STDCALL | FPDF_GetPageSizeByIndex (FPDF_DOCUMENT document, int page_index, double *width, double *height) |
| DLLEXPORT void STDCALL | FPDF_EnumPageSize (FPDF_DOCUMENT document, FPDF_ENUMPAGESIZEPROC callback) |
| DLLEXPORT void STDCALL | FPDF_RenderPageBitmap (FPDF_BITMAP bitmap, FPDF_PAGE page, int start_x, int start_y, int size_x, int size_y, int rotate, int flags) |
| DLLEXPORT void STDCALL | FPDF_QuickDrawPage (FPDF_BITMAP bitmap, FPDF_PAGE page, int start_x, int start_y, int size_x, int size_y, int rotate, int flags) |
| DLLEXPORT void STDCALL | FPDF_ClosePage (FPDF_PAGE page) |
| DLLEXPORT void STDCALL | FPDF_CloseDocument (FPDF_DOCUMENT document) |
| DLLEXPORT void STDCALL | FPDF_DeviceToPage (FPDF_PAGE page, int start_x, int start_y, int size_x, int size_y, int rotate, int device_x, int device_y, double *page_x, double *page_y) |
| DLLEXPORT void STDCALL | FPDF_PageToDevice (FPDF_PAGE page, int start_x, int start_y, int size_x, int size_y, int rotate, double page_x, double page_y, int *device_x, int *device_y) |
| DLLEXPORT FPDF_BITMAP STDCALL | FPDFBitmap_Create (int width, int height, int alpha) |
| DLLEXPORT FPDF_BITMAP STDCALL | FPDFBitmap_CreateEx (int width, int height, int format, void *first_scan, int stride) |
| DLLEXPORT void STDCALL | FPDFBitmap_FillRect (FPDF_BITMAP bitmap, int left, int top, int width, int height, int red, int green, int blue, int alpha) |
| DLLEXPORT void *STDCALL | FPDFBitmap_GetBuffer (FPDF_BITMAP bitmap) |
| DLLEXPORT int STDCALL | FPDFBitmap_GetWidth (FPDF_BITMAP bitmap) |
| DLLEXPORT int STDCALL | FPDFBitmap_GetHeight (FPDF_BITMAP bitmap) |
| DLLEXPORT int STDCALL | FPDFBitmap_GetStride (FPDF_BITMAP bitmap) |
| DLLEXPORT void STDCALL | FPDFBitmap_Destroy (FPDF_BITMAP bitmap) |
| DLLEXPORT void *STDCALL | FPDF_AllocMemory (unsigned long size) |
| DLLEXPORT void STDCALL | FPDF_FreeMemory (void *p) |
| DLLEXPORT void STDCALL | FPDF_SetErrorHandler (FPDF_ErrorHandler func) |
| DLLEXPORT void STDCALL | FPDF_SetModulePath (FPDF_STRING module_name, FPDF_STRING folder_name) |
| DLLEXPORT void STDCALL | FPDF_SetGlyphProvider (FPDF_GLYPHPROVIDER *pProvider) |
| DLLEXPORT int STDCALL | FPDF_SetSystemFontFile (FPDF_BYTESTRING file_path) |
| DLLEXPORT FPDF_BOOKMARK STDCALL | FPDFBookmark_GetFirstChild (FPDF_DOCUMENT document, FPDF_BOOKMARK bookmark) |
| DLLEXPORT FPDF_BOOKMARK STDCALL | FPDFBookmark_GetNextSibling (FPDF_DOCUMENT document, FPDF_BOOKMARK bookmark) |
| DLLEXPORT FPDF_BOOKMARK STDCALL | FPDFBookmark_Find (FPDF_DOCUMENT document, FPDF_WIDESTRING title) |
| DLLEXPORT unsigned long STDCALL | FPDFBookmark_GetColorRef (FPDF_BOOKMARK bookmark) |
| DLLEXPORT unsigned long STDCALL | FPDFBookmark_GetFontStyle (FPDF_BOOKMARK bookmark) |
| DLLEXPORT unsigned long STDCALL | FPDFBookmark_GetTitle (FPDF_BOOKMARK bookmark, void *buffer, unsigned long buflen) |
| DLLEXPORT FPDF_ACTION STDCALL | FPDFBookmark_GetAction (FPDF_BOOKMARK bookmark) |
| DLLEXPORT FPDF_DEST STDCALL | FPDFBookmark_GetDest (FPDF_DOCUMENT document, FPDF_BOOKMARK bookmark) |
| DLLEXPORT int STDCALL | FPDFBookmark_GetPageFirstLine (FPDF_PAGE page, void *buffer, int buflen) |
| DLLEXPORT unsigned long STDCALL | FPDFAction_GetType (FPDF_ACTION action) |
| DLLEXPORT unsigned long STDCALL | FPDFAction_GetFilePath (FPDF_ACTION action, void *buffer, unsigned long buflen) |
| DLLEXPORT FPDF_DEST STDCALL | FPDFAction_GetDest (FPDF_DOCUMENT document, FPDF_ACTION action) |
| DLLEXPORT unsigned long STDCALL | FPDFAction_GetURIPath (FPDF_DOCUMENT document, FPDF_ACTION action, void *buffer, unsigned long buflen) |
| DLLEXPORT unsigned long STDCALL | FPDFDest_GetPageIndex (FPDF_DOCUMENT document, FPDF_DEST dest) |
| DLLEXPORT unsigned long STDCALL | FPDFDest_GetZoomMode (FPDF_DEST dest) |
| DLLEXPORT double STDCALL | FPDFDest_GetZoomParam (FPDF_DEST dest, int param) |
| DLLEXPORT FPDF_LINK STDCALL | FPDFLink_GetLinkAtPoint (FPDF_PAGE page, double x, double y) |
| DLLEXPORT FPDF_DEST STDCALL | FPDFLink_GetDest (FPDF_DOCUMENT document, FPDF_LINK link) |
| DLLEXPORT FPDF_ACTION STDCALL | FPDFLink_GetAction (FPDF_LINK link) |
| DLLEXPORT unsigned long STDCALL | FPDF_GetMetaText (FPDF_DOCUMENT doc, FPDF_BYTESTRING tag, void *buffer, unsigned long buflen) |
| _WIN32_WCE | |
Last error code | |
| #define | FPDF_ERR_SUCCESS 0 |
| No error. | |
| #define | FPDF_ERR_UNKNOWN 1 |
| Unknown error. | |
| #define | FPDF_ERR_FILE 2 |
| Unknown error. | |
| #define | FPDF_ERR_FORMAT 3 |
| File not found or could not be opened. | |
| #define | FPDF_ERR_PASSWORD 4 |
| Password required or incorrect password. | |
| #define | FPDF_ERR_SECURITY 5 |
| Unsupported security scheme. | |
| #define | FPDF_ERR_PAGE 6 |
| Page not found or content error. | |
The result of the process which check linearized to be rendered. | |
| #define | FPDF_ANNOT 0x01 |
| #define | FPDF_LCD_TEXT 0x02 |
| #define | FPDF_NO_NATIVETEXT 0x04 |
| #define | FPDF_GRAYSCALE 0x08 |
| #define | FPDF_DEBUG_INFO 0x80 |
| #define | FPDF_NO_CATCH 0x100 |
More DIB formats | |
| #define | FPDFBitmap_Gray 1 |
| #define | FPDFBitmap_BGR 2 |
| #define | FPDFBitmap_BGRx 3 |
| #define | FPDFBitmap_BGRA 4 |
Bookmark font styles | |
| #define | PDFBOOKMARK_NORMAL 0 |
| NORMAL. | |
| #define | PDFBOOKMARK_ITALIC 1 |
| ITALIC. | |
| #define | PDFBOOKMARK_BOLD 2 |
| BOLD. | |
| #define | PDFBOOKMARK_BOLDITALIC 3 |
| BOLD ITALIC. | |
Action styles | |
| #define | PDFACTION_UNSUPPORTED 0 |
| Unsupported action type. | |
| #define | PDFACTION_GOTO 1 |
| Go to a destination within current document. | |
| #define | PDFACTION_REMOTEGOTO 2 |
| Go to a destination within another document. | |
| #define | PDFACTION_URI 3 |
| Universal Resource Identifier, including web pages and other Internet based resources. | |
| #define | PDFACTION_LAUNCH 4 |
| Launch an application or open a file. | |
Zoom modes | |
| #define | PDFZOOM_XYZ 1 |
| Zoom level with specified offset. | |
| #define | PDFZOOM_FITPAGE 2 |
| Fit both the width and height of the page (whichever smaller). | |
| #define | PDFZOOM_FITHORZ 3 |
| Fit the page width. | |
| #define | PDFZOOM_FITVERT 4 |
| Fit the page height. | |
| #define | PDFZOOM_FITRECT 5 |
| Fit a specific rectangle area within the window. | |
| #define | PDFZOOM_FITBBOX 6 |
| Fit the bounding box entirely within the window both horizontally and vertically. | |
| #define | PDFZOOM_FITBHORZ 7 |
| The contents of the page magnified just enough to fit the entire width of its bounding box within the window. | |
| #define | PDFZOOM_FITBVERT 8 |
| The contents of the page magnified just enough to fit the entire height of its bounding box within the window. | |
Header file for the view module
| #define FPDF_ANNOT 0x01 |
Set if annotations are to be rendered.
| #define FPDF_DEBUG_INFO 0x80 |
Set if you want to get some debug info. Please discuss with Foxit first if you need to collect debug info.
| #define FPDF_GRAYSCALE 0x08 |
Grayscale output.
| #define FPDF_LCD_TEXT 0x02 |
Set if using text rendering optimized for LCD display.
| #define FPDF_NO_CATCH 0x100 |
Set if you don't want to catch exception.
| #define FPDF_NO_NATIVETEXT 0x04 |
Don't use the native text output available on some platforms Applicable to desktop Windows systems only.
| #define FPDFBitmap_BGR 2 |
3 bytes per pixel, byte order: blue, green, red.
| #define FPDFBitmap_BGRA 4 |
4 bytes per pixel, byte order: blue, green, red, alpha.
| #define FPDFBitmap_BGRx 3 |
4 bytes per pixel, byte order: blue, green, red, unused.
| #define FPDFBitmap_Gray 1 |
Gray scale bitmap, one byte per pixel.
| #define FPDFERR_MISSING_FEATURE 2 |
Missing PDF feature. The error handler can safely continue with other rendering.
| #define FPDFERR_OUT_OF_MEMORY 1 |
Out of memory. The error handler should quit the application, or use long jump to get out of current rendering.
| typedef int FPDF_BOOL |
Basic data types
| typedef const char* FPDF_BYTESTRING |
FPDFSDK may use three types of strings: byte string, wide string (UTF-16LE encoded), and platform dependent string
| typedef void* FPDF_DOCUMENT |
PDF types
| typedef void(* FPDF_ENUMPAGESIZEPROC)(int page_index, double width, double height) |
Declares of a pointer type to the callback function for the FPDF_EnumPageSize method. page_index - Page index, zero for the first page. width - The page width. height - The page height.
| None. |
| typedef void* FPDF_MODULEMGR |
Data types
| typedef const char* FPDF_STRING |
For Windows programmers: for most case it's OK to treat FPDF_WIDESTRING as Windows unicode string, however, special care needs to be taken if you expect to process Unicode larger than 0xffff. For Linux/Unix programmers: most compiler/library environment uses 4 bytes for a Unicode character, you have to convert between FPDF_WIDESTRING and system wide string by yourself.
| typedef unsigned short FPDF_WCHAR |
String types
| typedef const unsigned short* FPDF_WIDESTRING |
Foxit PDF SDK always use UTF-16LE encoding wide string, each character use 2 bytes (except subrogation), with low byte first.
| DLLEXPORT void* STDCALL FPDF_AllocMemory | ( | unsigned long | size | ) |
Allocate memory block in FPDFSDK. This memory can be freed by FPDF_FreeMemory function.
| [in] | size | - Byte size of requested memory block. Can not be zero. |
| The | allocated pointer. NULL if memory not available. |
| DLLEXPORT void STDCALL FPDF_CloseDocument | ( | FPDF_DOCUMENT | document | ) |
Close a loaded PDF document.
| [in] | document | - Handle to the loaded document. |
| None. |
| DLLEXPORT void STDCALL FPDF_ClosePage | ( | FPDF_PAGE | page | ) |
Close a loaded PDF page.
| [in] | page | - Handle to the loaded page. |
| None. |
| DLLEXPORT void STDCALL FPDF_DestroyLibrary | ( | ) |
Release all resources allocated by the FPDFSDK library.
| None. |
| DLLEXPORT void STDCALL FPDF_DeviceToPage | ( | FPDF_PAGE | page, |
| int | start_x, | ||
| int | start_y, | ||
| int | size_x, | ||
| int | size_y, | ||
| int | rotate, | ||
| int | device_x, | ||
| int | device_y, | ||
| double * | page_x, | ||
| double * | page_y | ||
| ) |
Convert the screen coordinate of a point to page coordinate.
| [in] | page | - Handle to the page. Returned by FPDF_LoadPage function. |
| [in] | start_x | - Left pixel position of the display area in the device coordinate. |
| [in] | start_y | - Top pixel position of the display area in the device coordinate. |
| [in] | size_x | - Horizontal size (in pixels) for displaying the page. |
| [in] | size_y | - Vertical size (in pixels) for displaying the page. |
| [in] | rotate | - Page orientation: 0 (normal), 1 (rotated 90 degrees clockwise), 2 (rotated 180 degrees), 3 (rotated 90 degrees counter-clockwise). |
| [in] | device_x | - X value in device coordinate, for the point to be converted. |
| [in] | device_y | - Y value in device coordinate, for the point to be converted. |
| [in] | page_x | - A Pointer to a double receiving the converted X value in page coordinate. |
| [in] | page_y | - A Pointer to a double receiving the converted Y value in page coordinate. |
The device coordinate system is device dependent. For screen device, its origin is at left-top corner of the window. However this origin can be altered by Windows coordinate transformation utilities. You must make sure the start_x, start_y, size_x, size_y and rotate parameters have exactly same values as you used in FPDF_RenderPage() function call.
| None. |
| DLLEXPORT void STDCALL FPDF_EnumPageSize | ( | FPDF_DOCUMENT | document, |
| FPDF_ENUMPAGESIZEPROC | callback | ||
| ) |
Enumerating all pages within the document.
| [in] | document | - Handle to document. Returned by FPDF_LoadDocument function. |
| [in] | callback | - A pointer to a callback function. |
| None. |
| DLLEXPORT void STDCALL FPDF_FreeMemory | ( | void * | p | ) |
Free a memory area allocated by Foxit SDK.
| [in] | p | - The pointer. Should not be NULL. |
| None. |
| DLLEXPORT unsigned long STDCALL FPDF_GetDocPermissions | ( | FPDF_DOCUMENT | document | ) |
Get file permission flags of the document.
| [in] | document | - Handle to document. Returned by FPDF_LoadDocument function. |
| A | 32-bit integer indicating permission flags. Please refer to PDF Reference for detailed description. If the document is not protected, 0xffffffff will be returned. |
| DLLEXPORT unsigned long STDCALL FPDF_GetLastError | ( | ) |
Get last error code when an SDK function failed.
| A | 32-bit integer indicating error codes (defined above). |
| DLLEXPORT unsigned long STDCALL FPDF_GetMetaText | ( | FPDF_DOCUMENT | doc, |
| FPDF_BYTESTRING | tag, | ||
| void * | buffer, | ||
| unsigned long | buflen | ||
| ) |
_WIN32_WCE
Get a text from meta data of the document. Result is encoded in UTF-16LE.
| [in] | doc | - Handle to a document |
| [in] | tag | - The tag for the meta data. Currently, It can be "Title", "Author", "Subject", "Keywords", "Creator", "Producer", "CreationDate", or "ModDate". For detailed explanation of these tags and their respective values, please refer to PDF Reference 1.6, section 10.2.1, "Document Information Dictionary". |
| [out] | buffer | - A buffer for output the title. Can be NULL. |
| [in] | buflen | - The length of the buffer, number of bytes. Can be 0. |
The return value always indicated number of bytes required for the buffer, even when there is no buffer specified, or the buffer size is less then required. In this case, the buffer will not be modified.
| Number | of bytes the title consumes, including trailing zeros. _FPDFVIEW_H_ |
| DLLEXPORT FPDF_MODULEMGR STDCALL FPDF_GetModuleMgr | ( | ) |
Get the module of this DLL.
| FPDF_MODULEMGR | - The handle of this module. |
| DLLEXPORT int STDCALL FPDF_GetPageCount | ( | FPDF_DOCUMENT | document | ) |
Get total number of pages in a document.
| [in] | document | - Handle to document. Returned by FPDF_LoadDocument function. |
| Total | number of pages in the document. |
| DLLEXPORT double STDCALL FPDF_GetPageHeight | ( | FPDF_PAGE | page | ) |
Get page height.
| [in] | page | - Handle to the page. Returned by FPDF_LoadPage function. |
| Page | height (excluding non-displayable area) measured in points. One point is 1/72 inch (around 0.3528 mm) |
| DLLEXPORT int STDCALL FPDF_GetPageSizeByIndex | ( | FPDF_DOCUMENT | document, |
| int | page_index, | ||
| double * | width, | ||
| double * | height | ||
| ) |
Get the size of a page by index.
| [in] | document | - Handle to document. Returned by FPDF_LoadDocument function. |
| [in] | page_index | - Page index, zero for the first page. |
| [in] | width | - Pointer to a double receiving the page width (in points). |
| [in] | height | - Pointer to a double receiving the page height (in points). |
| Non-zero | for success. 0 for error (document or page not found). |
| DLLEXPORT double STDCALL FPDF_GetPageWidth | ( | FPDF_PAGE | page | ) |
Get page width.
| [in] | page | - Handle to the page. Returned by FPDF_LoadPage function. |
| Page | width (excluding non-displayable area) measured in points. One point is 1/72 inch (around 0.3528 mm). |
| DLLEXPORT void STDCALL FPDF_InitLibrary | ( | void * | hInstance | ) |
Initialize the FPDFSDK library
| [in] | hInstance | - For WIN32 system only: the instance of the executable or DLL module. |
| None. |
| DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadCustomDocument | ( | FPDF_FILEACCESS * | pFileAccess, |
| FPDF_BYTESTRING | password | ||
| ) |
Load PDF document from a custom access descriptor.
| [in] | pFileAccess | - A structure for access the file. |
| [in] | password | - Optional password for decrypting the PDF file. |
| A | handle to the loaded document. If failed, NULL is returned. |
| DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadDocument | ( | FPDF_STRING | file_path, |
| FPDF_BYTESTRING | password | ||
| ) |
Open and load a PDF document.
| [in] | file_path | - Path to the PDF file (including extension). |
| [in] | password | - A string used as the password for PDF file. If no password needed, empty or NULL can be used. |
| A | handle to the loaded document. If failed, NULL is returned. |
| DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadMemDocument | ( | const void * | data_buf, |
| int | size, | ||
| FPDF_BYTESTRING | password | ||
| ) |
Open and load a PDF document from memory.
| [in] | data_buf | - Pointer to a buffer containing the PDF document. |
| [in] | size | - Number of bytes in the PDF document. |
| [in] | password | - A string used as the password for PDF file. If no password needed, empty or NULL can be used. |
| A | handle to the loaded document. If failed, NULL is returned. |
| DLLEXPORT FPDF_PAGE STDCALL FPDF_LoadPage | ( | FPDF_DOCUMENT | document, |
| int | page_index | ||
| ) |
Load a page inside a document.
| [in] | document | - Handle to document. Returned by FPDF_LoadDocument function. |
| [in] | page_index | - Index number of the page. 0 for the first page. |
| A | handle to the loaded page. If failed, NULL is returned. |
| DLLEXPORT void STDCALL FPDF_PageToDevice | ( | FPDF_PAGE | page, |
| int | start_x, | ||
| int | start_y, | ||
| int | size_x, | ||
| int | size_y, | ||
| int | rotate, | ||
| double | page_x, | ||
| double | page_y, | ||
| int * | device_x, | ||
| int * | device_y | ||
| ) |
Convert the page coordinate of a point to screen coordinate.
| [in] | page | - Handle to the page. Returned by FPDF_LoadPage function. |
| [in] | start_x | - Left pixel position of the display area in the device coordinate. |
| [in] | start_y | - Top pixel position of the display area in the device coordinate. |
| [in] | size_x | - Horizontal size (in pixels) for displaying the page. |
| [in] | size_y | - Vertical size (in pixels) for displaying the page. |
| [in] | rotate | - Page orientation: 0 (normal), 1 (rotated 90 degrees clockwise), 2 (rotated 180 degrees), 3 (rotated 90 degrees counter-clockwise). |
| [in] | page_x | - X value in page coordinate, for the point to be converted. |
| [in] | page_y | - Y value in page coordinate, for the point to be converted. |
| [in] | device_x | - A pointer to an integer receiving the result X value in device coordinate. |
| [in] | device_y | - A pointer to an integer receiving the result Y value in device coordinate. |
| None. |
| DLLEXPORT void STDCALL FPDF_QuickDrawPage | ( | FPDF_BITMAP | bitmap, |
| FPDF_PAGE | page, | ||
| int | start_x, | ||
| int | start_y, | ||
| int | size_x, | ||
| int | size_y, | ||
| int | rotate, | ||
| int | flags | ||
| ) |
Draw a thumbnail of a page into a bitmap.
| [in] | bitmap | - Handle to the device independent bitmap (as the output buffer). Bitmap handle can be created by FPDFBitmap_Create function. |
| [in] | page | - Handle to the page. Returned by FPDF_LoadPage function. |
| [in] | start_x | - Left pixel position of the display area in the device coordinate. |
| [in] | start_y | - Top pixel position of the display area in the device coordinate. |
| [in] | size_x | - Horizontal size (in pixels) for displaying the page. |
| [in] | size_y | - Vertical size (in pixels) for displaying the page. |
| [in] | rotate | - Page orientation: 0 (normal), 1 (rotated 90 degrees clockwise), 2 (rotated 180 degrees), 3 (rotated 90 degrees counter-clockwise). |
| [in] | flags | - Currently must be zero. |
| None. |
| DLLEXPORT void STDCALL FPDF_RenderPageBitmap | ( | FPDF_BITMAP | bitmap, |
| FPDF_PAGE | page, | ||
| int | start_x, | ||
| int | start_y, | ||
| int | size_x, | ||
| int | size_y, | ||
| int | rotate, | ||
| int | flags | ||
| ) |
Render contents in a page to a device independent bitmap
| [in] | bitmap | - Handle to the device independent bitmap (as the output buffer). Bitmap handle can be created by FPDFBitmap_Create function. |
| [in] | page | - Handle to the page. Returned by FPDF_LoadPage function. |
| [in] | start_x | - Left pixel position of the display area in the bitmap coordinate. |
| [in] | start_y | - Top pixel position of the display area in the bitmap coordinate. |
| [in] | size_x | - Horizontal size (in pixels) for displaying the page. |
| [in] | size_y | - Vertical size (in pixels) for displaying the page. |
| [in] | rotate | - Page orientation: 0 (normal), 1 (rotated 90 degrees clockwise), 2 (rotated 180 degrees), 3 (rotated 90 degrees counter-clockwise). |
| [in] | flags | - 0 for normal display, or combination of flags defined above. |
| None. |
| DLLEXPORT void STDCALL FPDF_SetErrorHandler | ( | FPDF_ErrorHandler | func | ) |
Set a call back function when FPDFSDK has some error to report.
| [in] | func | - Pointer to the error handler function. |
| None. |
| DLLEXPORT void STDCALL FPDF_SetGlyphProvider | ( | FPDF_GLYPHPROVIDER * | pProvider | ) |
Make use of a custom glyph bitmap provider. Not available on Desktop Windows system.
| [in] | pProvider | - Pointer to a provider structure. This structure must be available all the time (better put it in static data). And all member interfaces of this structure should be properly set and implemented. |
| None. |
| DLLEXPORT void STDCALL FPDF_SetModulePath | ( | FPDF_STRING | module_name, |
| FPDF_STRING | folder_name | ||
| ) |
Set the folder path for module files (like the FPDFCJK.BIN).
| [in] | module_name | - Name of the module. Currently please use NULL (0) only. |
| [in] | folder_name | - Name of the folder. For example: "C:\\program files\\FPDFSDK". |
| None. |
| DLLEXPORT int STDCALL FPDF_SetSystemFontFile | ( | FPDF_BYTESTRING | file_path | ) |
Make use of a system font. The font file must be in TrueType or Type1 format and must be encoded in a standard encoding system. Available for embedded Linux system only.
| [in] | file_path | - The full path of the font file. |
| Non-zero | for success. Zero for error. |
| DLLEXPORT void STDCALL FPDF_UnlockDLL | ( | FPDF_BYTESTRING | license_id, |
| FPDF_BYTESTRING | unlock_code | ||
| ) |
Unlock the DLL using license key info received from Foxit.
| [in] | license_id | - A string received from Foxit identifying the SDK license. |
| [in] | unlock_code | - A string received from Foxit for unlocking the DLL. |
| None. |
| DLLEXPORT FPDF_DEST STDCALL FPDFAction_GetDest | ( | FPDF_DOCUMENT | document, |
| FPDF_ACTION | action | ||
| ) |
Get destination of an action.
| [in] | document | - Handle to the document.. |
| [in] | action | - Handle to the action. It must be a GOTO or REMOTEGOTO action. |
| Handle | to the destination data. |
| DLLEXPORT unsigned long STDCALL FPDFAction_GetFilePath | ( | FPDF_ACTION | action, |
| void * | buffer, | ||
| unsigned long | buflen | ||
| ) |
Get file path of a remote goto action.
| [in] | action | - Handle to the action. Must be a RMEOTEGOTO or LAUNCH action. |
| [out] | buffer | - A buffer for output the path string. Can be NULL. |
| [in] | buflen | - The length of the buffer, number of bytes. Can be 0. |
| Number | of bytes the file path consumes, including trailing zero. |
| DLLEXPORT unsigned long STDCALL FPDFAction_GetType | ( | FPDF_ACTION | action | ) |
Get type of an action.
| [in] | action | - Handle to the action. |
| A | type number as the action styles. |
| DLLEXPORT unsigned long STDCALL FPDFAction_GetURIPath | ( | FPDF_DOCUMENT | document, |
| FPDF_ACTION | action, | ||
| void * | buffer, | ||
| unsigned long | buflen | ||
| ) |
Get URI path of a URI action.
| [in] | document | - Handle to the document. |
| [in] | action | - Handle to the action. Must be a URI action. |
| [out] | buffer | - A buffer for output the path string. Can be NULL. |
| [in] | buflen | - The length of the buffer, number of bytes. Can be 0. |
| Number | of bytes the URI path consumes, including trailing zeros. |
| DLLEXPORT FPDF_BITMAP STDCALL FPDFBitmap_Create | ( | int | width, |
| int | height, | ||
| int | alpha | ||
| ) |
Create a Foxit Device Independent Bitmap (FXDIB).
| [in] | width | - Number of pixels in a horizontal line of the bitmap. Must be greater than 0. |
| [in] | height | - Number of pixels in a vertical line of the bitmap. Must be greater than 0. |
| [in] | alpha | - A flag indicating whether alpha channel is used. Non-zero for using alpha, zero for not using. |
The pixels in a horizontal line (also called scan line) are stored side by side, with left most pixel stored first (with lower memory address). Each scan line uses width*4 bytes.
Scan lines are stored one after another, with top most scan line stored first. There is no gap between adjacent scan lines.
This function allocates enough memory for holding all pixels in the bitmap, but it doesn't initialize the buffer. Applications can use FPDFBitmap_FillRect to fill the bitmap using any color.
| The | created bitmap handle, or NULL if parameter error or out of memory. |
| DLLEXPORT FPDF_BITMAP STDCALL FPDFBitmap_CreateEx | ( | int | width, |
| int | height, | ||
| int | format, | ||
| void * | first_scan, | ||
| int | stride | ||
| ) |
Create a Foxit Device Independent Bitmap (FXDIB)
| [in] | width | - Number of pixels in a horizontal line of the bitmap. Must be greater than 0. |
| [in] | height | - Number of pixels in a vertical line of the bitmap. Must be greater than 0. |
| [in] | format | - A number indicating for bitmap format, as defined above. |
| [in] | first_scan | - A pointer to the first byte of first scan line, for external buffer only. If this parameter is NULL, then the SDK will create its own buffer. |
| [in] | stride | - Number of bytes for each scan line, for external buffer only.. |
If external scanline buffer is used, then the application should destroy the buffer by itself. FPDFBitmap_Destroy function will not destroy the buffer.
| The | created bitmap handle, or NULL if parameter error or out of memory. |
| DLLEXPORT void STDCALL FPDFBitmap_Destroy | ( | FPDF_BITMAP | bitmap | ) |
Destroy an FXDIB and release all related buffers.
| [in] | bitmap | - Handle to the bitmap. Returned by FPDFBitmap_Create function. |
| None. |
| DLLEXPORT void STDCALL FPDFBitmap_FillRect | ( | FPDF_BITMAP | bitmap, |
| int | left, | ||
| int | top, | ||
| int | width, | ||
| int | height, | ||
| int | red, | ||
| int | green, | ||
| int | blue, | ||
| int | alpha | ||
| ) |
Fill a rectangle area in an FXDIB.
| [in] | bitmap | - The handle to the bitmap. Returned by FPDFBitmap_Create function. |
| [in] | left | - The left side position. Starting from 0 at the left-most pixel. |
| [in] | top | - The top side position. Starting from 0 at the top-most scan line. |
| [in] | width | - Number of pixels to be filled in each scan line. |
| [in] | height | - Number of scan lines to be filled. |
| [in] | red | - A number from 0 to 255, identifying the red intensity. |
| [in] | green | - A number from 0 to 255, identifying the green intensity. |
| [in] | blue | - A number from 0 to 255, identifying the blue intensity. |
| [in] | alpha | - (Only if the alpha channeled is used when bitmap created) A number from 0 to 255, identifying the alpha value. |
| None. |
| DLLEXPORT void* STDCALL FPDFBitmap_GetBuffer | ( | FPDF_BITMAP | bitmap | ) |
Get data buffer of an FXDIB
| [in] | bitmap | - Handle to the bitmap. Returned by FPDFBitmap_Create function. |
| The | pointer to the first byte of the bitmap buffer. |
| DLLEXPORT int STDCALL FPDFBitmap_GetHeight | ( | FPDF_BITMAP | bitmap | ) |
Get height of an FXDIB.
| [in] | bitmap | - Handle to the bitmap. Returned by FPDFBitmap_Create function. |
| The | number of pixels in a vertical line of the bitmap. |
| DLLEXPORT int STDCALL FPDFBitmap_GetStride | ( | FPDF_BITMAP | bitmap | ) |
Get number of bytes for each scan line in the bitmap buffer.
| [in] | bitmap | - Handle to the bitmap. Returned by FPDFBitmap_Create function. |
| The | number of bytes for each scan line in the bitmap buffer. |
| DLLEXPORT int STDCALL FPDFBitmap_GetWidth | ( | FPDF_BITMAP | bitmap | ) |
Get width of an FXDIB.
| [in] | bitmap | - Handle to the bitmap. Returned by FPDFBitmap_Create function. |
| The | number of pixels in a horizontal line of the bitmap. |
| DLLEXPORT FPDF_BOOKMARK STDCALL FPDFBookmark_Find | ( | FPDF_DOCUMENT | document, |
| FPDF_WIDESTRING | title | ||
| ) |
Find a bookmark in the document, using the bookmark title.
| [in] | document | - Handle to the document. Returned by FPDF_LoadDocument or FPDF_LoadMemDocument. |
| [in] | title | - The UTF-16LE encoded Unicode string for the bookmark title to be searched. Can't be NULL. |
| Handle | to the found bookmark item. NULL if the title can't be found. |
| DLLEXPORT FPDF_ACTION STDCALL FPDFBookmark_GetAction | ( | FPDF_BOOKMARK | bookmark | ) |
Get the action associated with a bookmark item.
| [in] | bookmark | - Handle to the bookmark. |
| Handle | to the action data. NULL if no action is associated with this bookmark. In this case, the application should try FPDFBookmark_GetDest. |
| DLLEXPORT unsigned long STDCALL FPDFBookmark_GetColorRef | ( | FPDF_BOOKMARK | bookmark | ) |
Get designated color of a bookmark item.
| [in] | bookmark | - Handle to the bookmark. |
| A | COLORREF value (0x00ggbbrr) for the bookmark item. |
| DLLEXPORT FPDF_DEST STDCALL FPDFBookmark_GetDest | ( | FPDF_DOCUMENT | document, |
| FPDF_BOOKMARK | bookmark | ||
| ) |
Get the destination associated with a bookmark item.
| [in] | document | - Handle to the document. |
| [in] | bookmark | - Handle to the bookmark. |
| Handle | to the destination data. NULL if no destination is associated with this bookmark. |
| DLLEXPORT FPDF_BOOKMARK STDCALL FPDFBookmark_GetFirstChild | ( | FPDF_DOCUMENT | document, |
| FPDF_BOOKMARK | bookmark | ||
| ) |
Get first child of a bookmark item, or first top level bookmark item.
| [in] | document | - Handle to the document. Returned by FPDF_LoadDocument or FPDF_LoadMemDocument. |
| [in] | bookmark | - Handle to the current bookmark. Can be NULL if you want to get the first top level item. |
| Handle | to the first child or top level bookmark item. NULL if no child or top level bookmark found. |
| DLLEXPORT unsigned long STDCALL FPDFBookmark_GetFontStyle | ( | FPDF_BOOKMARK | bookmark | ) |
Get designated font style for a bookmark item.
| [in] | bookmark | - Handle to the bookmark. |
| A | number indicating the font style, as the bookmark font styles. |
| DLLEXPORT FPDF_BOOKMARK STDCALL FPDFBookmark_GetNextSibling | ( | FPDF_DOCUMENT | document, |
| FPDF_BOOKMARK | bookmark | ||
| ) |
Get next bookmark item on the same level.
| [in] | document | - Handle to the document. Returned by FPDF_LoadDocument or FPDF_LoadMemDocument. |
| [in] | bookmark | - Handle to the current bookmark. Cannot be NULL. |
| Handle | to the next bookmark item on the same level. NULL if this is the last bookmark on this level. |
| DLLEXPORT int STDCALL FPDFBookmark_GetPageFirstLine | ( | FPDF_PAGE | page, |
| void * | buffer, | ||
| int | buflen | ||
| ) |
Get first text line of the page, which can be used for alternative bookmark, if no bookmark is available.
| [in] | page | - The page handle. |
| [out] | buffer | - A buffer for output the text. Can be NULL. |
| [in] | buflen | - The length of the buffer, number of bytes. Can be 0. |
The return value always indicated number of bytes required for the buffer, even when there is no buffer specified, or the buffer size is less then required. In this case, the buffer will not be modified.
TEMPORARY FUNCTION WILL BE OBSOLETE SOON!
| Number | of bytes the text line consumes, including trailing zeros. |
| DLLEXPORT unsigned long STDCALL FPDFBookmark_GetTitle | ( | FPDF_BOOKMARK | bookmark, |
| void * | buffer, | ||
| unsigned long | buflen | ||
| ) |
Get title of a bookmark.
| [in] | bookmark | - Handle to the bookmark. |
| [out] | buffer | - A buffer for output the title. Can be NULL. |
| [in] | buflen | - The length of the buffer, number of bytes. Can be 0.. |
The return value always indicated number of bytes required for the buffer, even when there is no buffer specified, or the buffer size is less then required. In this case, the buffer will not be modified.
| Number | of bytes the title consumes, including trailing zeros. |
| DLLEXPORT unsigned long STDCALL FPDFDest_GetPageIndex | ( | FPDF_DOCUMENT | document, |
| FPDF_DEST | dest | ||
| ) |
Get page index of a destination.
| [in] | document | - Handle to the document. |
| [in] | dest | - Handle to the destination. |
| The | page index. Starting from 0 for the first page. |
| DLLEXPORT unsigned long STDCALL FPDFDest_GetZoomMode | ( | FPDF_DEST | dest | ) |
Get the designated zoom mode of a destination.
| [in] | dest | - Handle to the destination. |
| A | type number as the zoom modes. |
| DLLEXPORT double STDCALL FPDFDest_GetZoomParam | ( | FPDF_DEST | dest, |
| int | param | ||
| ) |
Get zoom parameters.
| [in] | dest | - Handle to the destination. |
| [in] | param | - Index of the parameter, starting with zero (see comments below). |
| A | float number for the zoom parameter. |
| DLLEXPORT FPDF_ACTION STDCALL FPDFLink_GetAction | ( | FPDF_LINK | link | ) |
Get action info of a link.
| [in] | link | - Handle to the link. |
| Handle | to the action. NULL if there is no action associated with the link. |
| DLLEXPORT FPDF_DEST STDCALL FPDFLink_GetDest | ( | FPDF_DOCUMENT | document, |
| FPDF_LINK | link | ||
| ) |
Get destination info of a link.
| [in] | document | - Handle to the document. |
| [in] | link | - Handle to the link. Returned by FPDFLink_GetLinkAtPoint. |
| Handle | to the destination. NULL if there is no destination associated with the link, in this case the application should try FPDFLink_GetAction. |
| DLLEXPORT FPDF_LINK STDCALL FPDFLink_GetLinkAtPoint | ( | FPDF_PAGE | page, |
| double | x, | ||
| double | y | ||
| ) |
Find a link at specified point on a document page.
| [in] | page | - Handle to the document page. |
| [in] | x | - The x coordinate of the point, specified in page coordinate system. |
| [in] | y | - The y coordinate of the point, specified in page coordinate system. |
| Handle | to the link. NULL if no link found at that point. |