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
some of the Text Box annotation properties don't work
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 103
- Joined: Mon Mar 18, 2013 4:26 pm
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: some of the Text Box annotation properties don't work
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
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.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 103
- Joined: Mon Mar 18, 2013 4:26 pm
Re: some of the Text Box annotation properties don't work
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
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
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: some of the Text Box annotation properties don't work
It means that SetProperty() returned error?..but without success..
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.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 103
- Joined: Mon Mar 18, 2013 4:26 pm
Re: some of the Text Box annotation properties don't work
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.
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.
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: some of the Text Box annotation properties don't work
Hi, Tatiana.
The issue has been reproduced and will be fixed in next build. Thanks for good explanation.
Best
Regards.
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.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.