Hi,

Going through the iText in Action - 2nd Edition examples using iTextSharp 5.0.0.

part2.chapter07.LinkActions:
http://itextpdf.com/examples/index.php?page=example&id=131

creates a PdfAction (no named destination?) of Subtype GoToR:

page1.setAction(new PdfAction("movie_links_1.pdf", 1));

Then part2.chapter07.ConcatenateNamedDestinations:
http://itextpdf.com/examples/index.php?page=example&id=133

calls MakeRemoteNamedDestinationsLocal() using a PdfReader that reads the 
result file from LinkActions. When I run the example an Exception is thrown:

Unhandled Exception: System.ArgumentNullException: Key cannot be null.
Parameter name: key
   at System.Collections.Hashtable.get_Item(Object key)
   at iTextSharp.text.pdf.PdfReader.ConvertNamedDestination(PdfObject obj, 
Hashtable names)
   at iTextSharp.text.pdf.PdfReader.MakeRemoteNamedDestinationsLocal()
   at testMakeRemoteNamedDestinationsLocal.Main(String[] args)

If I comment out the line that sets the PdfAction, the example runs. Would 
someone else verify that the Exception is a result of the PdfAction without the 
named destination? It might be my error, since this is a three-part example. 
Besides part2.chapter07.LinkActions, you also need part1.chapter02.MovieLinks1 
to run the example:
http://itextpdf.com/examples/index.php?page=example&id=46

Thanks

keith






                                          
_________________________________________________________________
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
http://clk.atdmt.com/GBL/go/210850552/direct/01/
------------------------------------------------------------------------------
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
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
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