title: iTextSharp - how to open/read/extract a file attachment?
body: <p>I have some PDF's all with two attached files with static names.  I would like to use iTextSharp to extract these files to a temp directory so that I can work with them further.  I tried following the tutorial <a href="http://itextpdf.com/tutorials.php?branch=tutorials.attachments&amp;node=doclevel" rel="nofollow noreferrer">here</a> but I ran into problems when the <code>iTextSharp.text.pdf.PdfReader</code> didn't have a <code>getCatalog()</code> method as shown in the bottom example.</p>
  
  <p>Any advice on how I can extract the attachments?  Let's just say for ease that the PDF document is at "C:\test.pdf" and the two attachments are stored as "attach1.xml" and "attach2.xml".</p>