node-poppler 9.1.1 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,210 @@
1
+ declare namespace _exports {
2
+ export { PdfToPpmOptions };
3
+ }
4
+ declare const _exports: Record<keyof PdfToPpmOptions, import("../index").OptionDetails>;
5
+ export = _exports;
6
+ type PdfToPpmOptions = {
7
+ /**
8
+ * Enable or disable font anti-aliasing.
9
+ * This defaults to `'yes'`.
10
+ */
11
+ antialiasFonts?: "no" | "yes" | undefined;
12
+ /**
13
+ * Enable or disable vector anti-aliasing.
14
+ * This defaults to `'yes'`.
15
+ */
16
+ antialiasVectors?: "no" | "yes" | undefined;
17
+ /**
18
+ * Uses the crop box rather than media box when
19
+ * generating the files (PNG/JPEG/TIFF only).
20
+ */
21
+ cropBox?: boolean | undefined;
22
+ /**
23
+ * Specifies the height of crop area in pixels
24
+ * (image output) or points (vector output).
25
+ */
26
+ cropHeight?: number | undefined;
27
+ /**
28
+ * Specifies the size of crop square in pixels
29
+ * (image output) or points (vector output).
30
+ */
31
+ cropSize?: number | undefined;
32
+ /**
33
+ * Specifies the width of crop area in pixels
34
+ * (image output) or points (vector output).
35
+ */
36
+ cropWidth?: number | undefined;
37
+ /**
38
+ * Specifies the x-coordinate of the crop area top left
39
+ * corner in pixels (image output) or points (vector output).
40
+ */
41
+ cropXAxis?: number | undefined;
42
+ /**
43
+ * Specifies the y-coordinate of the crop area top left
44
+ * corner in pixels (image output) or points (vector output).
45
+ */
46
+ cropYAxis?: number | undefined;
47
+ /**
48
+ * If Poppler is compiled with colour management support, this option
49
+ * sets the DefaultCMYK color space to the ICC profile stored in the display profile file passed.
50
+ */
51
+ defaultCmykProfile?: string | undefined;
52
+ /**
53
+ * If Poppler is compiled with colour management support, this option
54
+ * sets the DefaultGray color space to the ICC profile stored in the display profile file passed.
55
+ */
56
+ defaultGrayProfile?: string | undefined;
57
+ /**
58
+ * If Poppler is compiled with colour management support, this option
59
+ * sets the DefaultRGB color space to the ICC profile stored in the display profile file passed.
60
+ */
61
+ defaultRgbProfile?: string | undefined;
62
+ /**
63
+ * If Poppler is compiled with colour management support, this option
64
+ * sets the display profile to the ICC profile stored in the display profile file passed.
65
+ */
66
+ displayProfile?: string | undefined;
67
+ /**
68
+ * Generates only the even numbered pages.
69
+ */
70
+ evenPagesOnly?: boolean | undefined;
71
+ /**
72
+ * Specifies the first page to convert.
73
+ */
74
+ firstPageToConvert?: number | undefined;
75
+ /**
76
+ * Enable or disable FreeType (a TrueType / Type 1 font rasterizer).
77
+ * This defaults to `'yes'`.
78
+ */
79
+ freetype?: "no" | "yes" | undefined;
80
+ /**
81
+ * Force page number even if there is only one page.
82
+ */
83
+ forcePageNumber?: boolean | undefined;
84
+ /**
85
+ * Generate grayscale PGM file (instead of a color PPM file).
86
+ */
87
+ grayscaleFile?: boolean | undefined;
88
+ /**
89
+ * Hide annotations.
90
+ */
91
+ hideAnnotations?: boolean | undefined;
92
+ /**
93
+ * Generate a CMYK JPEG file.
94
+ */
95
+ jpegCmyk?: boolean | undefined;
96
+ /**
97
+ * Generate JPEG file instead of a PPM file.
98
+ */
99
+ jpegFile?: boolean | undefined;
100
+ /**
101
+ * When used with `options.jpegFile`, this option can
102
+ * be used to control the JPEG compression parameters. It takes a string of the form
103
+ * `"<opt>=<val>[,<opt>=<val>]"`. Currently available options are:
104
+ * - `quality` Selects the JPEG quality value. The value must be an integer between 0 and 100
105
+ * - `progressive` Select progressive JPEG output. The possible values are `"y"`, `"n"`, indicating
106
+ * progressive (yes) or non-progressive (no), respectively
107
+ */
108
+ jpegOptions?: string | undefined;
109
+ /**
110
+ * Specifies the last page to convert.
111
+ */
112
+ lastPageToConvert?: number | undefined;
113
+ /**
114
+ * Generate monochrome PBM file (instead of a color PPM file).
115
+ */
116
+ monochromeFile?: boolean | undefined;
117
+ /**
118
+ * Generates only the odd numbered pages.
119
+ */
120
+ oddPagesOnly?: boolean | undefined;
121
+ /**
122
+ * Specify the owner password for the PDF file.
123
+ * Providing this will bypass all security restrictions.
124
+ */
125
+ ownerPassword?: string | undefined;
126
+ /**
127
+ * Enable overprint emulation during rasterization.
128
+ */
129
+ overprint?: boolean | undefined;
130
+ /**
131
+ * Generate PNG file instead of a PPM file.
132
+ */
133
+ pngFile?: boolean | undefined;
134
+ /**
135
+ * Print progress info as each page is generated.
136
+ * Three space-separated fields are printed to STDERR: the number of the current page, the number
137
+ * of the last page that will be generated, and the path to the file written to.
138
+ */
139
+ printProgress?: boolean | undefined;
140
+ /**
141
+ * Print copyright and version information.
142
+ */
143
+ printVersionInfo?: boolean | undefined;
144
+ /**
145
+ * Do not print any messages or errors.
146
+ */
147
+ quiet?: boolean | undefined;
148
+ /**
149
+ * Specifies the X resolution, in pixels per inch of
150
+ * image files (or rasterized regions in vector output). The default is `150` PPI.
151
+ */
152
+ resolutionXAxis?: number | undefined;
153
+ /**
154
+ * Specifies the X and Y resolution, in pixels per
155
+ * inch of image files (or rasterized regions in vector output). The default is `150` PPI.
156
+ */
157
+ resolutionXYAxis?: number | undefined;
158
+ /**
159
+ * Specifies the Y resolution, in pixels per inch of
160
+ * image files (or rasterized regions in vector output). The default is `150` PPI.
161
+ */
162
+ resolutionYAxis?: number | undefined;
163
+ /**
164
+ * Swaps horizontal and vertical size for
165
+ * a rotated (landscape) PDF before scaling instead of after.
166
+ */
167
+ scaleDimensionBeforeRotation?: boolean | undefined;
168
+ /**
169
+ * Scales the long side of each page (width for landscape
170
+ * pages, height for portrait pages) to fit in scale-to pixels. The size of the short side will
171
+ * be determined by the aspect ratio of the page.
172
+ */
173
+ scalePageTo?: number | undefined;
174
+ /**
175
+ * Scales each page horizontally to fit in scale-to-x
176
+ * pixels. If scale-to-y is set to `-1`, the vertical size will be determined by the aspect ratio of
177
+ * the page.
178
+ */
179
+ scalePageToXAxis?: number | undefined;
180
+ /**
181
+ * Scales each page vertically to fit in scale-to-y
182
+ * pixels. If scale-to-x is set to `-1`, the horizontal size will be determined by the aspect ratio of
183
+ * the page.
184
+ */
185
+ scalePageToYAxis?: number | undefined;
186
+ /**
187
+ * Specify single character separator between name and page number.
188
+ */
189
+ separator?: string | undefined;
190
+ /**
191
+ * Writes only the first page and does not add digits.
192
+ */
193
+ singleFile?: boolean | undefined;
194
+ /**
195
+ * Specifies the thin line mode. This defaults to `'none'`.
196
+ */
197
+ thinLineMode?: "none" | "shape" | "solid" | undefined;
198
+ /**
199
+ * Set TIFF compression.
200
+ */
201
+ tiffCompression?: "none" | "deflate" | "jpeg" | "lzw" | "packbits" | undefined;
202
+ /**
203
+ * Generate TIFF file instead of a PPM file.
204
+ */
205
+ tiffFile?: boolean | undefined;
206
+ /**
207
+ * Specify the user password for the PDF file.
208
+ */
209
+ userPassword?: string | undefined;
210
+ };
@@ -0,0 +1,237 @@
1
+ declare namespace _exports {
2
+ export { PdfToPsOptions };
3
+ }
4
+ declare const _exports: Record<keyof PdfToPsOptions, import("../index").OptionDetails>;
5
+ export = _exports;
6
+ type PdfToPsOptions = {
7
+ /**
8
+ * Enable anti-aliasing on rasterization, accepts `no` or `yes`.
9
+ */
10
+ antialias?: "no" | "yes" | undefined;
11
+ /**
12
+ * Write binary data in Level 1 PostScript. By default,
13
+ * pdftops writes hex-encoded data in Level 1 PostScript. Binary data is non-standard in Level 1
14
+ * PostScript but reduces the file size and can be useful when Level 1 PostScript is required
15
+ * only for its restricted use of PostScript operators.
16
+ */
17
+ binary?: boolean | undefined;
18
+ /**
19
+ * If Poppler is compiled with colour management support, this option
20
+ * sets the DefaultCMYK color space to the ICC profile stored in the display profile file passed.
21
+ */
22
+ defaultCmykProfile?: string | undefined;
23
+ /**
24
+ * If Poppler is compiled with colour management support, this option
25
+ * sets the DefaultGray color space to the ICC profile stored in the display profile file passed.
26
+ */
27
+ defaultGrayProfile?: string | undefined;
28
+ /**
29
+ * If Poppler is compiled with colour management support, this option
30
+ * sets the DefaultRGB color space to the ICC profile stored in the display profile file passed.
31
+ */
32
+ defaultRgbProfile?: string | undefined;
33
+ /**
34
+ * Set the Duplex pagedevice entry in the PostScript file.
35
+ * This tells duplex-capable printers to enable duplexing.
36
+ */
37
+ duplex?: boolean | undefined;
38
+ /**
39
+ * Generate an EPS file. An EPS file contains a single image,
40
+ * so if you use this option with a multi-page PDF file, you must use `options.firstPageToConvert` and
41
+ * `options.lastPageToConvert` to specify a single page.
42
+ * The page size options (originalPageSizes, paperSize, paperWidth, paperHeight) can not be used
43
+ * with this option.
44
+ */
45
+ epsFile?: boolean | undefined;
46
+ /**
47
+ * Expand PDF pages smaller than the paper to fill the
48
+ * paper. By default, these pages are not scaled.
49
+ */
50
+ fillPage?: boolean | undefined;
51
+ /**
52
+ * Specifies the first page to convert.
53
+ */
54
+ firstPageToConvert?: number | undefined;
55
+ /**
56
+ * Generate PostScript form which can be imported by software
57
+ * that understands forms.
58
+ * A form contains a single page, so if you use this option with a multi-page PDF file,
59
+ * you must use `options.firstPageToConvert` and `options.lastPageToConvert` to specify a single page.
60
+ * The `options.level1` option cannot be used with `options.form`.
61
+ * No more than one of the mode options (`options.epsFile`, `options.form`) may be given.
62
+ */
63
+ form?: boolean | undefined;
64
+ /**
65
+ * Specifies the last page to convert.
66
+ */
67
+ lastPageToConvert?: number | undefined;
68
+ /**
69
+ * Generate Level 1 PostScript. The resulting PostScript
70
+ * files will be significantly larger (if they contain images), but will print on Level 1 printers.
71
+ * This also converts all images to black and white.
72
+ */
73
+ level1?: boolean | undefined;
74
+ /**
75
+ * Generate Level 1 separable PostScript.
76
+ * All colors are converted to CMYK. Images are written with separate stream data for the four components.
77
+ */
78
+ level1Sep?: boolean | undefined;
79
+ /**
80
+ * Generate Level 2 PostScript.
81
+ * Level 2 supports color images and image compression. This is the default setting.
82
+ */
83
+ level2?: boolean | undefined;
84
+ /**
85
+ * Generate Level 2 separable PostScript. All colors are
86
+ * converted to CMYK. The PostScript separation convention operators are used to handle custom (spot) colors.
87
+ */
88
+ level2Sep?: boolean | undefined;
89
+ /**
90
+ * Generate Level 3 PostScript.
91
+ * This enables all Level 2 features plus CID font embedding.
92
+ */
93
+ level3?: boolean | undefined;
94
+ /**
95
+ * Generate Level 3 separable PostScript.
96
+ * The separation handling is the same as for `options.level2Sep`.
97
+ */
98
+ level3Sep?: boolean | undefined;
99
+ /**
100
+ * By default, PDF pages smaller than the paper
101
+ * (after any scaling) are centered on the paper. This option causes them to be aligned to
102
+ * the lower-left corner of the paper instead.
103
+ */
104
+ noCenter?: boolean | undefined;
105
+ /**
106
+ * By default, printing output is cropped to the CropBox
107
+ * specified in the PDF file. This option disables cropping.
108
+ */
109
+ noCrop?: boolean | undefined;
110
+ /**
111
+ * By default, any CID PostScript fonts which are
112
+ * embedded in the PDF file are copied into the PostScript file. This option disables that embedding.
113
+ * No attempt is made to substitute for non-embedded CID PostScript fonts.
114
+ */
115
+ noEmbedCIDFonts?: boolean | undefined;
116
+ /**
117
+ * By default, any CID TrueType fonts which are
118
+ * embedded in the PDF file are copied into the PostScript file. This option disables that embedding.
119
+ * No attempt is made to substitute for non-embedded CID TrueType fonts.
120
+ */
121
+ noEmbedCIDTrueTypeFonts?: boolean | undefined;
122
+ /**
123
+ * By default, any TrueType fonts which are embedded
124
+ * in the PDF file are copied into the PostScript file. This option causes pdfToPs to substitute base fonts instead.
125
+ * Embedded fonts make PostScript files larger, but may be necessary for readable output.
126
+ * Also, some PostScript interpreters do not have TrueType rasterizers.
127
+ */
128
+ noEmbedTrueTypeFonts?: boolean | undefined;
129
+ /**
130
+ * By default, any Type 1 fonts which are embedded in the PDF file
131
+ * are copied into the PostScript file. This option causes pdfToPs to substitute base fonts instead.
132
+ * Embedded fonts make PostScript files larger, but may be necessary for readable output.
133
+ */
134
+ noEmbedType1Fonts?: boolean | undefined;
135
+ /**
136
+ * Do not scale PDF pages which are larger than the paper.
137
+ * By default, pages larger than the paper are shrunk to fit.
138
+ */
139
+ noShrink?: boolean | undefined;
140
+ /**
141
+ * Generate OPI comments for all images and forms which have OPI information.
142
+ */
143
+ opi?: boolean | undefined;
144
+ /**
145
+ * By default, bitmap images in the PDF pass through to the
146
+ * output PostScript in their original color space, which produces predictable results.
147
+ * This option converts RGB and CMYK images into Gray images if every pixel of the image has equal components.
148
+ * This can fix problems when doing color separations of PDFs that contain embedded black and
149
+ * white images encoded as RGB.
150
+ */
151
+ optimizeColorSpace?: boolean | undefined;
152
+ /**
153
+ * Set the paper size of each page to match
154
+ * the size specified in the PDF file.
155
+ */
156
+ originalPageSizes?: boolean | undefined;
157
+ /**
158
+ * Enable overprint emulation during rasterization.
159
+ * This option requires `options.processColorFormat` to be CMYK8.
160
+ */
161
+ overprint?: boolean | undefined;
162
+ /**
163
+ * Owner password (for encrypted files).
164
+ */
165
+ ownerPassword?: string | undefined;
166
+ /**
167
+ * Set the paper height, in points.
168
+ */
169
+ paperHeight?: number | undefined;
170
+ /**
171
+ * Set the paper size to one of `'A3'`, `'A4'`,
172
+ * `'legal'`, or `'letter'`. This can also be set to `'match'`, which will set the paper size
173
+ * of each page to match the size specified in the PDF file. If none of the paperSize,
174
+ * paperWidth, or paperHeight options are specified the default is to match the paper size.
175
+ */
176
+ paperSize?: "A3" | "A4" | "legal" | "letter" | "match" | undefined;
177
+ /**
178
+ * Set the paper width, in points.
179
+ */
180
+ paperWidth?: number | undefined;
181
+ /**
182
+ * By default, references to non-embedded 8-bit fonts
183
+ * in the PDF file are substituted with the closest Helvetica, Times-Roman, or Courier font.
184
+ * This option passes references to non-embedded fonts through to the PostScript file.
185
+ */
186
+ passFonts?: boolean | undefined;
187
+ /**
188
+ * When generating Level 1 separable PostScript,
189
+ * preserve custom colors instead of converting them to CMYK.
190
+ * Has no effect if `options.level1Sep` is not set.
191
+ */
192
+ passLevel1CustomColor?: boolean | undefined;
193
+ /**
194
+ * Preload images and forms.
195
+ */
196
+ preload?: boolean | undefined;
197
+ /**
198
+ * Print copyright and version information.
199
+ */
200
+ printVersionInfo?: boolean | undefined;
201
+ /**
202
+ * Sets the process color format as it is used
203
+ * during rasterization and transparency reduction.
204
+ *
205
+ * The default depends on the other settings: For `options.level1` the default is `'MONO8'`; for `options.level1Sep`,
206
+ * `options.level2Sep`, `options.level3Sep`, or `options.overprint` the default is `'CMYK8'`; in all other
207
+ * cases `'RGB8'` is the default.
208
+ * If `options.processColorProfile` is set then `options.processColorFormat` is inferred from the specified ICC profile.
209
+ */
210
+ processColorFormat?: "CMYK8" | "MONO8" | "RGB8" | undefined;
211
+ /**
212
+ * Sets the ICC profile that is assumed during
213
+ * rasterization and transparency reduction.
214
+ */
215
+ processColorProfile?: string | undefined;
216
+ /**
217
+ * Do not print any messages or errors.
218
+ */
219
+ quiet?: boolean | undefined;
220
+ /**
221
+ * By default, pdfToPs rasterizes pages as needed,
222
+ * for example, if they contain transparencies. To force rasterization, set `rasterize` to `'always'`.
223
+ * Use this to eliminate fonts.
224
+ * To prevent rasterization, set `rasterize` to `'never'`.
225
+ * This may produce files that display incorrectly.
226
+ */
227
+ rasterize?: "always" | "never" | "whenneeded" | undefined;
228
+ /**
229
+ * Specifies the X and Y resolution, in pixels per
230
+ * inch of image files (or rasterized regions in vector output). The default is `300` PPI.
231
+ */
232
+ resolutionXYAxis?: number | undefined;
233
+ /**
234
+ * User password (for encrypted files).
235
+ */
236
+ userPassword?: string | undefined;
237
+ };
@@ -0,0 +1,137 @@
1
+ declare namespace _exports {
2
+ export { PdfToTextOptions };
3
+ }
4
+ declare const _exports: Record<keyof PdfToTextOptions, import("../index").OptionDetails>;
5
+ export = _exports;
6
+ type PdfToTextOptions = {
7
+ /**
8
+ * Generate an XHTML file containing bounding
9
+ * box information for each word in the file.
10
+ */
11
+ boundingBoxXhtml?: boolean | undefined;
12
+ /**
13
+ * Generate an XHTML file containing
14
+ * bounding box information for each block, line, and word in the file.
15
+ */
16
+ boundingBoxXhtmlLayout?: boolean | undefined;
17
+ /**
18
+ * Specifies how much spacing to allow after a word
19
+ * before considering adjacent text to be a new column, measured as a fraction
20
+ * of the font size. Default is `0.7`.
21
+ */
22
+ columnSpacing?: number | undefined;
23
+ /**
24
+ * Use the crop box rather than the media box with
25
+ * `options.boundingBoxXhtml` and `options.boundingBoxXhtmlLayout`.
26
+ */
27
+ cropBox?: boolean | undefined;
28
+ /**
29
+ * Specifies the height of crop area in pixels
30
+ * (image output) or points (vector output).
31
+ */
32
+ cropHeight?: number | undefined;
33
+ /**
34
+ * Specifies the width of crop area in pixels
35
+ * (image output) or points (vector output).
36
+ */
37
+ cropWidth?: number | undefined;
38
+ /**
39
+ * Specifies the x-coordinate of the crop area top left
40
+ * corner in pixels (image output) or points (vector output).
41
+ */
42
+ cropXAxis?: number | undefined;
43
+ /**
44
+ * Specifies the y-coordinate of the crop area top left
45
+ * corner in pixels (image output) or points (vector output).
46
+ */
47
+ cropYAxis?: number | undefined;
48
+ /**
49
+ * Sets the end-of-line convention to use for
50
+ * text output: dos; mac; unix.
51
+ */
52
+ eolConvention?: "dos" | "mac" | "unix" | undefined;
53
+ /**
54
+ * Specifies the first page to convert.
55
+ */
56
+ firstPageToConvert?: number | undefined;
57
+ /**
58
+ * Assume fixed-pitch (or tabular) text, with the
59
+ * specified character width (in points). This forces physical layout mode.
60
+ */
61
+ fixedWidthLayout?: number | undefined;
62
+ /**
63
+ * Generate simple HTML file, including the
64
+ * meta information. This simply wraps the text in `<pre>` and `</pre>` and prepends the meta headers.
65
+ */
66
+ generateHtmlMetaFile?: boolean | undefined;
67
+ /**
68
+ * Generate a TSV file containing the bounding box
69
+ * information for each block, line, and word in the file.
70
+ */
71
+ generateTsvFile?: boolean | undefined;
72
+ /**
73
+ * Specifies the last page to convert.
74
+ */
75
+ lastPageToConvert?: number | undefined;
76
+ /**
77
+ * List the available encodings.
78
+ */
79
+ listEncodingOptions?: boolean | undefined;
80
+ /**
81
+ * Maintain (as best as possible) the original physical
82
+ * layout of the text. The default is to undo physical layout (columns, hyphenation, etc.) and
83
+ * output the text in reading order.
84
+ */
85
+ maintainLayout?: boolean | undefined;
86
+ /**
87
+ * Discard diagonal text.
88
+ */
89
+ noDiagonalText?: boolean | undefined;
90
+ /**
91
+ * Do not insert page breaks (form feed characters)
92
+ * between pages.
93
+ */
94
+ noPageBreaks?: boolean | undefined;
95
+ /**
96
+ * Sets the encoding to use for text output.
97
+ * This defaults to `'UTF-8'`.
98
+ */
99
+ outputEncoding?: string | undefined;
100
+ /**
101
+ * Owner password (for encrypted files).
102
+ */
103
+ ownerPassword?: string | undefined;
104
+ /**
105
+ * Print copyright and version information.
106
+ */
107
+ printVersionInfo?: boolean | undefined;
108
+ /**
109
+ * Do not print any messages or errors.
110
+ */
111
+ quiet?: boolean | undefined;
112
+ /**
113
+ * Keep the text in content stream order. This is a
114
+ * hack which often undoes column formatting, etc. Use of raw mode is no longer recommended.
115
+ */
116
+ rawLayout?: boolean | undefined;
117
+ /**
118
+ * Controls end-of-line hyphen handling:
119
+ * - `'all'` removes end-of-line hyphens (U+002D, U+2010, U+FE63, U+FF0D) and Unicode
120
+ * soft hyphens (U+00AD), merging words across lines (default)
121
+ * - `'none'` keeps all end-of-line hyphens and line breaks unchanged
122
+ * - `'soft'` removes only Unicode soft hyphens (U+00AD), merging words across lines.
123
+ * ASCII and other hyphen characters are preserved
124
+ *
125
+ * This option has no effect when `options.rawLayout` or `options.maintainLayout`
126
+ * are set to `true`.
127
+ */
128
+ removeHyphens?: "none" | "all" | "soft" | undefined;
129
+ /**
130
+ * Specifies the resolution in DPI. Default is `72`.
131
+ */
132
+ resolution?: number | undefined;
133
+ /**
134
+ * User password (for encrypted files).
135
+ */
136
+ userPassword?: string | undefined;
137
+ };
@@ -0,0 +1,11 @@
1
+ declare namespace _exports {
2
+ export { PdfUniteOptions };
3
+ }
4
+ declare const _exports: Record<keyof PdfUniteOptions, import("../index").OptionDetails>;
5
+ export = _exports;
6
+ type PdfUniteOptions = {
7
+ /**
8
+ * Print copyright and version information.
9
+ */
10
+ printVersionInfo?: boolean | undefined;
11
+ };