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

Maruan Sahyoun commented on PDFBOX-3723:
----------------------------------------

You can simplify your code by using  {{COSString.getString()}} to get the 
content as {{String}} like this

{code}
if (fdfField.getValue() instanceof COSString)
{
    fdfValue = ((COSString)fdfField.getValue()).getString()
}
{code}

> FDFField.getValue() doesn't return the values in line with the Javadoc.
> -----------------------------------------------------------------------
>
>                 Key: PDFBOX-3723
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3723
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.0, 2.0.4, 2.0.5
>            Reporter: Maruan Sahyoun
>            Assignee: Maruan Sahyoun
>             Fix For: 2.0.6
>
>
> For the 2.0.x releases {{FDFField.getValue()}} doesn't neither return the 
> documented {{PDTextStream}} return type nor {{String}} for values of type 
> {{COSString}} or {{COSStream}}. This has somewhat be masked by another issue 
> fixed in PDFBOX-3596. 
> As {{PDTextStream}} is no longer available we should return as {{String}} 
> (which is inline with {{PDField}}) and adjust the javadoc accordingly.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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

Reply via email to