5 Replies Latest reply: Jan 18, 2012 11:41 AM by 908059 RSS

    Got stuck at page links in PDF

    908059
      Hi,

      I got stuck at this problem: when trying to parse the links in a PDF document, I can detect the links which are URI, but for the links that go to other pages in the same document, I haven't found any solution. Search the web for hours but no luck.

      Here is the code:
      PdfObject aData = annotObj.getDictionary(PdfDictionary.A);
      
      if (aData != null && aData.getNameAsConstant(PdfDictionary.S) == PdfDictionary.URI) 
                                  {                
                                      String text = aData.getTextStreamValue(PdfDictionary.URI);
                                      System.out.println("text=" + text);
                                      ret.urlList.add(text);
                                  }
                                  else {
      
                                      ret.urlList.add("");
                                  }
      Please help.