Esempio n. 1
0
    /// <summary>
    /// Writes a key/value pair of this dictionary. This function is intended to be overridden
    /// in derived classes.
    /// </summary>
    internal virtual void WriteDictionaryElement(PdfWriter writer, PdfName key)
    {
      if (key == null)
        throw new ArgumentNullException("key");
      PdfItem item = Elements[key];
#if DEBUG
      // TODO: simplify PDFsharp
      if (item is PdfObject && ((PdfObject)item).IsIndirect)
      {
        // Replace an indirect object by its Reference
        item = ((PdfObject)item).Reference;
        Debug.Assert(false, "Check when we come here.");
      }
#endif
      key.WriteObject(writer);
      item.WriteObject(writer);
      writer.NewLine();
    }
Esempio n. 2
0
 /// <summary>
 /// Writes a key/value pair of this dictionary. This function is intended to be overridden
 /// in derived classes.
 /// </summary>
 internal virtual void WriteDictionaryElement(PdfWriter writer, PdfName key)
 {
   if (key == null)
     throw new ArgumentNullException("key");
   PdfItem item = Elements[key];
   key.WriteObject(writer);
   item.WriteObject(writer);
   writer.NewLine();
 }