src/providers/Azos.Media/PDF/PdfWriter.cs
/// <summary>
/// Writes PDF document trailer into file stream
/// </summary>
/// <param name="trailer">PDF document trailer</param>
Writes PDF document trailer into file stream
Writes PDF document trailer into file stream
internal void Write(PdfTrailer trailer)
    {
      writeLineRaw("xref");
      writeLineRaw("0 {0}", trailer.LastObjectId + 1);
      writeLineRaw("0000000000 65535 f");
      foreach (var offset in trailer.ObjectOffsets)
      {
        writeLineRaw("{0} 00000 n", offset);
      }
      writeLineRaw("trailer");
      writeBeginDictionary();
      writeDictionaryEntry("/Size", trailer.LastObjectId + 1);
      writeDictionaryEntry("/Root", trailer.Root.GetReference());
      writeDictionaryEntry("/Info", trailer.Root.Info.GetReference());
      writeEndDictionary();
      writeLineRaw("startxref");
      writeLineRaw("{0}", trailer.XRefOffset);
      writeRaw(Encoding.ASCII.GetBytes("%%EOF"));
    }
internal void Write ( PdfTrailer trailer ) { writeLineRaw ( " " ) ; writeLineRaw ( " " , trailer . LastObjectId + 1 ) ; writeLineRaw ( " " ) ; foreach ( var offset in trailer . ObjectOffsets ) { writeLineRaw ( " " , offset ) ; } writeLineRaw ( " " ) ; writeBeginDictionary ( ) ; writeDictionaryEntry ( " " , trailer . LastObjectId + 1 ) ; writeDictionaryEntry ( " " , trailer . Root . GetReference ( ) ) ; writeDictionaryEntry ( " " , trailer . Root . Info . GetReference ( ) ) ; writeEndDictionary ( ) ; writeLineRaw ( " " ) ; writeLineRaw ( " " , trailer . XRefOffset ) ; writeRaw ( Encoding . ASCII . GetBytes ( " " ) ) ; }
Writes PDF document trailer into file stream
Writes PDF document trailer into file stream
trailer
PdfTrailer
PDF document trailer
PDF document trailer