diff options
Diffstat (limited to 'public/fpdf_edit.h')
-rw-r--r-- | public/fpdf_edit.h | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h index e7f6cc4a70..677bce80b1 100644 --- a/public/fpdf_edit.h +++ b/public/fpdf_edit.h @@ -407,7 +407,7 @@ FPDFPageObjMark_GetParamIntValue(FPDF_PAGEOBJECTMARK mark, // out_buflen - pointer to variable that will receive the length of the value. // Not filled if false is returned. // -// Returns TRUE if the key maps to a string value, FALSE otherwise. +// Returns TRUE if the key maps to a string/blob value, FALSE otherwise. FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPageObjMark_GetParamStringValue(FPDF_PAGEOBJECTMARK mark, FPDF_BYTESTRING key, @@ -416,6 +416,26 @@ FPDFPageObjMark_GetParamStringValue(FPDF_PAGEOBJECTMARK mark, unsigned long* out_buflen); // Experimental API. +// Get the value of a blob property in a content mark by key. +// |buffer| is only modified if |buflen| is longer than or equal to the length +// of the value. +// +// mark - handle to a content mark. +// key - string key of the property. +// buffer - buffer for holding the returned value. +// buflen - length of the buffer. +// out_buflen - pointer to variable that will receive the length of the value. +// Not filled if false is returned. +// +// Returns TRUE if the key maps to a string/blob value, FALSE otherwise. +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV +FPDFPageObjMark_GetParamBlobValue(FPDF_PAGEOBJECTMARK mark, + FPDF_BYTESTRING key, + void* buffer, + unsigned long buflen, + unsigned long* out_buflen); + +// Experimental API. // Set the value of an int property in a content mark by key. If a parameter // with key |key| exists, its value is set to |value|. Otherwise, it is added as // a new parameter. @@ -449,6 +469,25 @@ FPDFPageObjMark_SetStringParam(FPDF_DOCUMENT document, FPDF_BYTESTRING key, FPDF_BYTESTRING value); +// Experimental API. +// Set the value of a blob property in a content mark by key. If a parameter +// with key |key| exists, its value is set to |value|. Otherwise, it is added as +// a new parameter. +// +// document - handle to the document. +// mark - handle to a content mark. +// key - string key of the property. +// value - pointer to blob value to set. +// value_len - size in bytes of |value|. +// +// Returns TRUE if the operation succeeded, FALSE otherwise. +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV +FPDFPageObjMark_SetBlobParam(FPDF_DOCUMENT document, + FPDF_PAGEOBJECTMARK mark, + FPDF_BYTESTRING key, + void* value, + unsigned long value_len); + // Load an image from a JPEG image file and then set it into |image_object|. // // pages - pointer to the start of all loaded pages, may be NULL. |