src/providers/Azos.Media/PDF/PdfWriter.cs
/// <summary>
/// Writes PDF document page tree into file stream
/// </summary>
/// <param name="pageTree">PDF document page tree</param>
Writes PDF document page tree into file stream
Writes PDF document page tree into file stream
internal void Write(PdfPageTree pageTree)
    {
      if (pageTree.Pages.Count == 0)
        throw new InvalidOperationException("PDF document has no pages");
      var pages = string.Join(Constants.SPACE, pageTree.Pages.Select(p => p.GetReference()));
      writeBeginObject(pageTree.ObjectId);
      writeBeginDictionary();
      writeDictionaryEntry("/Type", "/Pages");
      writeDictionaryEntry("/Count", pageTree.Pages.Count);
      writeDictionaryEntry("/Kids", ARRAY_PDF_FORMAT.Args(pages));
      writeEndDictionary();
      writeEndObject();
    }
internal void Write ( PdfPageTree pageTree ) { if ( pageTree . Pages . Count == 0 ) throw new InvalidOperationException ( " " ) ; var pages = string . Join ( Constants . SPACE , pageTree . Pages . Select ( p => p . GetReference ( ) ) ) ; writeBeginObject ( pageTree . ObjectId ) ; writeBeginDictionary ( ) ; writeDictionaryEntry ( " " , " " ) ; writeDictionaryEntry ( " " , pageTree . Pages . Count ) ; writeDictionaryEntry ( " " , ARRAY_PDF_FORMAT . Args ( pages ) ) ; writeEndDictionary ( ) ; writeEndObject ( ) ; }
Writes PDF document page tree into file stream
Writes PDF document page tree into file stream
pageTree
PdfPageTree
PDF document page tree
PDF document page tree