예제 #1
0
 /// <summary>
 /// Writes the string literal with encoding DOCEncoded.
 /// </summary>
 internal override void WriteObject(PdfWriter writer)
 {
   writer.WriteBeginObject(this);
   writer.Write(new PdfString(this.value, this.flags));
   writer.WriteEndObject();
 }
예제 #2
0
 /// <summary>
 /// Writes the real literal.
 /// </summary>
 internal override void WriteObject(PdfWriter writer)
 {
   writer.WriteBeginObject(this);
   writer.Write(this.value);
   writer.WriteEndObject();
 }
예제 #3
0
    internal override void WriteObject(PdfWriter writer)
    {
      writer.WriteBeginObject(this);
      //int count = Elements.Count;
      PdfName[] keys = Elements.KeyNames;

#if DEBUG
      // TODO: automatically set length
      if (this.stream != null)
        Debug.Assert(Elements.Contains(PdfDictionary.PdfStream.Keys.Length), "Dictionary has a stream but no length is set.");
#endif

#if DEBUG
      // Sort keys for debugging purposes. Comparing PDF files with for example programms like
      // Araxis Merge is easier with sorted keys.
      if (writer.Layout == PdfWriterLayout.Verbose)
      {
        ArrayList list = new ArrayList(keys);
        list.Sort(PdfName.Comparer);
        list.CopyTo(keys, 0);
      }
#endif

      foreach (PdfName key in keys)
        WriteDictionaryElement(writer, key);
      if (Stream != null)
        WriteDictionaryStream(writer);
      writer.WriteEndObject();
    }
예제 #4
0
 /// <summary>
 /// Writes the keyword «null».
 /// </summary>
 internal override void WriteObject(PdfWriter writer)
 {
   writer.WriteBeginObject(this);
   writer.WriteRaw(" null ");
   writer.WriteEndObject();
 }
예제 #5
0
 internal override void WriteObject(PdfWriter writer)
 {
   writer.WriteBeginObject(this);
   int count = Elements.Count;
   for (int idx = 0; idx < count; idx++)
   {
     PdfItem value = Elements[idx];
     value.WriteObject(writer);
   }
   writer.WriteEndObject();
 }
예제 #6
0
 /// <summary>
 /// Writes the name including the leading slash.
 /// </summary>
 internal override void WriteObject(PdfWriter writer)
 {
     writer.WriteBeginObject(this);
     writer.Write(new PdfName(_value));
     writer.WriteEndObject();
 }