2019 年更新:查看 PDFium 引擎源代码和头文件时(链接在这里)。我过滤掉了这些 API 调用定义:
virtual bool New(const char* url);
virtual bool New(const char* url,
virtual void PageOffsetUpdated(const pp::Point& page_offset);
virtual void PluginSizeUpdated(const pp::Size& size);
virtual void ScrolledToXPosition(int position);
virtual void ScrolledToYPosition(int position);
virtual void PrePaint();
virtual void Paint(const pp::Rect& rect,
virtual void PostPaint();
virtual bool HandleDocumentLoad(const pp::URLLoader& loader);
virtual bool HandleEvent(const pp::InputEvent& event);
virtual uint32_t QuerySupportedPrintOutputFormats();
virtual void PrintBegin();
virtual pp::Resource PrintPages(
virtual void PrintEnd();
virtual void StartFind(const char* text, bool case_sensitive);
virtual bool SelectFindResult(bool forward);
virtual void StopFind();
virtual void ZoomUpdated(double new_zoom_level);
virtual void RotateClockwise();
virtual void RotateCounterclockwise();
virtual std::string GetSelectedText();
virtual std::string GetLinkAtPosition(const pp::Point& point);
virtual bool IsSelecting();
virtual bool HasPermission(DocumentPermission permission) const;
virtual void SelectAll();
virtual int GetNumberOfPages();
virtual int GetNamedDestinationPage(const std::string& destination);
virtual int GetFirstVisiblePage();
virtual int GetMostVisiblePage();
virtual pp::Rect GetPageRect(int index);
virtual pp::Rect GetPageContentsRect(int index);
virtual int GetVerticalScrollbarYPosition() { return position_.y(); }
virtual void PaintThumbnail(pp::ImageData* image_data, int index);
virtual void SetGrayscale(bool grayscale);
virtual void OnCallback(int id);
virtual std::string GetPageAsJSON(int index);
virtual bool GetPrintScaling();
virtual void AppendBlankPages(int num_pages);
virtual void AppendPage(PDFEngine* engine, int index);
virtual pp::Point GetScrollPosition();
virtual void SetScrollPosition(const pp::Point& position);
virtual bool IsProgressiveLoad();
virtual pp::Instance* GetPluginInstance();
virtual pp::URLLoader CreateURLLoader();
virtual void OnPartialDocumentLoaded();
virtual void OnPendingRequestComplete();
virtual void OnNewDataAvailable();
virtual void OnDocumentComplete();
void UnsupportedFeature(int type);
void GetVisibleSelectionsScreenRects(std::vector<pp::Rect>* rects);
static int GetBlock(void* param, unsigned long position,
static bool IsDataAvail(FX_FILEAVAIL* param,
static void AddSegment(FX_DOWNLOADHINTS* param,
void LoadDocument();
bool TryLoadingDoc(bool with_password,
bool* needs_password);
void GetPasswordAndLoad();
void OnGetPasswordComplete(int32_t result,
void ContinueLoadingDocument(bool has_password,
void FinishLoadingDocument();
void LoadPageInfo(bool reload);
void CalculateVisiblePages();
bool IsPageVisible(int index) const;
bool CheckPageAvailable(int index, std::vector<int>* pending);
void UpdateTickMarks();
void ContinueFind(int32_t result);
void AddFindResult(const PDFiumRange& result);
void SearchUsingPDFium(const base::string16& term,
bool case_sensitive,
bool first_search,
int character_to_start_searching_from,
int current_page);
void SearchUsingICU(const base::string16& term,
bool case_sensitive,
bool first_search,
int character_to_start_searching_from,
int current_page);
bool OnMouseDown(const pp::MouseInputEvent& event);
bool OnMouseUp(const pp::MouseInputEvent& event);
bool OnMouseMove(const pp::MouseInputEvent& event);
bool OnKeyDown(const pp::KeyboardInputEvent& event);
bool OnKeyUp(const pp::KeyboardInputEvent& event);
bool OnChar(const pp::KeyboardInputEvent& event);
void FitContentsToPrintableAreaIfRequired(
void SaveSelectedFormForPrint();
int* page_index,
int* char_index,
int* page_index,
int* char_index,
void OnSingleClick(int page_index, int char_index);
void OnMultipleClick(int click_count, int page_index, int char_index);
int StartPaint(int page_index, const pp::Rect& dirty);
bool ContinuePaint(int progressive_index, pp::ImageData* image_data);
void FinishPaint(int progressive_index, pp::ImageData* image_data);
void CancelPaints();
void InvalidateAllPages();
void FillPageSides(int progressive_index);
void PaintPageShadow(int progressive_index, pp::ImageData* image_data);
void DrawSelections(int progressive_index, pp::ImageData* image_data);
void PaintUnavailablePage(int page_index,
int GetProgressiveIndex(int page_index) const;
void GetPDFiumRect(int page_index, const pp::Rect& rect, int* start_x,
int* start_y, int* size_x, int* size_y) const;
int GetRenderingFlags() const;
void Highlight(void* buffer,
int stride,
void DeviceToPage(int page_index,
int GetVisiblePageIndex(FPDF_PAGE page);
void SetCurrentPage(int index);
void TransformPDFPageForPrinting(FPDF_PAGE page,
void DrawPageShadow(const pp::Rect& page_rect,
void GetRegion(const pp::Point& location,
void** region,
int* stride) const;
void OnSelectionChanged();
static void Form_Invalidate(FPDF_FORMFILLINFO* param,
static void Form_OutputSelectedRect(FPDF_FORMFILLINFO* param,
static void Form_SetCursor(FPDF_FORMFILLINFO* param, int cursor_type);
static int Form_SetTimer(FPDF_FORMFILLINFO* param,
int elapse,
static void Form_KillTimer(FPDF_FORMFILLINFO* param, int timer_id);
static FPDF_SYSTEMTIME Form_GetLocalTime(FPDF_FORMFILLINFO* param);
static void Form_OnChange(FPDF_FORMFILLINFO* param);
static FPDF_PAGE Form_GetPage(FPDF_FORMFILLINFO* param,
int page_index);
static FPDF_PAGE Form_GetCurrentPage(FPDF_FORMFILLINFO* param,
static int Form_GetRotation(FPDF_FORMFILLINFO* param, FPDF_PAGE page);
static void Form_ExecuteNamedAction(FPDF_FORMFILLINFO* param,
static void Form_SetTextFieldFocus(FPDF_FORMFILLINFO* param,
static void Form_DoURIAction(FPDF_FORMFILLINFO* param, FPDF_BYTESTRING uri);
static void Form_DoGoToAction(FPDF_FORMFILLINFO* param,
int page_index,
int zoom_mode,
int size_of_array);
static int Form_Alert(IPDF_JSPLATFORM* param,
int type,
int icon);
static void Form_Beep(IPDF_JSPLATFORM* param, int type);
static int Form_Response(IPDF_JSPLATFORM* param,
void* response,
int length);
static int Form_GetFilePath(IPDF_JSPLATFORM* param,
void* file_path,
int length);
static void Form_Mail(IPDF_JSPLATFORM* param,
void* mail_data,
int length,
static void Form_Print(IPDF_JSPLATFORM* param,
int start,
int end,
static void Form_SubmitForm(IPDF_JSPLATFORM* param,
void* form_data,
int length,
static void Form_GotoPage(IPDF_JSPLATFORM* param, int page_number);
static int Form_Browse(IPDF_JSPLATFORM* param, void* file_path, int length);
static FPDF_BOOL Pause_NeedToPauseNow(IFSDK_PAUSE* param);
int32_t password_tries_remaining_;
bool defer_page_unload_;
bool selecting_;
int next_page_to_search_;
int last_page_to_search_;
int last_character_index_to_search_; // -1 if search until end of page.
int current_find_index_;
int next_timer_id_;
int last_page_mouse_down_;
int first_visible_page_;
int most_visible_page_;
bool called_do_document_action_;
bool render_grayscale_;
int page_index;
int painted_;
int progressive_paint_timeout_;
bool getting_password_;
virtual bool RenderPDFPageToDC(const void* pdf_buffer,
int buffer_size,
int page_number,
virtual bool RenderPDFPageToBitmap(const void* pdf_buffer,
int pdf_buffer_size,
int page_number,
void* bitmap_buffer);
virtual bool GetPDFDocInfo(const void* pdf_buffer,
int buffer_size,
int* page_count,
virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer,
int pdf_buffer_size, int page_number,