Showing
21 changed files
with
41 additions
and
54 deletions
| @@ -27,11 +27,7 @@ import 'stream.dart'; | @@ -27,11 +27,7 @@ import 'stream.dart'; | ||
| 27 | import 'string.dart'; | 27 | import 'string.dart'; |
| 28 | 28 | ||
| 29 | class PdfArray<T extends PdfDataType> extends PdfDataType { | 29 | class PdfArray<T extends PdfDataType> extends PdfDataType { |
| 30 | - PdfArray([Iterable<T>? values]) { | ||
| 31 | - if (values != null) { | ||
| 32 | - this.values.addAll(values); | ||
| 33 | - } | ||
| 34 | - } | 30 | + PdfArray([Iterable<T>? values]) : values = [if (values != null) ...values]; |
| 35 | 31 | ||
| 36 | static PdfArray<PdfIndirect> fromObjects(Iterable<PdfObjectBase> objects) { | 32 | static PdfArray<PdfIndirect> fromObjects(Iterable<PdfObjectBase> objects) { |
| 37 | return PdfArray(objects.map<PdfIndirect>((e) => e.ref()).toList()); | 33 | return PdfArray(objects.map<PdfIndirect>((e) => e.ref()).toList()); |
| @@ -58,7 +54,7 @@ class PdfArray<T extends PdfDataType> extends PdfDataType { | @@ -58,7 +54,7 @@ class PdfArray<T extends PdfDataType> extends PdfDataType { | ||
| 58 | } | 54 | } |
| 59 | } | 55 | } |
| 60 | 56 | ||
| 61 | - final List<T> values = <T>[]; | 57 | + final List<T> values; |
| 62 | 58 | ||
| 63 | void add(T v) { | 59 | void add(T v) { |
| 64 | values.add(v); | 60 | values.add(v); |
| @@ -26,19 +26,13 @@ import 'object_base.dart'; | @@ -26,19 +26,13 @@ import 'object_base.dart'; | ||
| 26 | import 'stream.dart'; | 26 | import 'stream.dart'; |
| 27 | 27 | ||
| 28 | class PdfDict<T extends PdfDataType> extends PdfDataType { | 28 | class PdfDict<T extends PdfDataType> extends PdfDataType { |
| 29 | - factory PdfDict([Map<String, T>? values]) { | ||
| 30 | - final _values = <String, T>{}; | ||
| 31 | - if (values != null) { | ||
| 32 | - _values.addAll(values); | ||
| 33 | - } | ||
| 34 | - return PdfDict.values(_values); | ||
| 35 | - } | 29 | + PdfDict([Map<String, T>? values]) : values = {if (values != null) ...values}; |
| 36 | 30 | ||
| 37 | - const PdfDict.values([this.values = const {}]); | 31 | + PdfDict.values([Map<String, T>? values]) : values = values ?? {}; |
| 38 | 32 | ||
| 39 | static PdfDict<PdfIndirect> fromObjectMap( | 33 | static PdfDict<PdfIndirect> fromObjectMap( |
| 40 | Map<String, PdfObjectBase> objects) { | 34 | Map<String, PdfObjectBase> objects) { |
| 41 | - return PdfDict( | 35 | + return PdfDict.values( |
| 42 | objects.map<String, PdfIndirect>( | 36 | objects.map<String, PdfIndirect>( |
| 43 | (key, value) => MapEntry<String, PdfIndirect>(key, value.ref()), | 37 | (key, value) => MapEntry<String, PdfIndirect>(key, value.ref()), |
| 44 | ), | 38 | ), |
| @@ -49,6 +43,8 @@ class PdfDict<T extends PdfDataType> extends PdfDataType { | @@ -49,6 +43,8 @@ class PdfDict<T extends PdfDataType> extends PdfDataType { | ||
| 49 | 43 | ||
| 50 | bool get isNotEmpty => values.isNotEmpty; | 44 | bool get isNotEmpty => values.isNotEmpty; |
| 51 | 45 | ||
| 46 | + bool get isEmpty => values.isEmpty; | ||
| 47 | + | ||
| 52 | operator []=(String k, T v) { | 48 | operator []=(String k, T v) { |
| 53 | values[k] = v; | 49 | values[k] = v; |
| 54 | } | 50 | } |
| @@ -25,22 +25,16 @@ import 'object_base.dart'; | @@ -25,22 +25,16 @@ import 'object_base.dart'; | ||
| 25 | import 'stream.dart'; | 25 | import 'stream.dart'; |
| 26 | 26 | ||
| 27 | class PdfDictStream extends PdfDict<PdfDataType> { | 27 | class PdfDictStream extends PdfDict<PdfDataType> { |
| 28 | - factory PdfDictStream({ | 28 | + PdfDictStream({ |
| 29 | Map<String, PdfDataType>? values, | 29 | Map<String, PdfDataType>? values, |
| 30 | Uint8List? data, | 30 | Uint8List? data, |
| 31 | - bool isBinary = false, | ||
| 32 | - bool encrypt = true, | ||
| 33 | - bool compress = true, | ||
| 34 | - }) { | ||
| 35 | - return PdfDictStream.values( | ||
| 36 | - values: values ?? {}, | ||
| 37 | - data: data ?? Uint8List(0), | ||
| 38 | - encrypt: encrypt, | ||
| 39 | - compress: compress, | ||
| 40 | - isBinary: isBinary, | ||
| 41 | - ); | ||
| 42 | - } | 31 | + this.isBinary = false, |
| 32 | + this.encrypt = true, | ||
| 33 | + this.compress = true, | ||
| 34 | + }) : data = data ?? Uint8List(0), | ||
| 35 | + super.values(values ?? {}); | ||
| 43 | 36 | ||
| 37 | + @Deprecated('Use PdfDictStream() instead') | ||
| 44 | PdfDictStream.values({ | 38 | PdfDictStream.values({ |
| 45 | required Map<String, PdfDataType> values, | 39 | required Map<String, PdfDataType> values, |
| 46 | required this.data, | 40 | required this.data, |
| @@ -106,7 +106,7 @@ class PdfChoiceField extends PdfAnnotWidget { | @@ -106,7 +106,7 @@ class PdfChoiceField extends PdfAnnotWidget { | ||
| 106 | class PdfAnnot extends PdfObject<PdfDict> { | 106 | class PdfAnnot extends PdfObject<PdfDict> { |
| 107 | PdfAnnot(this.pdfPage, this.annot) | 107 | PdfAnnot(this.pdfPage, this.annot) |
| 108 | : super(pdfPage.pdfDocument, | 108 | : super(pdfPage.pdfDocument, |
| 109 | - params: PdfDict({ | 109 | + params: PdfDict.values({ |
| 110 | '/Type': const PdfName('/Annot'), | 110 | '/Type': const PdfName('/Annot'), |
| 111 | })) { | 111 | })) { |
| 112 | pdfPage.annotations.add(this); | 112 | pdfPage.annotations.add(this); |
| @@ -315,7 +315,7 @@ abstract class PdfAnnotBase { | @@ -315,7 +315,7 @@ abstract class PdfAnnotBase { | ||
| 315 | } | 315 | } |
| 316 | 316 | ||
| 317 | if (_appearances.isNotEmpty) { | 317 | if (_appearances.isNotEmpty) { |
| 318 | - params['/AP'] = PdfDict(_appearances); | 318 | + params['/AP'] = PdfDict.values(_appearances); |
| 319 | if (_as != null) { | 319 | if (_as != null) { |
| 320 | params['/AS'] = _as!; | 320 | params['/AS'] = _as!; |
| 321 | } | 321 | } |
| @@ -376,7 +376,7 @@ class PdfAnnotNamedLink extends PdfAnnotBase { | @@ -376,7 +376,7 @@ class PdfAnnotNamedLink extends PdfAnnotBase { | ||
| 376 | @override | 376 | @override |
| 377 | void build(PdfPage page, PdfObject object, PdfDict params) { | 377 | void build(PdfPage page, PdfObject object, PdfDict params) { |
| 378 | super.build(page, object, params); | 378 | super.build(page, object, params); |
| 379 | - params['/A'] = PdfDict( | 379 | + params['/A'] = PdfDict.values( |
| 380 | { | 380 | { |
| 381 | '/S': const PdfName('/GoTo'), | 381 | '/S': const PdfName('/GoTo'), |
| 382 | '/D': PdfString.fromString(dest), | 382 | '/D': PdfString.fromString(dest), |
| @@ -412,7 +412,7 @@ class PdfAnnotUrlLink extends PdfAnnotBase { | @@ -412,7 +412,7 @@ class PdfAnnotUrlLink extends PdfAnnotBase { | ||
| 412 | @override | 412 | @override |
| 413 | void build(PdfPage page, PdfObject object, PdfDict params) { | 413 | void build(PdfPage page, PdfObject object, PdfDict params) { |
| 414 | super.build(page, object, params); | 414 | super.build(page, object, params); |
| 415 | - params['/A'] = PdfDict( | 415 | + params['/A'] = PdfDict.values( |
| 416 | { | 416 | { |
| 417 | '/S': const PdfName('/URI'), | 417 | '/S': const PdfName('/URI'), |
| 418 | '/URI': PdfString.fromString(url), | 418 | '/URI': PdfString.fromString(url), |
| @@ -38,7 +38,7 @@ class PdfCatalog extends PdfObject<PdfDict> { | @@ -38,7 +38,7 @@ class PdfCatalog extends PdfObject<PdfDict> { | ||
| 38 | int? objser, | 38 | int? objser, |
| 39 | }) : super( | 39 | }) : super( |
| 40 | pdfDocument, | 40 | pdfDocument, |
| 41 | - params: PdfDict({ | 41 | + params: PdfDict.values({ |
| 42 | '/Type': const PdfName('/Catalog'), | 42 | '/Type': const PdfName('/Catalog'), |
| 43 | }), | 43 | }), |
| 44 | objser: objser, | 44 | objser: objser, |
| @@ -106,7 +106,7 @@ class PdfCatalog extends PdfObject<PdfDict> { | @@ -106,7 +106,7 @@ class PdfCatalog extends PdfObject<PdfDict> { | ||
| 106 | 106 | ||
| 107 | if (pdfDocument.sign != null) { | 107 | if (pdfDocument.sign != null) { |
| 108 | if (pdfDocument.sign!.value.hasMDP) { | 108 | if (pdfDocument.sign!.value.hasMDP) { |
| 109 | - params['/Perms'] = PdfDict({ | 109 | + params['/Perms'] = PdfDict.values({ |
| 110 | '/DocMDP': pdfDocument.sign!.ref(), | 110 | '/DocMDP': pdfDocument.sign!.ref(), |
| 111 | }); | 111 | }); |
| 112 | } | 112 | } |
| @@ -34,7 +34,7 @@ abstract class PdfFont extends PdfObject<PdfDict> { | @@ -34,7 +34,7 @@ abstract class PdfFont extends PdfObject<PdfDict> { | ||
| 34 | PdfFont.create(PdfDocument pdfDocument, {required this.subtype}) | 34 | PdfFont.create(PdfDocument pdfDocument, {required this.subtype}) |
| 35 | : super( | 35 | : super( |
| 36 | pdfDocument, | 36 | pdfDocument, |
| 37 | - params: PdfDict({ | 37 | + params: PdfDict.values({ |
| 38 | '/Type': const PdfName('/Font'), | 38 | '/Type': const PdfName('/Font'), |
| 39 | }), | 39 | }), |
| 40 | ) { | 40 | ) { |
| @@ -30,7 +30,7 @@ class PdfFontDescriptor extends PdfObject<PdfDict> { | @@ -30,7 +30,7 @@ class PdfFontDescriptor extends PdfObject<PdfDict> { | ||
| 30 | this.file, | 30 | this.file, |
| 31 | ) : super( | 31 | ) : super( |
| 32 | ttfFont.pdfDocument, | 32 | ttfFont.pdfDocument, |
| 33 | - params: PdfDict({ | 33 | + params: PdfDict.values({ |
| 34 | '/Type': const PdfName('/FontDescriptor'), | 34 | '/Type': const PdfName('/FontDescriptor'), |
| 35 | }), | 35 | }), |
| 36 | ); | 36 | ); |
| @@ -136,7 +136,7 @@ mixin PdfGraphicStream on PdfObject<PdfDict> { | @@ -136,7 +136,7 @@ mixin PdfGraphicStream on PdfObject<PdfDict> { | ||
| 136 | 136 | ||
| 137 | if (pdfDocument.hasGraphicStates) { | 137 | if (pdfDocument.hasGraphicStates) { |
| 138 | // Declare Transparency Group settings | 138 | // Declare Transparency Group settings |
| 139 | - params['/Group'] = PdfDict({ | 139 | + params['/Group'] = PdfDict.values({ |
| 140 | '/Type': const PdfName('/Group'), | 140 | '/Type': const PdfName('/Group'), |
| 141 | '/S': const PdfName('/Transparency'), | 141 | '/S': const PdfName('/Transparency'), |
| 142 | '/CS': const PdfName('/DeviceRGB'), | 142 | '/CS': const PdfName('/DeviceRGB'), |
| @@ -32,7 +32,7 @@ class PdfInfo extends PdfObject<PdfDict> { | @@ -32,7 +32,7 @@ class PdfInfo extends PdfObject<PdfDict> { | ||
| 32 | this.producer, | 32 | this.producer, |
| 33 | }) : super( | 33 | }) : super( |
| 34 | pdfDocument, | 34 | pdfDocument, |
| 35 | - params: PdfDict({ | 35 | + params: PdfDict.values({ |
| 36 | if (author != null) '/Author': PdfString.fromString(author), | 36 | if (author != null) '/Author': PdfString.fromString(author), |
| 37 | if (creator != null) '/Creator': PdfString.fromString(creator), | 37 | if (creator != null) '/Creator': PdfString.fromString(creator), |
| 38 | if (title != null) '/Title': PdfString.fromString(title), | 38 | if (title != null) '/Title': PdfString.fromString(title), |
| @@ -42,7 +42,7 @@ class PdfNames extends PdfObject<PdfDict> { | @@ -42,7 +42,7 @@ class PdfNames extends PdfObject<PdfDict> { | ||
| 42 | }) { | 42 | }) { |
| 43 | assert(page.pdfDocument == pdfDocument); | 43 | assert(page.pdfDocument == pdfDocument); |
| 44 | 44 | ||
| 45 | - _dests[name] = PdfDict({ | 45 | + _dests[name] = PdfDict.values({ |
| 46 | '/D': PdfArray([ | 46 | '/D': PdfArray([ |
| 47 | page.ref(), | 47 | page.ref(), |
| 48 | const PdfName('/XYZ'), | 48 | const PdfName('/XYZ'), |
| @@ -30,7 +30,7 @@ class PdfObjectStream extends PdfObject<PdfDict> { | @@ -30,7 +30,7 @@ class PdfObjectStream extends PdfObject<PdfDict> { | ||
| 30 | this.isBinary = false, | 30 | this.isBinary = false, |
| 31 | }) : super( | 31 | }) : super( |
| 32 | pdfDocument, | 32 | pdfDocument, |
| 33 | - params: PdfDict({ | 33 | + params: PdfDict.values({ |
| 34 | if (type != null) '/Type': PdfName(type), | 34 | if (type != null) '/Type': PdfName(type), |
| 35 | }), | 35 | }), |
| 36 | ); | 36 | ); |
| @@ -43,7 +43,7 @@ class PdfObjectStream extends PdfObject<PdfDict> { | @@ -43,7 +43,7 @@ class PdfObjectStream extends PdfObject<PdfDict> { | ||
| 43 | 43 | ||
| 44 | @override | 44 | @override |
| 45 | void writeContent(PdfStream s) { | 45 | void writeContent(PdfStream s) { |
| 46 | - PdfDictStream.values( | 46 | + PdfDictStream( |
| 47 | isBinary: isBinary, | 47 | isBinary: isBinary, |
| 48 | values: params.values, | 48 | values: params.values, |
| 49 | data: buf.output(), | 49 | data: buf.output(), |
| @@ -54,7 +54,7 @@ class PdfPage extends PdfObject<PdfDict> with PdfGraphicStream { | @@ -54,7 +54,7 @@ class PdfPage extends PdfObject<PdfDict> with PdfGraphicStream { | ||
| 54 | int? objser, | 54 | int? objser, |
| 55 | int objgen = 0, | 55 | int objgen = 0, |
| 56 | }) : super(pdfDocument, | 56 | }) : super(pdfDocument, |
| 57 | - params: PdfDict({ | 57 | + params: PdfDict.values({ |
| 58 | '/Type': const PdfName('/Page'), | 58 | '/Type': const PdfName('/Page'), |
| 59 | }), | 59 | }), |
| 60 | objser: objser, | 60 | objser: objser, |
| @@ -73,7 +73,7 @@ class PdfPageLabel { | @@ -73,7 +73,7 @@ class PdfPageLabel { | ||
| 73 | case null: | 73 | case null: |
| 74 | s = null; | 74 | s = null; |
| 75 | } | 75 | } |
| 76 | - return PdfDict({ | 76 | + return PdfDict.values({ |
| 77 | if (s != null) '/S': s, | 77 | if (s != null) '/S': s, |
| 78 | if (prefix != null && prefix!.isNotEmpty) | 78 | if (prefix != null && prefix!.isNotEmpty) |
| 79 | '/P': PdfString.fromString(prefix!), | 79 | '/P': PdfString.fromString(prefix!), |
| @@ -31,7 +31,7 @@ class PdfPageList extends PdfObject<PdfDict> { | @@ -31,7 +31,7 @@ class PdfPageList extends PdfObject<PdfDict> { | ||
| 31 | int? objser, | 31 | int? objser, |
| 32 | }) : super( | 32 | }) : super( |
| 33 | pdfDocument, | 33 | pdfDocument, |
| 34 | - params: PdfDict({ | 34 | + params: PdfDict.values({ |
| 35 | '/Type': const PdfName('/Pages'), | 35 | '/Type': const PdfName('/Pages'), |
| 36 | }), | 36 | }), |
| 37 | objgen: objgen, | 37 | objgen: objgen, |
| @@ -45,7 +45,7 @@ class PdfSignature extends PdfObject<PdfDict> { | @@ -45,7 +45,7 @@ class PdfSignature extends PdfObject<PdfDict> { | ||
| 45 | List<Uint8List>? ocsp, | 45 | List<Uint8List>? ocsp, |
| 46 | }) : super( | 46 | }) : super( |
| 47 | pdfDocument, | 47 | pdfDocument, |
| 48 | - params: PdfDict({ | 48 | + params: PdfDict.values({ |
| 49 | '/Type': const PdfName('/Sig'), | 49 | '/Type': const PdfName('/Sig'), |
| 50 | }), | 50 | }), |
| 51 | ) { | 51 | ) { |
| @@ -69,7 +69,7 @@ class PdfSoftMask { | @@ -69,7 +69,7 @@ class PdfSoftMask { | ||
| 69 | String toString() => '$runtimeType'; | 69 | String toString() => '$runtimeType'; |
| 70 | 70 | ||
| 71 | PdfDict output() { | 71 | PdfDict output() { |
| 72 | - final params = PdfDict({ | 72 | + final params = PdfDict.values({ |
| 73 | '/S': const PdfName('/Luminosity'), | 73 | '/S': const PdfName('/Luminosity'), |
| 74 | '/G': _mask.ref(), | 74 | '/G': _mask.ref(), |
| 75 | }); | 75 | }); |
| @@ -115,7 +115,7 @@ class PdfTtfFont extends PdfFont { | @@ -115,7 +115,7 @@ class PdfTtfFont extends PdfFont { | ||
| 115 | file.buf.putBytes(data); | 115 | file.buf.putBytes(data); |
| 116 | file.params['/Length1'] = PdfNum(data.length); | 116 | file.params['/Length1'] = PdfNum(data.length); |
| 117 | 117 | ||
| 118 | - final descendantFont = PdfDict({ | 118 | + final descendantFont = PdfDict.values({ |
| 119 | '/Type': const PdfName('/Font'), | 119 | '/Type': const PdfName('/Font'), |
| 120 | '/BaseFont': PdfName('/$fontName'), | 120 | '/BaseFont': PdfName('/$fontName'), |
| 121 | '/FontFile2': file.ref(), | 121 | '/FontFile2': file.ref(), |
| @@ -127,7 +127,7 @@ class PdfTtfFont extends PdfFont { | @@ -127,7 +127,7 @@ class PdfTtfFont extends PdfFont { | ||
| 127 | '/CIDToGIDMap': const PdfName('/Identity'), | 127 | '/CIDToGIDMap': const PdfName('/Identity'), |
| 128 | '/DW': const PdfNum(1000), | 128 | '/DW': const PdfNum(1000), |
| 129 | '/Subtype': const PdfName('/CIDFontType2'), | 129 | '/Subtype': const PdfName('/CIDFontType2'), |
| 130 | - '/CIDSystemInfo': PdfDict({ | 130 | + '/CIDSystemInfo': PdfDict.values({ |
| 131 | '/Supplement': const PdfNum(0), | 131 | '/Supplement': const PdfNum(0), |
| 132 | '/Registry': PdfString.fromString('Adobe'), | 132 | '/Registry': PdfString.fromString('Adobe'), |
| 133 | '/Ordering': PdfString.fromString('Identity-H'), | 133 | '/Ordering': PdfString.fromString('Identity-H'), |
| @@ -64,7 +64,7 @@ class PdfType1Font extends PdfFont { | @@ -64,7 +64,7 @@ class PdfType1Font extends PdfFont { | ||
| 64 | 64 | ||
| 65 | final fontDescriptor = PdfObject<PdfDict>( | 65 | final fontDescriptor = PdfObject<PdfDict>( |
| 66 | pdfDocument, | 66 | pdfDocument, |
| 67 | - params: PdfDict({ | 67 | + params: PdfDict.values({ |
| 68 | '/Type': const PdfName('/FontDescriptor'), | 68 | '/Type': const PdfName('/FontDescriptor'), |
| 69 | '/FontName': PdfName('/$fontName'), | 69 | '/FontName': PdfName('/$fontName'), |
| 70 | '/Flags': PdfNum(32 + (isFixedPitch ? 1 : 0)), | 70 | '/Flags': PdfNum(32 + (isFixedPitch ? 1 : 0)), |
| @@ -102,7 +102,7 @@ void main() { | @@ -102,7 +102,7 @@ void main() { | ||
| 102 | expect(PdfDict().toString(), '<<>>'); | 102 | expect(PdfDict().toString(), '<<>>'); |
| 103 | 103 | ||
| 104 | expect( | 104 | expect( |
| 105 | - PdfDict({ | 105 | + PdfDict.values({ |
| 106 | '/Name': const PdfName('/Value'), | 106 | '/Name': const PdfName('/Value'), |
| 107 | '/Bool': const PdfBool(true), | 107 | '/Bool': const PdfBool(true), |
| 108 | '/Num': const PdfNum(42), | 108 | '/Num': const PdfNum(42), |
| @@ -33,7 +33,7 @@ void main() { | @@ -33,7 +33,7 @@ void main() { | ||
| 33 | final pages = PdfObjectBase( | 33 | final pages = PdfObjectBase( |
| 34 | objser: objser++, | 34 | objser: objser++, |
| 35 | settings: settings, | 35 | settings: settings, |
| 36 | - params: PdfDict({ | 36 | + params: PdfDict.values({ |
| 37 | '/Type': const PdfName('/Pages'), | 37 | '/Type': const PdfName('/Pages'), |
| 38 | '/Count': const PdfNum(1), | 38 | '/Count': const PdfNum(1), |
| 39 | })); | 39 | })); |
| @@ -48,11 +48,11 @@ void main() { | @@ -48,11 +48,11 @@ void main() { | ||
| 48 | final page = PdfObjectBase( | 48 | final page = PdfObjectBase( |
| 49 | objser: objser++, | 49 | objser: objser++, |
| 50 | settings: settings, | 50 | settings: settings, |
| 51 | - params: PdfDict({ | 51 | + params: PdfDict.values({ |
| 52 | '/Type': const PdfName('/Page'), | 52 | '/Type': const PdfName('/Page'), |
| 53 | '/Parent': pages.ref(), | 53 | '/Parent': pages.ref(), |
| 54 | '/MediaBox': PdfArray.fromNum([0, 0, 595.27559, 841.88976]), | 54 | '/MediaBox': PdfArray.fromNum([0, 0, 595.27559, 841.88976]), |
| 55 | - '/Resources': PdfDict({ | 55 | + '/Resources': PdfDict.values({ |
| 56 | '/ProcSet': PdfArray([ | 56 | '/ProcSet': PdfArray([ |
| 57 | const PdfName('/PDF'), | 57 | const PdfName('/PDF'), |
| 58 | ]), | 58 | ]), |
| @@ -65,7 +65,7 @@ void main() { | @@ -65,7 +65,7 @@ void main() { | ||
| 65 | final catalog = PdfObjectBase( | 65 | final catalog = PdfObjectBase( |
| 66 | objser: objser++, | 66 | objser: objser++, |
| 67 | settings: settings, | 67 | settings: settings, |
| 68 | - params: PdfDict({ | 68 | + params: PdfDict.values({ |
| 69 | '/Type': const PdfName('/Catalog'), | 69 | '/Type': const PdfName('/Catalog'), |
| 70 | '/Pages': pages.ref(), | 70 | '/Pages': pages.ref(), |
| 71 | })); | 71 | })); |
-
Please register or login to post a comment