Programmatically set thickness of drawing tool

New Here ,
Dec 02, 2020 Dec 02, 2020

Copy link to clipboard

Copied

I am using Adobe Embed API and I would like to change the thickness (and also the color) of the output of the drawing tool. Using a SET_USER_SETTINGS_API callback, I received an object 

annotationTooltipShownMap: {
freetext:  false
highlight: false
note: false
shape: false
strikeout: false
underline: false
}
However, I cannot find the parameters I need to give to the GET_USER_SETTINGS_API callback in order to change the thickness and color of the drawing tool. I would also be very glad for a link that discusses the parameters for these APIs. 
 
Thanks!

Views

99

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Employee , Dec 03, 2020 Dec 03, 2020
Thanks for using PDF Embed API. Currently, it is not possible to change the thickness of the drawing tool programmatically. But it is possible to store the user's color preferences for each annotation tool. Same are stored with below key in object return/expected by SET_USER_SETTING_API and GET_USER_SETTING_API "previewAnnotationColorMap": { "freetext": "#16EC83", "note": "#16EC83", "shape": "#16EC83", "highlight": "#16EC83", "underline": "#16EC83", "strikeout": "#16EC83"...

Likes

Translate

Translate
New Here ,
Dec 03, 2020 Dec 03, 2020

Copy link to clipboard

Copied

In fact, the Documentation on Adobe Embed API explicitly says "For example, you could store the user’s color choice for any annotation tool. In that case, new annotations subsequently receive the updated color". However, the necessary field names aren't given anywhere.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 03, 2020 Dec 03, 2020

Copy link to clipboard

Copied

Thanks for using PDF Embed API. Currently, it is not possible to change the thickness of the drawing tool programmatically. But it is possible to store the user's color preferences for each annotation tool. Same are stored with below key in object return/expected by SET_USER_SETTING_API and GET_USER_SETTING_API

"previewAnnotationColorMap": {
"freetext": "#16EC83",
"note": "#16EC83",
"shape": "#16EC83",
"highlight": "#16EC83",
"underline": "#16EC83",
"strikeout": "#16EC83"
}

 The reason, it is not reflecting in your settings object because the user did not change any annotation's color from the default ones.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 04, 2020 Dec 04, 2020

Copy link to clipboard

Copied

LATEST

Shubhanshu, thank you for your answer. If one could change the thickness of the drawing tool, that would turn it into a text marker, something that users very much like when commenting on actual paper, and that commercial kits often offer. Would it be possible to include that in a future update?

 

I will use the fields you showed in your answer for changing the color. It would be greatly appreciated if the documentation somewhere listed all fields that can be set.

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines