Page 1 of 1

text style for freeText annotation

Posted: Mon Nov 26, 2018 11:21 am
by aleksand
Hi,
I want to add freeText annotation with style (bold, italic, underline and strike) to page. I can create and add this annotation to page but has some problems with set style of text. Use API documentation and forum I found that bold and italic can be set when font is created (CreateNewFont methods), but I can not find how I can set underline and strike for text annotation. FreeText Interface has property style but description of this property (https://sdkhelp.pdf-xchange.com/vi ... faultStyle) is very poor (BSTR parameter has no description and has not set of correct values). Can you send me example how I can do style of text for annotation? Do you have good API description (a lot of your online help page has like poor description)?

Thanks,
Evgeny.

Re: text style for freeText annotation

Posted: Thu Nov 29, 2018 1:03 pm
by aleksand
Dear people from Tracker Dev Team,

Can you help me with text style for freeText annotation?

Thanks,
Evgeny.

Re: text style for freeText annotation

Posted: Fri Nov 30, 2018 1:01 pm
by Sasha - Tracker Dev Team
Hello Evgeny,

The default style property for the annotation is the DS key of the free text annotation (by the PDF Reference). Please read the PDF Reference "TABLE 8.74 CSS2 style attributes used in rich text strings" for the detailed values explanation:
Capture47.PNG
Then do for example:

Code: Select all

data.DefaultStyle = "color:#000000;";
Cheers,
Alex

Re: text style for freeText annotation

Posted: Fri Nov 30, 2018 3:15 pm
by aleksand
Hello Alex,

Thanks a lot for example. Now I understand the input format of data for this method of IPXC_AnnotData class.

Cheers,
Evgeny.

Re: text style for freeText annotation

Posted: Fri Nov 30, 2018 3:18 pm
by Tracker Supp-Stefan
:D