text style for freeText annotation

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

Moderators: Tracker Support, TrackerSupp-Daniel, Chris - Tracker Supp, Vasyl-Tracker Dev Team, 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: 6
Joined: Tue Apr 24, 2018 6:55 am

text style for freeText annotation

Post by aleksand » Mon Nov 26, 2018 11:21 am

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.tracker-software.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: 6
Joined: Tue Apr 24, 2018 6:55 am

Re: text style for freeText annotation

Post by aleksand » Thu Nov 29, 2018 1:03 pm

Dear people from Tracker Dev Team,

Can you help me with text style for freeText annotation?

Thanks,
Evgeny.

User avatar
Sasha - Tracker Dev Team
User
Posts: 4076
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: text style for freeText annotation

Post by Sasha - Tracker Dev Team » Fri Nov 30, 2018 1:01 pm

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
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

aleksand
User
Posts: 6
Joined: Tue Apr 24, 2018 6:55 am

Re: text style for freeText annotation

Post by aleksand » Fri Nov 30, 2018 3:15 pm

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: 13324
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: text style for freeText annotation

Post by Tracker Supp-Stefan » Fri Nov 30, 2018 3:18 pm

:D

Post Reply