text style for freeText annotation

A forum for questions or concerns related to the PDF-XChange Core API SDK

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
aleksand
User
Posts: 11
Joined: Tue Apr 24, 2018 6:55 am

text style for freeText annotation

Post 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.
aleksand
User
Posts: 11
Joined: Tue Apr 24, 2018 6:55 am

Re: text style for freeText annotation

Post by aleksand »

Dear people from Tracker Dev Team,

Can you help me with text style for freeText annotation?

Thanks,
Evgeny.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: text style for freeText annotation

Post 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
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
aleksand
User
Posts: 11
Joined: Tue Apr 24, 2018 6:55 am

Re: text style for freeText annotation

Post 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.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: text style for freeText annotation

Post by Tracker Supp-Stefan »

:D
Post Reply