Source/NFX/Media/PDF/PdfWriter.cs
/// <summary>
/// Writes PDF info into file stream
/// </summary>
/// <param name="info">PDF document info</param>
Writes PDF info into file stream
Writes PDF info into file stream
internal void Write(PdfInfo info)
    {
      writeBeginObject(info.ObjectId);
      writeBeginDictionary();
      if (info.Title.IsNotNullOrWhiteSpace())
        writeDictionaryEntry("/Title", info.Title);
      if (info.Subject.IsNotNullOrWhiteSpace())
        writeDictionaryEntry("/Subject", info.Subject);
      if (info.Keywords.IsNotNullOrWhiteSpace())
        writeDictionaryEntry("/Keywords", info.Keywords);
      if (info.Author.IsNotNullOrWhiteSpace())
        writeDictionaryEntry("/Author", info.Author);
      if (info.Creator.IsNotNullOrWhiteSpace())
        writeDictionaryEntry("/Creator", info.Creator);
      if (info.Producer.IsNotNullOrWhiteSpace())
        writeDictionaryEntry("/Producer", info.Producer);
      writeDictionaryEntry("/CreationDate", DATE_PDF_FORMAT.Args(info.CreationDate == DateTime.MinValue ? DateTime.UtcNow : info.CreationDate));
      writeDictionaryEntry("/ModDate", DATE_PDF_FORMAT.Args(info.ModificationDate == DateTime.MinValue ? DateTime.UtcNow : info.ModificationDate));
      writeEndDictionary();
      writeEndObject();
    }
internal void Write ( PdfInfo info ) { writeBeginObject ( info . ObjectId ) ; writeBeginDictionary ( ) ; if ( info . Title . IsNotNullOrWhiteSpace ( ) ) writeDictionaryEntry ( " " , info . Title ) ; if ( info . Subject . IsNotNullOrWhiteSpace ( ) ) writeDictionaryEntry ( " " , info . Subject ) ; if ( info . Keywords . IsNotNullOrWhiteSpace ( ) ) writeDictionaryEntry ( " " , info . Keywords ) ; if ( info . Author . IsNotNullOrWhiteSpace ( ) ) writeDictionaryEntry ( " " , info . Author ) ; if ( info . Creator . IsNotNullOrWhiteSpace ( ) ) writeDictionaryEntry ( " " , info . Creator ) ; if ( info . Producer . IsNotNullOrWhiteSpace ( ) ) writeDictionaryEntry ( " " , info . Producer ) ; writeDictionaryEntry ( " " , DATE_PDF_FORMAT . Args ( info . CreationDate == DateTime . MinValue ? DateTime . UtcNow : info . CreationDate ) ) ; writeDictionaryEntry ( " " , DATE_PDF_FORMAT . Args ( info . ModificationDate == DateTime . MinValue ? DateTime . UtcNow : info . ModificationDate ) ) ; writeEndDictionary ( ) ; writeEndObject ( ) ; }
Writes PDF info into file stream
Writes PDF info into file stream
info
PdfInfo
PDF document info
PDF document info