[
https://issues.apache.org/jira/browse/PDFBOX-4515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16820038#comment-16820038
]
Kaushlendra Singh commented on PDFBOX-4515:
-------------------------------------------
Hi [~tilman],
I was trying to fetch the color information for border and the text written
inside it. What does this COSName.DA and COSName.DS stands for? Because when I
am fetching the information stored using getCOSObject(), it returns me
DA: COSString{0.898 0.1333 0.2157 rg /Helv 12 Tf},
DS: COSString{font: Helvetica,sans-serif 12.0pt; text-align:left; color:#E52237
} and
RC: COSString{<?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:19.10.0" xfa:spec="2.0.2"
style="font-size:12.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="color:#E52138;font-family:Helvetica">hello</span></p></body>}
In this case DA and DS matches to the color of the border as visible in Acrobat
Reader and color within RC as text color but when I am trying to set the same
thing again in document like this:
COSString str = new COSString("0.898 0.1333 0.2157 rg");
annotation.getCOSObject().setItem(COSName.DA, str);
COSString str1 = new COSString("color : #0000FF");
annotation.getCOSObject().setItem(COSName.DS, str1);
then both the behaving differently, DA is setting the border color of rectangle
and DS is setting the text color.
I am a bit confused and trying to understand what actual DA and DS does?
> Support for Add Text Callout Annotation tool.
> ---------------------------------------------
>
> Key: PDFBOX-4515
> URL: https://issues.apache.org/jira/browse/PDFBOX-4515
> Project: PDFBox
> Issue Type: Wish
> Components: PDModel
> Affects Versions: 2.0.15
> Reporter: Kaushlendra Singh
> Priority: Major
> Labels: Annotations
> Attachments: Screen Shot 2019-04-15 at 5.39.31 PM.png, myPdf.pdf
>
>
> I am trying to extract information related to "Add Text Callout" annotation
> tool from pdf. I get to know from initial research that it's a "FreeText"
> type annotation and it's intent is "FreeTextCallout". But I am unable to
> figure out like how can I get the rectangle info for both the box and arrow
> attached to it. I am able to get the bounding box which encloses both the
> markups. I don't know it's already implemented or not.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]