Hello, I'm trying to create a PDF accesible document as a result of concatenate 
several pdf documents that contain internal links, but when I pass the 
accessibility test it tells that the document is not correctly tagged because 
the links are not included in the structure tree.
I have read the chapters related to this subject in the book "iText in action" 
and i look for some question on the forum but I have not found anything that 
can help me.
This is the code that i use for tagged the links:

              //Links page j
              ArrayList oLinks = oPDFReader.getLinks(j);
              if(oLinks.size()>0){
                 PdfDictionary oDictLinks = new PdfDictionary();
                 //
                 oDictLinks.put(PdfName.ALT, new PdfString("Enlaces"));
                 //
                 PdfStructureElement oEstrEnlaces = new 
PdfStructureElement(oEstrDoc, PdfName.ANNOTS);
                 oEstrEnlaces.merge(oDictLinks);
                 //
                 for (int nEnlace = 0; nEnlace < oLinks.size(); nEnlace++) { 
                    PdfDictionary oDictLink = new PdfDictionary();
                   //
                   oDictLink.put(PdfName.ALT, new PdfString("Enlace"));
                   //
                   PdfStructureElement oEstrLink = new 
PdfStructureElement(oEstrEnlaces, PdfName.LINK);             
                   oEstrLink.merge(oDictLink);                  
                     //
                   oCbFinal.beginMarkedContentSequence(oEstrLink);
                   //Se añade el enlace al documento que se está creando
                   PdfAnnotation.PdfImportedLink oLink = 
(PdfAnnotation.PdfImportedLink)oLinks.get(nEnlace); 
                   //                                     
                   
oCbFinal.getPdfWriter().addAnnotation(oLink.createAnnotation(oCbFinal.getPdfWriter()));
                   oCbFinal.endMarkedContentSequence();
                 }                
              }

Any idea?
Thanks.
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to