node-poppler 9.1.2 → 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,15 @@
1
+ declare namespace _exports {
2
+ export { PdfAttachOptions };
3
+ }
4
+ declare const _exports: Record<keyof PdfAttachOptions, import("../index").OptionDetails>;
5
+ export = _exports;
6
+ type PdfAttachOptions = {
7
+ /**
8
+ * Print copyright and version info.
9
+ */
10
+ printVersionInfo?: boolean | undefined;
11
+ /**
12
+ * Replace embedded file with same name (if it exists).
13
+ */
14
+ replace?: boolean | undefined;
15
+ };
@@ -0,0 +1,53 @@
1
+ declare namespace _exports {
2
+ export { PdfDetachOptions };
3
+ }
4
+ declare const _exports: Record<keyof PdfDetachOptions, import("../index").OptionDetails>;
5
+ export = _exports;
6
+ type PdfDetachOptions = {
7
+ /**
8
+ * List all of the embedded files in the PDF file.
9
+ * File names are converted to the text encoding specified by `options.outputEncoding`.
10
+ */
11
+ listEmbedded?: boolean | undefined;
12
+ /**
13
+ * Sets the encoding to use for text output.
14
+ * This defaults to `UTF-8`.
15
+ */
16
+ outputEncoding?: string | undefined;
17
+ /**
18
+ * Owner password (for encrypted files).
19
+ */
20
+ ownerPassword?: string | undefined;
21
+ /**
22
+ * Set the file name used when saving an embedded file with
23
+ * the save option enabled, or the directory if `options.saveAllFiles` is used.
24
+ */
25
+ outputPath?: string | undefined;
26
+ /**
27
+ * Print copyright and version info.
28
+ */
29
+ printVersionInfo?: boolean | undefined;
30
+ /**
31
+ * Save all of the embedded files. This uses the file
32
+ * names associated with the embedded files (as printed by `options.listEmbedded`).
33
+ * By default, the files are saved in the current directory; this can be changed
34
+ * with `options.outputPath`.
35
+ */
36
+ saveAllFiles?: boolean | undefined;
37
+ /**
38
+ * Save the specified embedded file.
39
+ * By default, this uses the file name associated with the embedded file (as printed by
40
+ * `options.listEmbedded`); the file name can be changed with `options.outputPath`.
41
+ */
42
+ saveFile?: string | undefined;
43
+ /**
44
+ * Save the specified embedded file.
45
+ * By default, this uses the file name associated with the embedded file (as printed by
46
+ * `options.listEmbedded`); the file name can be changed with `options.outputPath`.
47
+ */
48
+ saveSpecificFile?: number | undefined;
49
+ /**
50
+ * User password (for encrypted files).
51
+ */
52
+ userPassword?: string | undefined;
53
+ };
@@ -0,0 +1,32 @@
1
+ declare namespace _exports {
2
+ export { PdfFontsOptions };
3
+ }
4
+ declare const _exports: Record<keyof PdfFontsOptions, import("../index").OptionDetails>;
5
+ export = _exports;
6
+ type PdfFontsOptions = {
7
+ /**
8
+ * Specifies the first page to examine.
9
+ */
10
+ firstPageToExamine?: number | undefined;
11
+ /**
12
+ * Specifies the last page to examine.
13
+ */
14
+ lastPageToExamine?: number | undefined;
15
+ /**
16
+ * List the substitute fonts that Poppler
17
+ * will use for non-embedded fonts.
18
+ */
19
+ listSubstitutes?: boolean | undefined;
20
+ /**
21
+ * Owner password (for encrypted files).
22
+ */
23
+ ownerPassword?: string | undefined;
24
+ /**
25
+ * Print copyright and version info.
26
+ */
27
+ printVersionInfo?: boolean | undefined;
28
+ /**
29
+ * User password (for encrypted files).
30
+ */
31
+ userPassword?: string | undefined;
32
+ };
@@ -0,0 +1,74 @@
1
+ declare namespace _exports {
2
+ export { PdfImagesOptions };
3
+ }
4
+ declare const _exports: Record<keyof PdfImagesOptions, import("../index").OptionDetails>;
5
+ export = _exports;
6
+ type PdfImagesOptions = {
7
+ /**
8
+ * Write JPEG, JPEG2000, JBIG2, and CCITT images in their native format.
9
+ * CMYK files are written as TIFF files. All other images are written as PNG files.
10
+ */
11
+ allFiles?: boolean | undefined;
12
+ /**
13
+ * Generate CCITT images as CCITT files.
14
+ */
15
+ ccittFile?: boolean | undefined;
16
+ /**
17
+ * Specifies the first page to convert.
18
+ */
19
+ firstPageToConvert?: number | undefined;
20
+ /**
21
+ * Specifies the last page to convert.
22
+ */
23
+ lastPageToConvert?: number | undefined;
24
+ /**
25
+ * Generate JBIG2 images as JBIG2 files.
26
+ */
27
+ jbig2File?: boolean | undefined;
28
+ /**
29
+ * Generate JPEG2000 images as JP2 files.
30
+ */
31
+ jpeg2000File?: boolean | undefined;
32
+ /**
33
+ * Generate JPEG images as JPEG files.
34
+ */
35
+ jpegFile?: boolean | undefined;
36
+ /**
37
+ * Instead of writing the images, list the
38
+ * images along with various information for each image.
39
+ * NOTE: Do not specify the `outputPrefix` with this option.
40
+ */
41
+ list?: boolean | undefined;
42
+ /**
43
+ * Include page numbers in output file names.
44
+ */
45
+ outputPageNumbers?: boolean | undefined;
46
+ /**
47
+ * Owner password (for encrypted files).
48
+ */
49
+ ownerPassword?: string | undefined;
50
+ /**
51
+ * Change the default output format to PNG.
52
+ */
53
+ pngFile?: boolean | undefined;
54
+ /**
55
+ * Print image filenames to stdout.
56
+ */
57
+ printFilenames?: boolean | undefined;
58
+ /**
59
+ * Print copyright and version info.
60
+ */
61
+ printVersionInfo?: boolean | undefined;
62
+ /**
63
+ * Do not print any messages or errors.
64
+ */
65
+ quiet?: boolean | undefined;
66
+ /**
67
+ * Change the default output format to TIFF.
68
+ */
69
+ tiffFile?: boolean | undefined;
70
+ /**
71
+ * Specify the user password for the PDF file.
72
+ */
73
+ userPassword?: string | undefined;
74
+ };
@@ -0,0 +1,88 @@
1
+ declare namespace _exports {
2
+ export { PdfInfoOptions };
3
+ }
4
+ declare const _exports: Record<keyof PdfInfoOptions, import("../index").OptionDetails>;
5
+ export = _exports;
6
+ type PdfInfoOptions = {
7
+ /**
8
+ * First page to print.
9
+ */
10
+ firstPageToConvert?: number | undefined;
11
+ /**
12
+ * Last page to print.
13
+ */
14
+ lastPageToConvert?: number | undefined;
15
+ /**
16
+ * List the available encodings.
17
+ */
18
+ listEncodingOptions?: boolean | undefined;
19
+ /**
20
+ * Sets the encoding to use for text output.
21
+ * This defaults to `'UTF-8'`.
22
+ */
23
+ outputEncoding?: string | undefined;
24
+ /**
25
+ * Owner password (for encrypted files).
26
+ */
27
+ ownerPassword?: string | undefined;
28
+ /**
29
+ * Print result as a JSON object.
30
+ */
31
+ printAsJson?: boolean | undefined;
32
+ /**
33
+ * Prints the page box bounding boxes:
34
+ * MediaBox, CropBox, BleedBox, TrimBox, and ArtBox.
35
+ */
36
+ printBoundingBoxes?: boolean | undefined;
37
+ /**
38
+ * Print both custom and standard metadata.
39
+ */
40
+ printCustomMetadata?: boolean | undefined;
41
+ /**
42
+ * Prints the logical document structure
43
+ * of a Tagged-PDF file.
44
+ */
45
+ printDocStruct?: boolean | undefined;
46
+ /**
47
+ * Print the textual content along with the
48
+ * document structure of a Tagged-PDF file. Note that extracting text this way might be slow
49
+ * for big PDF files.
50
+ */
51
+ printDocStructText?: boolean | undefined;
52
+ /**
53
+ * Prints dates in ISO-8601 format (including the time zone).
54
+ */
55
+ printIsoDates?: boolean | undefined;
56
+ /**
57
+ * Prints all JavaScript in the PDF file.
58
+ */
59
+ printJS?: boolean | undefined;
60
+ /**
61
+ * Prints document-level metadata. (This is the `Metadata`
62
+ * stream from the PDF file's Catalog object).
63
+ */
64
+ printMetadata?: boolean | undefined;
65
+ /**
66
+ * Print a list of all named destinations. If a page range
67
+ * is specified using the `options.firstPageToConvert` and `options.lastPageToConvert` options, only destinations
68
+ * in the page range are listed.
69
+ */
70
+ printNamedDests?: boolean | undefined;
71
+ /**
72
+ * Prints the raw (undecoded) date strings, directly from the PDF file.
73
+ */
74
+ printRawDates?: boolean | undefined;
75
+ /**
76
+ * Print all URLs in the PDF; only URLs referenced by PDF objects
77
+ * such as Link Annotations are listed, not URL strings in the text content.
78
+ */
79
+ printUrls?: boolean | undefined;
80
+ /**
81
+ * Print copyright and version info.
82
+ */
83
+ printVersionInfo?: boolean | undefined;
84
+ /**
85
+ * User password (for encrypted files).
86
+ */
87
+ userPassword?: string | undefined;
88
+ };
@@ -0,0 +1,21 @@
1
+ declare namespace _exports {
2
+ export { PdfSeparateOptions };
3
+ }
4
+ declare const _exports: Record<keyof PdfSeparateOptions, import("../index").OptionDetails>;
5
+ export = _exports;
6
+ type PdfSeparateOptions = {
7
+ /**
8
+ * Specifies the first page to extract.
9
+ * This defaults to page 1.
10
+ */
11
+ firstPageToExtract?: number | undefined;
12
+ /**
13
+ * Specifies the last page to extract.
14
+ * This defaults to the last page of the PDF file.
15
+ */
16
+ lastPageToExtract?: number | undefined;
17
+ /**
18
+ * Print copyright and version info.
19
+ */
20
+ printVersionInfo?: boolean | undefined;
21
+ };
@@ -0,0 +1,241 @@
1
+ declare namespace _exports {
2
+ export { PdfToCairoOptions };
3
+ }
4
+ declare const _exports: Record<keyof PdfToCairoOptions, import("../index").OptionDetails>;
5
+ export = _exports;
6
+ type PdfToCairoOptions = {
7
+ /**
8
+ * Set the cairo
9
+ * antialias option used for text and drawing in image files (or rasterized regions in vector output).
10
+ */
11
+ antialias?: "best" | "default" | "fast" | "good" | "gray" | "none" | "subpixel" | undefined;
12
+ /**
13
+ * Uses the crop box rather than media box when
14
+ * generating the files (PNG/JPEG/TIFF only).
15
+ */
16
+ cropBox?: boolean | undefined;
17
+ /**
18
+ * Specifies the height of crop area in pixels
19
+ * (image output) or points (vector output).
20
+ */
21
+ cropHeight?: number | undefined;
22
+ /**
23
+ * Specifies the size of crop square in pixels
24
+ * (image output) or points (vector output).
25
+ */
26
+ cropSize?: number | undefined;
27
+ /**
28
+ * Specifies the width of crop area in pixels
29
+ * (image output) or points (vector output).
30
+ */
31
+ cropWidth?: number | undefined;
32
+ /**
33
+ * Specifies the x-coordinate of the crop area top left
34
+ * corner in pixels (image output) or points (vector output).
35
+ */
36
+ cropXAxis?: number | undefined;
37
+ /**
38
+ * Specifies the y-coordinate of the crop area top left
39
+ * corner in pixels (image output) or points (vector output).
40
+ */
41
+ cropYAxis?: number | undefined;
42
+ /**
43
+ * Adds the %%IncludeFeature: *Duplex DuplexNoTumble DSC
44
+ * comment to the PostScript file (PS only). This tells the print manager to enable duplexing.
45
+ */
46
+ duplex?: boolean | undefined;
47
+ /**
48
+ * Generate an EPS file. An EPS file contains a single image,
49
+ * so if you use this option with a multi-page PDF file, you must use `options.firstPageToConvert` and
50
+ * `options.lastPageToConvert` to specify a single page.
51
+ * The page size options (originalPageSizes, paperSize, paperWidth, paperHeight) can not be used
52
+ * with this option.
53
+ */
54
+ epsFile?: boolean | undefined;
55
+ /**
56
+ * Generates only the even numbered pages.
57
+ */
58
+ evenPagesOnly?: boolean | undefined;
59
+ /**
60
+ * Expand PDF pages smaller than the paper to fill the
61
+ * paper (PS,PDF,SVG only). By default, these pages are not scaled.
62
+ */
63
+ fillPage?: boolean | undefined;
64
+ /**
65
+ * Specifies the first page to convert.
66
+ */
67
+ firstPageToConvert?: number | undefined;
68
+ /**
69
+ * Generate grayscale file (PNG, JPEG, and TIFF only).
70
+ */
71
+ grayscaleFile?: boolean | undefined;
72
+ /**
73
+ * Use the specified ICC file as the output profile
74
+ * (PNG only). The profile will be embedded in the PNG file.
75
+ */
76
+ iccFile?: string | undefined;
77
+ /**
78
+ * Generate JPEG file(s).
79
+ */
80
+ jpegFile?: boolean | undefined;
81
+ /**
82
+ * When used with `options.jpegFile`, this option can
83
+ * be used to control the JPEG compression parameters. It takes a string of the form
84
+ * `"<opt>=<val>[,<opt>=<val>]"`. Currently available options are:
85
+ * - `quality` Selects the JPEG quality value. The value must be an integer between 0 and 100
86
+ * - `progressive` Select progressive JPEG output. The possible values are `"y"`, `"n"`, indicating
87
+ * progressive (yes) or non-progressive (no), respectively
88
+ * - `optimize` Sets whether to compute optimal Huffman coding tables for the JPEG output, which
89
+ * will create smaller files but make an extra pass over the data. The value must be `"y"` or `"n"`,
90
+ * with `"y"` performing optimization, otherwise the default Huffman tables are used
91
+ *
92
+ * Example: `"quality=95,optimize=y"`.
93
+ */
94
+ jpegOptions?: string | undefined;
95
+ /**
96
+ * Specifies the last page to convert.
97
+ */
98
+ lastPageToConvert?: number | undefined;
99
+ /**
100
+ * Generate monochrome file (PNG and TIFF only).
101
+ */
102
+ monochromeFile?: boolean | undefined;
103
+ /**
104
+ * By default, PDF pages smaller than the paper
105
+ * (after any scaling) are centered on the paper. This option causes them to be aligned to
106
+ * the lower-left corner of the paper instead (PS, PDF, and SVG only).
107
+ */
108
+ noCenter?: boolean | undefined;
109
+ /**
110
+ * By default, printing output is cropped to the CropBox
111
+ * specified in the PDF file. This option disables cropping (PS, PDF, and SVG only).
112
+ */
113
+ noCrop?: boolean | undefined;
114
+ /**
115
+ * Do not scale PDF pages which are larger than the paper
116
+ * (PS, PDF, SVG only). By default, pages larger than the paper are shrunk to fit.
117
+ */
118
+ noShrink?: boolean | undefined;
119
+ /**
120
+ * Generates only the odd numbered pages.
121
+ */
122
+ oddPagesOnly?: boolean | undefined;
123
+ /**
124
+ * Set the paper size of each page to match
125
+ * the size specified in the PDF file.
126
+ */
127
+ originalPageSizes?: boolean | undefined;
128
+ /**
129
+ * Specify the owner password for the PDF file.
130
+ * Providing this will bypass all security restrictions.
131
+ */
132
+ ownerPassword?: string | undefined;
133
+ /**
134
+ * Set the paper height, in points (PS, PDF, and SVG only).
135
+ */
136
+ paperHeight?: number | undefined;
137
+ /**
138
+ * Set the paper size to one of `'A3'`, `'A4'`,
139
+ * `'legal'`, or `'letter'` (PS, PDF, and SVG only). This can also be set to `'match'`, which will set the
140
+ * paper size of each page to match the size specified in the PDF file. If none of `options.paperSize`,
141
+ * `options.paperWidth`, or `options.paperHeight` is specified the default is to match the paper size.
142
+ */
143
+ paperSize?: "A3" | "A4" | "legal" | "letter" | "match" | undefined;
144
+ /**
145
+ * Set the paper width, in points (PS, PDF, and SVG only).
146
+ */
147
+ paperWidth?: number | undefined;
148
+ /**
149
+ * Generate PDF file.
150
+ */
151
+ pdfFile?: boolean | undefined;
152
+ /**
153
+ * Generate PNG file(s).
154
+ */
155
+ pngFile?: boolean | undefined;
156
+ /**
157
+ * Print copyright and version information.
158
+ */
159
+ printVersionInfo?: boolean | undefined;
160
+ /**
161
+ * If the input file contains structural information
162
+ * about the document's content, write this information to the output file (PDF only).
163
+ */
164
+ printDocStruct?: boolean | undefined;
165
+ /**
166
+ * Generate PS file.
167
+ */
168
+ psFile?: boolean | undefined;
169
+ /**
170
+ * Generate Level 2 PostScript (PS only).
171
+ */
172
+ psLevel2?: boolean | undefined;
173
+ /**
174
+ * Generate Level 3 PostScript (PS only). This enables all
175
+ * Level 2 features plus shading patterns and masked images. This is the default setting.
176
+ */
177
+ psLevel3?: boolean | undefined;
178
+ /**
179
+ * Do not print any messages or errors.
180
+ */
181
+ quiet?: boolean | undefined;
182
+ /**
183
+ * Specifies the X resolution, in pixels per inch of
184
+ * image files (or rasterized regions in vector output). The default is `150` PPI.
185
+ */
186
+ resolutionXAxis?: number | undefined;
187
+ /**
188
+ * Specifies the X and Y resolution, in pixels per
189
+ * inch of image files (or rasterized regions in vector output). The default is `150` PPI.
190
+ */
191
+ resolutionXYAxis?: number | undefined;
192
+ /**
193
+ * Specifies the Y resolution, in pixels per inch of
194
+ * image files (or rasterized regions in vector output). The default is `150` PPI.
195
+ */
196
+ resolutionYAxis?: number | undefined;
197
+ /**
198
+ * Scales the long side of each page (width for landscape
199
+ * pages, height for portrait pages) to fit in scale-to pixels. The size of the short side will
200
+ * be determined by the aspect ratio of the page (PNG/JPEG/TIFF only).
201
+ */
202
+ scalePageTo?: number | undefined;
203
+ /**
204
+ * Scales each page horizontally to fit in scale-to-x
205
+ * pixels. If scale-to-y is set to `-1`, the vertical size will be determined by the aspect ratio of
206
+ * the page (PNG/JPEG/TIFF only).
207
+ */
208
+ scalePageToXAxis?: number | undefined;
209
+ /**
210
+ * Scales each page vertically to fit in scale-to-y
211
+ * pixels. If scale-to-x is set to `-1`, the horizontal size will be determined by the aspect ratio of
212
+ * the page (PNG/JPEG/TIFF only).
213
+ */
214
+ scalePageToYAxis?: number | undefined;
215
+ /**
216
+ * Writes only the first page and does not add digits.
217
+ * Can only be used with `options.jpegFile`, `options.pngFile`, and `options.tiffFile`.
218
+ */
219
+ singleFile?: boolean | undefined;
220
+ /**
221
+ * Generate SVG (Scalable Vector Graphics) file.
222
+ */
223
+ svgFile?: boolean | undefined;
224
+ /**
225
+ * Set TIFF compression.
226
+ */
227
+ tiffCompression?: "none" | "deflate" | "jpeg" | "lzw" | "packbits" | undefined;
228
+ /**
229
+ * Generate TIFF file(s).
230
+ */
231
+ tiffFile?: boolean | undefined;
232
+ /**
233
+ * Use a transparent page color
234
+ * instead of white (PNG and TIFF only).
235
+ */
236
+ transparentPageColor?: boolean | undefined;
237
+ /**
238
+ * Specify the user password for the PDF file.
239
+ */
240
+ userPassword?: string | undefined;
241
+ };
@@ -0,0 +1,104 @@
1
+ declare namespace _exports {
2
+ export { PdfToHtmlOptions };
3
+ }
4
+ declare const _exports: Record<keyof PdfToHtmlOptions, import("../index").OptionDetails>;
5
+ export = _exports;
6
+ type PdfToHtmlOptions = {
7
+ /**
8
+ * Generate complex output.
9
+ */
10
+ complexOutput?: boolean | undefined;
11
+ /**
12
+ * Use data URLs instead of external images in HTML.
13
+ */
14
+ dataUrls?: boolean | undefined;
15
+ /**
16
+ * Exchange .pdf links with .html.
17
+ */
18
+ exchangePdfLinks?: boolean | undefined;
19
+ /**
20
+ * Force hidden text extraction.
21
+ */
22
+ extractHidden?: boolean | undefined;
23
+ /**
24
+ * First page to print.
25
+ */
26
+ firstPageToConvert?: number | undefined;
27
+ /**
28
+ * Outputs the font name without any substitutions.
29
+ */
30
+ fontFullName?: boolean | undefined;
31
+ /**
32
+ * Ignore images.
33
+ */
34
+ ignoreImages?: boolean | undefined;
35
+ /**
36
+ * Image file format for Splash output (JPG or PNG).
37
+ * If `options.complexOutput` is enabled, but `options.imageFormat` is not specified, PNG will be assumed.
38
+ */
39
+ imageFormat?: "JPG" | "PNG" | undefined;
40
+ /**
41
+ * Last page to print.
42
+ */
43
+ lastPageToConvert?: number | undefined;
44
+ /**
45
+ * Override document DRM settings.
46
+ */
47
+ noDrm?: boolean | undefined;
48
+ /**
49
+ * Generate no frames. Not supported in complex output mode.
50
+ */
51
+ noFrames?: boolean | undefined;
52
+ /**
53
+ * Do not merge paragraphs.
54
+ */
55
+ noMergeParagraph?: boolean | undefined;
56
+ /**
57
+ * Do not round coordinates
58
+ * (with XML output only).
59
+ */
60
+ noRoundedCoordinates?: boolean | undefined;
61
+ /**
62
+ * Sets the encoding to use for text output.
63
+ * This defaults to `'UTF-8'`.
64
+ */
65
+ outputEncoding?: string | undefined;
66
+ /**
67
+ * Owner password (for encrypted files).
68
+ */
69
+ ownerPassword?: string | undefined;
70
+ /**
71
+ * Print copyright and version info.
72
+ */
73
+ printVersionInfo?: boolean | undefined;
74
+ /**
75
+ * Do not print any messages or errors.
76
+ */
77
+ quiet?: boolean | undefined;
78
+ /**
79
+ * Generate single HTML that includes all pages.
80
+ */
81
+ singlePage?: boolean | undefined;
82
+ /**
83
+ * Use standard output.
84
+ */
85
+ stdout?: boolean | undefined;
86
+ /**
87
+ * User password (for encrypted files).
88
+ */
89
+ userPassword?: string | undefined;
90
+ /**
91
+ * Adjust the word break threshold percent.
92
+ * Default is `10`. Word break occurs when distance between two adjacent characters is greater
93
+ * than this percent of character height.
94
+ */
95
+ wordBreakThreshold?: number | undefined;
96
+ /**
97
+ * Output for XML post-processing.
98
+ */
99
+ xmlOutput?: boolean | undefined;
100
+ /**
101
+ * Zoom the PDF document (default `1.5`).
102
+ */
103
+ zoom?: number | undefined;
104
+ };