[ 
https://issues.apache.org/jira/browse/PDFBOX-5052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17251871#comment-17251871
 ] 

Tilman Hausherr commented on PDFBOX-5052:
-----------------------------------------

Oh, I understand. I guess that's Adobe weirdness.

I did what you wanted with Adobe Reader and got this in contents: "test 1234 
test", and in the rich text:
{code}
<?xml version="1.0"?><body xmlns="http://www.w3.org/1999/xhtml"; 
xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"; 
xfa:APIVersion="Acrobat:20.13.0" xfa:spec="2.0.2"  
style="font-size:20.0pt;text-align:left;color:#0000FF;font-weight:normal;font-style:normal;font-family:Helvetica,sans-serif;font-stretch:normal"><p
 dir="ltr"><span style="font-family:Helvetica">test </span><span 
style="font-weight:bold;font-family:Helvetica">1234</span><span 
style="font-family:Helvetica"> test</span></p></body>
{code}
and in the default style string "font: Helvetica,sans-serif 20.0pt; 
text-align:left; color:#0000FF".

> Text Callout annotations strips comment text
> --------------------------------------------
>
>                 Key: PDFBOX-5052
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5052
>             Project: PDFBox
>          Issue Type: Bug
>            Reporter: Kaushlendra Singh
>            Priority: Major
>         Attachments: Screen Shot 2020-12-18 at 10.18.08 PM.png, 
> annotations2.pdf
>
>
> While creating "Text Callout" annotation, library is striping out the comment 
> text.
> For example, library is ignoring seconds occurrence of the word "test" in 
> "<b>test 1234</b> test" as it is present after first stylized text.
> Code being used:
> {code:java}
> PDAnnotationMarkup freeTextAnnotation = new PDAnnotationMarkup();
> freeTextAnnotation.setAnnotationName(annotationId);
> freeTextAnnotation.setContents("<b>test 1234</b> test");
> freeTextAnnotation.setTitlePopup("");
> freeTextAnnotation.setColor(new PDColor(rgb, PDDeviceRGB.INSTANCE));
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to