Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: experimental/PdfViewer/pdfspec_autogen.py

Issue 17395005: put each generated pdf api class in a file (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « experimental/PdfViewer/pdf_viewer_main.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import datatypes 1 import datatypes
2 2
3 def buildPdfSpec(pdfspec): 3 def buildPdfSpec(pdfspec):
4 pdfspec.addClass('StreamCommonDictionary', 'Dictionary', 'Entries common to al l stream dictionaries')\ 4 pdfspec.addClass('StreamCommonDictionary', 'Dictionary', 'Entries common to al l stream dictionaries')\
5 .required('NULL')\ 5 .required('NULL')\
6 .field('Length')\ 6 .field('Length')\
7 .name('Length')\ 7 .name('Length')\
8 .type('integer')\ 8 .type('integer')\
9 .comment('(Required) The number of bytes from the beginning of the lin e fol-\nlowing the keyword stream to the last byte just before the keyword\nends tream. (There may be an additional EOL marker, preceding\nendstream, that is not included in the count and is not logically part\nof the stream data.) See "Stre am Extent," above, for further discus-\nsion.')\ 9 .comment('(Required) The number of bytes from the beginning of the lin e fol-\nlowing the keyword stream to the last byte just before the keyword\nends tream. (There may be an additional EOL marker, preceding\nendstream, that is not included in the count and is not logically part\nof the stream data.) See "Stre am Extent," above, for further discus-\nsion.')\
10 .done().done()\ 10 .done().done()\
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 pdfspec.addClass('CcittfaxdecodeFilterDictionary', 'Dictionary', 'Optional par ameters for the CCITTFaxDecode filter')\ 76 pdfspec.addClass('CcittfaxdecodeFilterDictionary', 'Dictionary', 'Optional par ameters for the CCITTFaxDecode filter')\
77 .optional()\ 77 .optional()\
78 .field('K')\ 78 .field('K')\
79 .name('K')\ 79 .name('K')\
80 .type('integer')\ 80 .type('integer')\
81 .comment('()A code identifying the encoding scheme used:\n <0 Pure two-dimensional encoding (Group 4)\n 0 Pure one-dimensional encoding (Grou p 3, 1-D)\n >0 Mixed one- and two-dimensional encoding (Group 3,\n 2- D), in which a line encoded one-dimensionally can be\n followed by at mos t K - 1 lines encoded two-dimensionally\nThe filter distinguishes among negative , zero, and positive values of\nK to determine how to interpret the encoded data ; however, it does\nnot distinguish between different positive K values. Default value: 0.')\ 81 .comment('()A code identifying the encoding scheme used:\n <0 Pure two-dimensional encoding (Group 4)\n 0 Pure one-dimensional encoding (Grou p 3, 1-D)\n >0 Mixed one- and two-dimensional encoding (Group 3,\n 2- D), in which a line encoded one-dimensionally can be\n followed by at mos t K - 1 lines encoded two-dimensionally\nThe filter distinguishes among negative , zero, and positive values of\nK to determine how to interpret the encoded data ; however, it does\nnot distinguish between different positive K values. Default value: 0.')\
82 .done().done()\ 82 .done().done()\
83 .optional()\ 83 .optional()\
84 .field('EndOfLine')\ 84 .field('EndOfLine')\
85 .name('EndOfLine')\ 85 .name('EndOfLine')\
86 .type(' boolean')\ 86 .type('boolean')\
87 .comment('()A flag indicating whether end-of-line bit patterns are req uired to be\npresent in the encoding. The CCITTFaxDecode filter always accepts\n end-of-line bit patterns, but requires them only if EndOfLine is true.\nDefault value: false.')\ 87 .comment('()A flag indicating whether end-of-line bit patterns are req uired to be\npresent in the encoding. The CCITTFaxDecode filter always accepts\n end-of-line bit patterns, but requires them only if EndOfLine is true.\nDefault value: false.')\
88 .done().done()\ 88 .done().done()\
89 .optional()\ 89 .optional()\
90 .field('EncodedByteAlign')\ 90 .field('EncodedByteAlign')\
91 .name('EncodedByteAlign')\ 91 .name('EncodedByteAlign')\
92 .type(' boolean')\ 92 .type('boolean')\
93 .comment('()A flag indicating whether the filter expects extra 0 bits before each\nencoded line so that the line begins on a byte boundary. If true, t he\nfilter skips over encoded bits to begin decoding each line at a byte\nbounda ry. If false, the filter does not expect extra bits in the encod-\ned representa tion. Default value: false.')\ 93 .comment('()A flag indicating whether the filter expects extra 0 bits before each\nencoded line so that the line begins on a byte boundary. If true, t he\nfilter skips over encoded bits to begin decoding each line at a byte\nbounda ry. If false, the filter does not expect extra bits in the encod-\ned representa tion. Default value: false.')\
94 .done().done()\ 94 .done().done()\
95 .optional()\ 95 .optional()\
96 .field('Columns')\ 96 .field('Columns')\
97 .name('Columns')\ 97 .name('Columns')\
98 .type(' integer')\ 98 .type('integer')\
99 .comment('()The width of the image in pixels. If the value is not a mu ltiple of 8,\nthe filter adjusts the width of the unencoded image to the next mu l-\ntiple of 8, so that each line starts on a byte boundary. Default value:\n172 8.')\ 99 .comment('()The width of the image in pixels. If the value is not a mu ltiple of 8,\nthe filter adjusts the width of the unencoded image to the next mu l-\ntiple of 8, so that each line starts on a byte boundary. Default value:\n172 8.')\
100 .done().done()\ 100 .done().done()\
101 .optional()\ 101 .optional()\
102 .field('Rows')\ 102 .field('Rows')\
103 .name('Rows')\ 103 .name('Rows')\
104 .type(' integer')\ 104 .type('integer')\
105 .comment('()The height of the image in scan lines. If the value is 0 o r absent, the\nimage\'s height is not predetermined, and the encoded data must b e\nterminated by an end-of-block bit pattern or by the end of the fil-\nter\'s d ata. Default value: 0.')\ 105 .comment('()The height of the image in scan lines. If the value is 0 o r absent, the\nimage\'s height is not predetermined, and the encoded data must b e\nterminated by an end-of-block bit pattern or by the end of the fil-\nter\'s d ata. Default value: 0.')\
106 .done().done()\ 106 .done().done()\
107 .optional()\ 107 .optional()\
108 .field('EndOfBlock')\ 108 .field('EndOfBlock')\
109 .name('EndOfBlock')\ 109 .name('EndOfBlock')\
110 .type(' boolean')\ 110 .type('boolean')\
111 .comment('()A flag indicating whether the filter expects the encoded d ata to be\nterminated by an end-of-block pattern, overriding the Rows pa-\nramet er. If false, the filter stops when it has decoded the number of\nlines indicate d by Rows or when its data has been exhausted, which-\never occurs first. The en d-of-block pattern is the CCITT end-of-\nfacsimile-block (EOFB) or return-to-con trol (RTC) appropriate for\nthe K parameter. Default value: true.')\ 111 .comment('()A flag indicating whether the filter expects the encoded d ata to be\nterminated by an end-of-block pattern, overriding the Rows pa-\nramet er. If false, the filter stops when it has decoded the number of\nlines indicate d by Rows or when its data has been exhausted, which-\never occurs first. The en d-of-block pattern is the CCITT end-of-\nfacsimile-block (EOFB) or return-to-con trol (RTC) appropriate for\nthe K parameter. Default value: true.')\
112 .done().done()\ 112 .done().done()\
113 .optional()\ 113 .optional()\
114 .field('BlackIs1')\ 114 .field('BlackIs1')\
115 .name('BlackIs1')\ 115 .name('BlackIs1')\
116 .type(' boolean')\ 116 .type('boolean')\
117 .comment('()A flag indicating whether 1 bits are to be interpreted as black pixels\nand 0 bits as white pixels, the reverse of the normal PDF conventi on\nfor image data. Default value: false.')\ 117 .comment('()A flag indicating whether 1 bits are to be interpreted as black pixels\nand 0 bits as white pixels, the reverse of the normal PDF conventi on\nfor image data. Default value: false.')\
118 .done().done()\ 118 .done().done()\
119 .optional()\ 119 .optional()\
120 .field('DamagedRowsBeforeError')\ 120 .field('DamagedRowsBeforeError')\
121 .name('DamagedRowsBeforeError')\ 121 .name('DamagedRowsBeforeError')\
122 .type(' integer')\ 122 .type('integer')\
123 .comment('()The number of damaged rows of data to be tolerated before an\nerror occurs. This entry applies only if EndOfLine is true and K is\nnonnega tive. Tolerating a damaged row means locating its end in\nthe encoded data by se arching for an EndOfLine pattern and then\nsubstituting decoded data from the pr evious row if the previous\nrow was not damaged, or a white scan line if the pre vious row was\nalso damaged. Default value: 0.')\ 123 .comment('()The number of damaged rows of data to be tolerated before an\nerror occurs. This entry applies only if EndOfLine is true and K is\nnonnega tive. Tolerating a damaged row means locating its end in\nthe encoded data by se arching for an EndOfLine pattern and then\nsubstituting decoded data from the pr evious row if the previous\nrow was not damaged, or a white scan line if the pre vious row was\nalso damaged. Default value: 0.')\
124 .done().done()\ 124 .done().done()\
125 .done() 125 .done()
126 126
127 pdfspec.addClass('Jbig2DecodeFilterDictionary', 'Dictionary', 'Optional parame ter for the JBIG2Decode filter')\ 127 pdfspec.addClass('Jbig2DecodeFilterDictionary', 'Dictionary', 'Optional parame ter for the JBIG2Decode filter')\
128 .optional()\ 128 .optional()\
129 .field('JBIG2Globals')\ 129 .field('JBIG2Globals')\
130 .name('JBIG2Globals')\ 130 .name('JBIG2Globals')\
131 .type('stream')\ 131 .type('stream')\
132 .comment('()A stream containing the JBIG2 global (page 0) segments. Gl obal segments\nmust be placed in this stream even if only a single JBIG2 image X Object refers\nto it.')\ 132 .comment('()A stream containing the JBIG2 global (page 0) segments. Gl obal segments\nmust be placed in this stream even if only a single JBIG2 image X Object refers\nto it.')\
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 .done().done()\ 610 .done().done()\
611 .optional()\ 611 .optional()\
612 .field('Shading')\ 612 .field('Shading')\
613 .name('Shading')\ 613 .name('Shading')\
614 .type('dictionary')\ 614 .type('dictionary')\
615 .comment('(Optional; PDF 1.3) A dictionary mapping resource names to s hading dic-\ntionaries (see "Shading Dictionaries" on page 233).')\ 615 .comment('(Optional; PDF 1.3) A dictionary mapping resource names to s hading dic-\ntionaries (see "Shading Dictionaries" on page 233).')\
616 .done().done()\ 616 .done().done()\
617 .optional()\ 617 .optional()\
618 .field('XObject')\ 618 .field('XObject')\
619 .name('XObject')\ 619 .name('XObject')\
620 .type('stream')\ 620 .type('dictionary')\
621 .comment('(Optional) A dictionary mapping resource names to external o bjects (see Sec-\ntion 4.7, "External Objects").')\ 621 .comment('(Optional) A dictionary mapping resource names to external o bjects (see Sec-\ntion 4.7, "External Objects").')\
622 .done().done()\ 622 .done().done()\
623 .optional()\ 623 .optional()\
624 .field('Font')\ 624 .field('Font')\
625 .name('Font')\ 625 .name('Font')\
626 .type('dictionary')\ 626 .type('dictionary')\
627 .comment('(Optional) A dictionary mapping resource names to font dicti onaries (see\nChapter 5).')\ 627 .comment('(Optional) A dictionary mapping resource names to font dicti onaries (see\nChapter 5).')\
628 .done().done()\ 628 .done().done()\
629 .optional()\ 629 .optional()\
630 .field('ProcSet')\ 630 .field('ProcSet')\
(...skipping 4727 matching lines...) Expand 10 before | Expand all | Expand 10 after
5358 pdfspec.addClass('OpiVersionDictionary', 'Dictionary', 'Entry in an OPI versio n dictionary')\ 5358 pdfspec.addClass('OpiVersionDictionary', 'Dictionary', 'Entry in an OPI versio n dictionary')\
5359 .required('NULL')\ 5359 .required('NULL')\
5360 .field('version_number')\ 5360 .field('version_number')\
5361 .name('version_number')\ 5361 .name('version_number')\
5362 .type('dictionary')\ 5362 .type('dictionary')\
5363 .comment('(Required; PDF 1.2) An OPI dictionary specifying the attribu tes of this proxy\n(see Tables 9.50 and 9.51). The key for this entry must be th e name 1.3 or 2.0,\nidentifying the version of OPI to which the proxy correspond s.')\ 5363 .comment('(Required; PDF 1.2) An OPI dictionary specifying the attribu tes of this proxy\n(see Tables 9.50 and 9.51). The key for this entry must be th e name 1.3 or 2.0,\nidentifying the version of OPI to which the proxy correspond s.')\
5364 .done().done()\ 5364 .done().done()\
5365 .done() 5365 .done()
5366 5366
5367 5367
OLDNEW
« no previous file with comments | « experimental/PdfViewer/pdf_viewer_main.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698