It's been quite a while since I posted this question, and this issue still
doesn't have a clear answer, as far as I can see...
Any new thoughts on the matter?

On Tue, Nov 20, 2012 at 8:21 PM Gilad Denneboom <gilad.denneb...@gmail.com>
wrote:

> Hi people,
>
> Another query here... I'm trying to add a new named destination to a file,
> but for some reason it doesn't show up...
>
> Here's the relevant piece of code I'm using for it:
>
>         PDDestinationNameTreeNode dests =
> doc.getDocumentCatalog().getNames().getDests();
>
>         PDPageXYZDestination d = new PDPageXYZDestination();
>         d.setLeft(500);
>         d.setTop(500);
>         d.setPageNumber(0);
>
>         Map<String, Object> destList = dests.getNames();
>         Map<String, COSObjectable> newList = new HashMap<String,
> COSObjectable>();
>
>         Iterator<String> it = destList.keySet().iterator();
>         while(it.hasNext()) {
>             String key = it.next();
>             System.out.println(key);
>             System.out.println(destList.get(key));
>             newList.put(key, (COSObjectable)destList.get(key));
>         }
>         newList.put("1", d);
>         dests.setNames(newList);
>
> Does anyone see any obvious problems, or am I going at it the wrong way?
>

Reply via email to