some of the Text Box annotation properties don't work

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

TatianaS
User
Posts: 103
Joined: Mon Mar 18, 2013 4:26 pm

some of the Text Box annotation properties don't work

Post by TatianaS »

hello,

when I try to set Underline and Strikeout on Text Box annotation via API, it doesn't seem to work.

GetProperty('Tools.TextBox.Style', dataOut, 0);
fCoPDFXCview.SetProperty('Commenting.TextBox.Styles[#' + IntToStr(dataOut) + '].TextFormat.Char.Underline', '1', 0);
fCoPDFXCview.SetProperty('Commenting.TextBox.Styles[#' + IntToStr(dataOut) + '].TextFormat.Char.Strikeout', '1', 0);

Could you check it out please.
Thanks
-Tatiana
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: some of the Text Box annotation properties don't work

Post by Vasyl - PDF-XChange »

Problem is because you specified '1' but should be simple number. If you wanted to use string value instead of numeric then we have:

Underline:
"No", // == 0
"False", // == 0
"Yes", // == 0x10
"True", // == 0x10
"Double", // == 0x30
"Word", // == 0x50
"DoubleWord", // == 0x70

Strikeout : boolean
"yes", "true" // == 1
"no", "false" // == 0

HTH
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
TatianaS
User
Posts: 103
Joined: Mon Mar 18, 2013 4:26 pm

Re: some of the Text Box annotation properties don't work

Post by TatianaS »

I tried with
1/0 for Strikeout and 16 for the Underline
as well as:
'True'/'False'
'true'/'false'
'Yes'/'No'
but without success

this is one Example:
GetProperty('Tools.TextBox.Style', styleNumber, 0);

SetProperty('Commenting.TextBox.Styles[#' + IntToStr(styleNumber) + '].TextFormat.Char.Underline', 16, 0);
SetProperty('Commenting.TextBox.Styles[#' + IntToStr(styleNumber) + '].TextFormat.Char.Strikeout', 1, 0);

also, when I get the properties, they seem like they are set correctly

GetProperty('Commenting.TextBox.Styles[#' + IntToStr(styleNumber) + '].TextFormat.Char.Underline', dataOut, 0);
returns 16
GetProperty('Commenting.TextBox.Styles[#' + IntToStr(styleNumber) + '].TextFormat.Char.Strikeout', dataOut, 0);
returns 1
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: some of the Text Box annotation properties don't work

Post by Vasyl - PDF-XChange »

..but without success..
It means that SetProperty() returned error?
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
TatianaS
User
Posts: 103
Joined: Mon Mar 18, 2013 4:26 pm

Re: some of the Text Box annotation properties don't work

Post by TatianaS »

Hi,
Thanks for quick response. I have repro steps here:

1. Create Text Box annotation
2. Set the text to be underlined and Strikeout
3. Make it Default Text for the Text Box annotation
4. Copy and paste any Text to the document.

Result: The Text Box annotation is created with all default text properties (name, size, italic, bold, color) but underlined and Strikeout properties are not set.
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: some of the Text Box annotation properties don't work

Post by Vasyl - PDF-XChange »

Hi, Tatiana.

The issue has been reproduced and will be fixed in next build. Thanks for good explanation.

Best
Regards.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.