code: public PdfIndirectReference getAsIndirectObject(PdfName key) {
          PdfIndirectReference ref = null;
          // not getDirect this time.
          PdfObject orig = get(key); 
          if (orig != null && orig.isIndirect()) {
              ref = (PdfIndirectReference) orig;
          }
          return ref;
      }
docs: Returns a <CODE>PdfObject</CODE> as a <CODE>PdfIndirectReference</CODE>.
  
  The object associated with the <CODE>PdfName</CODE> given is retrieved
  If it is a <CODE>PdfIndirectReference</CODE>, it is cast down and returned
  as such. Otherwise <CODE>null</CODE> is returned.
  
  @param key A <CODE>PdfName</CODE>
  @return the associated <CODE>PdfIndirectReference</CODE> object,
  or <CODE>null</CODE>