David PHAM-VAN

Increase PDF version to 1.7

@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 2
3 * Add Document ID 3 * Add Document ID
4 * Add encryption support 4 * Add encryption support
  5 +* Increase PDF version to 1.7
5 6
6 ## 1.3.13 7 ## 1.3.13
7 8
@@ -43,6 +43,9 @@ class PdfCatalog extends PdfObject { @@ -43,6 +43,9 @@ class PdfCatalog extends PdfObject {
43 void _prepare() { 43 void _prepare() {
44 super._prepare(); 44 super._prepare();
45 45
  46 + /// the PDF specification version, overrides the header version starting from 1.4
  47 + params['/Version'] = PdfStream.string('/${pdfDocument.version}');
  48 +
46 params['/Pages'] = pdfPageList.ref(); 49 params['/Pages'] = pdfPageList.ref();
47 50
48 // the Outlines object 51 // the Outlines object
@@ -89,6 +89,9 @@ class PdfDocument { @@ -89,6 +89,9 @@ class PdfDocument {
89 /// Object used to encrypt the document 89 /// Object used to encrypt the document
90 PdfEncryption encryption; 90 PdfEncryption encryption;
91 91
  92 + /// The PDF specification version
  93 + final String version = '1.7';
  94 +
92 /// These map the page modes just defined to the pagemodes setting of Pdf. 95 /// These map the page modes just defined to the pagemodes setting of Pdf.
93 static const List<String> _PdfPageModes = <String>[ 96 static const List<String> _PdfPageModes = <String>[
94 '/UseNone', 97 '/UseNone',