|
@@ -234,6 +234,11 @@ class CPDFWorker {
|
|
if (annotation.backgroundColor && annotation.operate === 'mod-form') {
|
|
if (annotation.backgroundColor && annotation.operate === 'mod-form') {
|
|
setWidgetBackgroundColor(annotation)
|
|
setWidgetBackgroundColor(annotation)
|
|
}
|
|
}
|
|
|
|
+ if (annotation.title && annotation.operate === 'mod-form') {
|
|
|
|
+ const { annotPtr, title: rawTitle } = annotation
|
|
|
|
+ const title = stringToNewUTF8(rawTitle)
|
|
|
|
+ Module._SetButtonTitle(annotPtr, title)
|
|
|
|
+ }
|
|
if (annotation.fieldName) {
|
|
if (annotation.fieldName) {
|
|
setWidgetFieldName(annotation)
|
|
setWidgetFieldName(annotation)
|
|
}
|
|
}
|
|
@@ -797,6 +802,9 @@ function getAnnotation({
|
|
const createDate = parseAdobePDFTimestamp(UTF8ToString(rawCreateDate))
|
|
const createDate = parseAdobePDFTimestamp(UTF8ToString(rawCreateDate))
|
|
const rawContent = Module._GetAnnotContent(annotPtr)
|
|
const rawContent = Module._GetAnnotContent(annotPtr)
|
|
const content = UTF8ToString(rawContent)
|
|
const content = UTF8ToString(rawContent)
|
|
|
|
+ const rawTitle = Module._GetAnnotTitle(annotPtr)
|
|
|
|
+ const title = UTF8ToString(rawTitle)
|
|
|
|
+ console.log(title)
|
|
|
|
|
|
const transparency = roundToDecimalPlaces(Module._GetAnnotTransparency(annotPtr))
|
|
const transparency = roundToDecimalPlaces(Module._GetAnnotTransparency(annotPtr))
|
|
|
|
|
|
@@ -1307,10 +1315,10 @@ function setAnnotContent(data) {
|
|
}
|
|
}
|
|
|
|
|
|
function setAnnotRGBColor(data) {
|
|
function setAnnotRGBColor(data) {
|
|
- const { annotPtr, color } = data
|
|
|
|
- const { R = 255, G = 255, B = 255 } = color
|
|
|
|
|
|
+ const { annotPtr, color:rawColor } = data
|
|
|
|
+ const color = convertColorToCppFormat(rawColor)
|
|
|
|
|
|
- const isSetColorSuccess = Module._SetAnnotRGBColor(annotPtr, R / 255, G / 255, B / 255)
|
|
|
|
|
|
+ const isSetColorSuccess = Module._SetAnnotRGBColor(annotPtr, color.R, color.G, color.B)
|
|
return !!isSetColorSuccess
|
|
return !!isSetColorSuccess
|
|
}
|
|
}
|
|
|
|
|