You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "John Hewson (JIRA)" <ji...@apache.org> on 2014/10/10 23:46:33 UTC

[jira] [Closed] (PDFBOX-270) setAnnotations method not functioning

     [ https://issues.apache.org/jira/browse/PDFBOX-270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Hewson closed PDFBOX-270.
------------------------------
    Resolution: Won't Fix

Closing due to the age of this issue. I suspect it is fixed already.

> setAnnotations method not functioning
> -------------------------------------
>
>                 Key: PDFBOX-270
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-270
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>            Priority: Minor
>
> [imported from SourceForge]
> http://sourceforge.net/tracker/index.php?group_id=78314&atid=552832&aid=1706893
> Originally submitted by nobody on 2007-04-24 13:04.
> The following code:
> List annotList = page.getAnnotations();
> Vector deletions = new Vector();
>                     
> for(int j=0;j<annotList.size();j++){
>   COSDictionary cdict = ((PDAnnotation)annotList.get(j)).getDictionary();
>   if(cdict.getDictionaryObject("V")==null){
>     deletions.add((PDAnnotation)annotList.get(j));
>   }
>                     
>   annotList.removeAll(deletions);
>                     
>   page.setAnnotations(annotList);
> is resulting in the page not actually changing the annotation list.  The page originally contains 2 annotations.  After the removeAll call, annotList contains a list of one PDAnnotation.  After the page.setAnnotations call, getAnnotations() still has a size of 2, not 1.
> email: atodd@eoriginal.com



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)