diff options
author | xlou <xlou@chromium.org> | 2018-10-12 23:37:41 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-12 23:37:41 +0000 |
commit | 618edef2dfea870c34800dbf3f2fd3f7be819300 (patch) | |
tree | 93b59da0ca1a039f1832fc5bfea7cf20612d035f /public | |
parent | b14a2f2e28d94d4a85b762a5eac9414b2a328bc6 (diff) | |
download | pdfium-618edef2dfea870c34800dbf3f2fd3f7be819300.tar.xz |
Add setters/getters for BleedBox and TrimBox.
Since BleedBox and TrimBox are supported according to PDF
specification, hence added setters and getters to get the
value if exists.
Bug:894655
Change-Id: I3c2600450f07665241a4724457a7cbc4282941ed
Reviewed-on: https://pdfium-review.googlesource.com/c/43977
Commit-Queue: Shirleen Lou <xlou@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'public')
-rw-r--r-- | public/fpdf_transformpage.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/public/fpdf_transformpage.h b/public/fpdf_transformpage.h index c1abe76979..899e5c6058 100644 --- a/public/fpdf_transformpage.h +++ b/public/fpdf_transformpage.h @@ -45,6 +45,36 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetCropBox(FPDF_PAGE page, float top); /** + * Set "BleedBox" entry to the page dictionary. + * + * page - Handle to a page. + * left - The left of the rectangle. + * bottom - The bottom of the rectangle. + * right - The right of the rectangle. + * top - The top of the rectangle. + */ +FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetBleedBox(FPDF_PAGE page, + float left, + float bottom, + float right, + float top); + +/** + * Set "TrimBox" entry to the page dictionary. + * + * page - Handle to a page. + * left - The left of the rectangle. + * bottom - The bottom of the rectangle. + * right - The right of the rectangle. + * top - The top of the rectangle. + */ +FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetTrimBox(FPDF_PAGE page, + float left, + float bottom, + float right, + float top); + +/** * Set "ArtBox" entry to the page dictionary. * * page - Handle to a page. @@ -96,6 +126,42 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_GetCropBox(FPDF_PAGE page, float* top); /** + * Get "BleedBox" entry from the page dictionary. + * + * page - Handle to a page. + * left - Pointer to a float value receiving the left of the rectangle. + * bottom - Pointer to a float value receiving the bottom of the rectangle. + * right - Pointer to a float value receiving the right of the rectangle. + * top - Pointer to a float value receiving the top of the rectangle. + * + * On success, return true and write to the out parameters. Otherwise return + * false and leave the out parameters unmodified. + */ +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_GetBleedBox(FPDF_PAGE page, + float* left, + float* bottom, + float* right, + float* top); + +/** + * Get "TrimBox" entry from the page dictionary. + * + * page - Handle to a page. + * left - Pointer to a float value receiving the left of the rectangle. + * bottom - Pointer to a float value receiving the bottom of the rectangle. + * right - Pointer to a float value receiving the right of the rectangle. + * top - Pointer to a float value receiving the top of the rectangle. + * + * On success, return true and write to the out parameters. Otherwise return + * false and leave the out parameters unmodified. + */ +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_GetTrimBox(FPDF_PAGE page, + float* left, + float* bottom, + float* right, + float* top); + +/** * Get "ArtBox" entry from the page dictionary. * * page - Handle to a page. |