Frameworks
React Native
Flutter
Package samples
Cookbook
Version 11
Version 10
Version 9
Version 8
Version 7
Version 6
Version 5
AnnotEdit
tool class can edit the style of a selected annotation easily by using annotation style dialog . You can set AnnotEdit
tool to ToolManager
as described here: change tool mode .
With Apryse library, you can change annotation styles such as border color, border thickness, fill color, etc. To change annotation style, you must lock PDF document first. For more information about locking document, see: document locking.
To change an annotation border thickness:
BorderStyle
from the annotation by calling annot.getBorderStyle()
.BorderSytle
by calling borderStyle.setWidth(double)
.annot.refreshAppearance()
.PDFViewCtrl
contents by calling pdfViewCtrl.update()
.To make annotation border invisible, call borderStyle.setWidth(0)
.
If there is a FreeText
annotation, to set the border color of the annotation, call freeText.setLineColor(ColorPt, int)
. To set the border color of the other annotation types, call annot.setColor(ColorPt, int)
.
To set the color of a Text
annotation, call annot.setColor(ColorPt, int)
.
To change the opacity of a Markup
annotation, callMarkup.setOpacity(double)
:
To set the fill color of a Markup
annotation, call Markup.setInteriorColor(ColorPt, int)
.
To change a Text
annotation icon, call Text.setIcon(String)
. After changing the icon, you must refresh the annotation appearance by calling AnnotUtils.refreshStickyNoteAppearance(Annot, PDFViewCtrl)
.
For available icons, see: default icons table .
To change the text color of a FreeText
annotation, call FreeText.setTextColor(ColorPt, int)
.
To change the text size of a FreeText
annotation, call FreeText.setFontSize(double)
.
The follow code snippet shows how to set the font to a FreeText
annotation:
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales