summaryrefslogtreecommitdiff
path: root/public/fpdf_formfill.h
diff options
context:
space:
mode:
authorjaepark <jaepark@google.com>2016-09-09 15:39:09 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-09 15:39:09 -0700
commit75f84a56fed36111ece82d0ac96e87289622b093 (patch)
treea1e1dc33250b3ec31032a2550298cd4af36c3211 /public/fpdf_formfill.h
parent55a1eb01db6ceadf9c180931b2663338b8cbc2fd (diff)
downloadpdfium-75f84a56fed36111ece82d0ac96e87289622b093.tar.xz
Define behaviors of FPDF_RenderPageBitmap_Retail and FPDF_FFLDraw.chromium/2858chromium/2857chromium/2856
Previously, PDFium only supported widget annotations to draw forms. As we've implemented other annotations, the behavior of FPDF_RenderPageBitmap_Retail and FPDF_FFLDraw changed. So, this CL clearly defines what needs to be done in FPDF_RenderPageBitmap_Retail and FPDF_FFLDraw. This CL first assumes that PDFium users will always call FPDF_RenderPageBitmap_Retail and FPDF_FFLDraw to render PDF pages, because otherwise they are not able to support PDF forms. FPDF_RenderPageBitmap_Retail should only deal with non-widget annotations, such as highlight, underline, text, etc. If FPDF_ANNOT flag is passed, non-widget annotations are drawn. Otherwise, they are hidden. FPDF_FFLDraw should only deal with annotations that requires user-interaction, such as widget annotations and popup annotation. Since popup annotation is associated with non-widget annotation, they should not be drawn if the associated annotation is hidden. Thus, if FPDF_ANNOT flag is passed, popup annotations are drawn. Otherwise, they are hidden. Widget annotations should be always drawn regardless of FPDF_ANNOT flag since they need to be always displayed for PDF forms. Also, roll DEPS for testing/corpus to 8485b30. BUG=pdfium:594 Review-Url: https://codereview.chromium.org/2323203002
Diffstat (limited to 'public/fpdf_formfill.h')
-rw-r--r--public/fpdf_formfill.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/public/fpdf_formfill.h b/public/fpdf_formfill.h
index 248bcd2b02..09674b007c 100644
--- a/public/fpdf_formfill.h
+++ b/public/fpdf_formfill.h
@@ -1483,7 +1483,8 @@ DLLEXPORT void STDCALL FPDF_RemoveFormFieldHighlight(FPDF_FORMHANDLE hHandle);
/**
* Function: FPDF_FFLDraw
-* Render FormFeilds on a page to a device independent bitmap.
+* Render FormFields and popup window on a page to a device independent
+*bitmap.
* Parameters:
* hHandle - Handle to the form fill module. Returned by
*FPDFDOC_InitFormFillEnvironment.
@@ -1508,13 +1509,15 @@ DLLEXPORT void STDCALL FPDF_RemoveFormFieldHighlight(FPDF_FORMHANDLE hHandle);
* Return Value:
* None.
* Comments:
-* This method is designed to only render annotations and FormFields on
-*the page.
-* Without FPDF_ANNOT specified for flags, Rendering functions such as
-*FPDF_RenderPageBitmap or FPDF_RenderPageBitmap_Start will only render page
-*contents(without annotations) to a bitmap.
-* In order to implement the FormFill functions,Implementation should
-*call this method after rendering functions finish rendering the page contents.
+* This function is designed to render annotations that are
+*user-interactive, which are widget annotation (for FormFields) and popup
+*annotation.
+* With FPDF_ANNOT flag, this function will render popup annotation
+*when users mouse-hover on non-widget annotation. Regardless of FPDF_ANNOT flag,
+*this function will always render widget annotations for FormFields.
+* In order to implement the FormFill functions, implementation should
+*call this function after rendering functions, such as FPDF_RenderPageBitmap or
+*FPDF_RenderPageBitmap_Start, finish rendering the page contents.
**/
DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle,
FPDF_BITMAP bitmap,