Thanks Leonard. I have successfully validated the URL links in the pdf
and I am having problem in getting page destination for internal links.

 

PdfDictionary pagedic = reader.GetPageN(i);

if (pagedic.Contains(PdfName.ANNOTS))

{

PdfArray annotarray =
(PdfArray)PdfReader.GetPdfObject(pagedic.Get(PdfName.ANNOTS));


foreach (PdfIndirectReference annot in annotarray.ArrayList)

{

PdfDictionary pdfAnnot = (PdfDictionary)PdfReader.GetPdfObject(annot);

            if(pdfAnnot.Contains(PdfName.DEST))

{

                  PdfObject destObj = pdfAnnot.Get(PdfName.DEST);

PdfArray destArray = (PdfArray)destObj;

// here i am get this arraylist

//[0] {58 0 R}

//[1] {FitH}

//[2] {648}

     //How to get destination page number from PdfArray?

}

}

}

 

Sample code or guidance is much appreciated.

 

Regards,

Selvakumar

 

From: Leonard Rosenthol [mailto:[email protected]] 
Sent: Wednesday, February 24, 2010 11:01 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Identifying dead links in the pdf

 

Sure.

 

1)      Iterate over each page of the PDF.  

2)      Find all annotations of type Link

3)      Process it according to whatever rules you want.

 

Leonard

 

From: Selvakumar, Sivagnanam [mailto:[email protected]] 
Sent: Wednesday, February 24, 2010 5:33 AM
To: [email protected]
Subject: [iText-questions] Identifying dead links in the pdf

 

Hi All,

Is it possible to check dead links in the pdf using ITexthsharp?

If yes please provide me the logic?

Regards,

Selvakumar

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to