StickyNote Font Size Setting

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

patient chart manager, llc
User
Posts: 29
Joined: Thu Jan 03, 2013 7:43 pm

StickyNote Font Size Setting

Post by patient chart manager, llc »

Hi, I cannot find any way to change this, and defaults to Arial 7, no TextFormat item for this.

Thanks
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19868
Joined: Mon Jan 12, 2009 8:07 am

Re: StickyNote Font Size Setting

Post by Stefan - PDF-XChange »

Hello patient chart manager, llc,

You would need to obtain all the available sticky note styles first using code like this:

Code: Select all

...
// Enumerate all styles for stickynote comment:
GetProperty("Commenting.StickyNote.Styles.Count", DataOut, 0);
Count = DataOut;
...
for i = 0 to Count-1
{
  GetProperty("Commenting.StickyNote.Styles[" + i + "].ID", DataOut, 0);
 ...
}
...
And then once you know the ID of the style you want to modify - apply the font and size like this:

Code: Select all

SetProperty("Commenting.StickyNote.Styles[" + i + "].TextFormat.Char.FontName", "Arial", 0);
SetProperty("Commenting.StickyNote.Styles[" + i + "].TextFormat.Char.FontSize", "12", 0);
All the available Char style options are:
Font Group[R] Represents information about the font of this character.
FontSize Double[R] Font size.
FColor Integer[R] Fill color.
SColor Integer[R] Strike color.
HScale Double[R] Horizontal scaling.
RMode Integer[R] Rendering mode.
Rise Double[R] Base line offset (text rise).