PdfInfo constructor

PdfInfo(
  1. PdfDocument pdfDocument, {
  2. String? title,
  3. String? author,
  4. String? creator,
  5. String? subject,
  6. String? keywords,
  7. String? producer,
})

Create an information object

Implementation

PdfInfo(
  PdfDocument pdfDocument, {
  this.title,
  this.author,
  this.creator,
  this.subject,
  this.keywords,
  this.producer,
}) : super(
        pdfDocument,
        params: PdfDict.values({
          if (author != null) '/Author': PdfString.fromString(author),
          if (creator != null) '/Creator': PdfString.fromString(creator),
          if (title != null) '/Title': PdfString.fromString(title),
          if (subject != null) '/Subject': PdfString.fromString(subject),
          if (keywords != null) '/Keywords': PdfString.fromString(keywords),
          if (producer != null)
            '/Producer': PdfString.fromString('$producer ($_libraryName)')
          else
            '/Producer': PdfString.fromString(_libraryName),
          '/CreationDate': PdfString.fromDate(DateTime.now()),
        }),
      );