toDict method

PdfDict<PdfDataType> toDict()

Implementation

PdfDict toDict() {
  final PdfName? s;
  switch (style) {
    case PdfPageLabelStyle.arabic:
      s = const PdfName('/D');
      break;
    case PdfPageLabelStyle.romanUpper:
      s = const PdfName('/R');
      break;
    case PdfPageLabelStyle.romanLower:
      s = const PdfName('/r');
      break;
    case PdfPageLabelStyle.lettersUpper:
      s = const PdfName('/A');
      break;
    case PdfPageLabelStyle.lettersLower:
      s = const PdfName('/a');
      break;
    case null:
      s = null;
  }
  return PdfDict.values({
    if (s != null) '/S': s,
    if (prefix != null && prefix!.isNotEmpty)
      '/P': PdfString.fromString(prefix!),
    if (subsequent != null) '/St': PdfNum(subsequent!)
  });
}