* chore(index): export pdfunite options type * chore(index): export pdftotext options type * chore(index): export pdfattach options type * chore(index): export pdfdetach options type * chore(index): restore prefix * chore(index): export the rest * chore: fix whitespace
48 KiB
Classes
Typedefs
- OptionDetails :
object - PopplerAcceptedOptions :
Record.<string, OptionDetails> - PdfAttachOptions
- PdfDetachOptions
- PdfFontsOptions
- PdfImagesOptions
- PdfInfoOptions
- PdfSeparateOptions
- PdfToCairoOptions
- PdfToHtmlOptions
- PdfToPpmOptions
- PdfToPsOptions
- PdfToTextOptions
- PdfUniteOptions
Poppler
Kind: global class
- Poppler
- new Poppler([binPath])
- instance
- .path ⇒
string - .pdfAttach(file, fileToAttach, outputFile, [options]) ⇒
Promise.<string> - .pdfDetach(file, [options]) ⇒
Promise.<string> - .pdfFonts(file, [options]) ⇒
Promise.<string> - .pdfImages(file, [outputPrefix], [options]) ⇒
Promise.<string> - .pdfInfo(file, [options]) ⇒
Promise.<(object|string)> - .pdfSeparate(file, outputPattern, [options]) ⇒
Promise.<string> - .pdfToCairo(file, [outputFile], [options]) ⇒
Promise.<string> - .pdfToHtml(file, [outputFile], [options]) ⇒
Promise.<string> - .pdfToPpm(file, outputPath, [options]) ⇒
Promise.<string> - .pdfToPs(file, [outputFile], [options]) ⇒
Promise.<string> - .pdfToText(file, [outputFile], [options]) ⇒
Promise.<string> - .pdfUnite(files, outputFile, [options]) ⇒
Promise.<string>
- .path ⇒
- static
- .Poppler :
string|undefined
- .Poppler :
new Poppler([binPath])
Throws:
ErrorIf the Poppler binaries cannot be found.
| Param | Type | Description |
|---|---|---|
| [binPath] | string |
Path of poppler-utils binaries. If not provided, the constructor will attempt to find the Poppler pdfinfo binary in the PATH environment variable and use that as the path for all binaries. For win32 the binaries are bundled with the package and will be used if a local installation is not found. |
poppler.path ⇒ string
Returns the path of the Poppler binaries.
Kind: instance property of Poppler
Returns: string - Path of Poppler binaries.
poppler.pdfAttach(file, fileToAttach, outputFile, [options]) ⇒ Promise.<string>
Embeds files (attachments) into a PDF file.
Kind: instance method of Poppler
Returns: Promise.<string> - A promise that resolves with a stdout string, or rejects with an Error object.
Author: Frazer Smith
| Param | Type | Description |
|---|---|---|
| file | string |
Filepath of the PDF file to read. |
| fileToAttach | string |
Filepath of the attachment to be embedded into the PDF file. |
| outputFile | string |
Filepath of the file to output the results to. |
| [options] | PdfAttachOptions |
Options to pass to pdfattach binary. |
poppler.pdfDetach(file, [options]) ⇒ Promise.<string>
Lists or extracts embedded files (attachments) from a PDF file.
Kind: instance method of Poppler
Returns: Promise.<string> - A promise that resolves with a stdout string, or rejects with an Error object.
Author: Frazer Smith
| Param | Type | Description |
|---|---|---|
| file | string |
Filepath of the PDF file to read. |
| [options] | PdfDetachOptions |
Options to pass to pdfdetach binary. |
poppler.pdfFonts(file, [options]) ⇒ Promise.<string>
Lists the fonts used in a PDF file along with various information for each font.
Kind: instance method of Poppler
Returns: Promise.<string> - A promise that resolves with a stdout string, or rejects with an Error object.
Author: Frazer Smith
| Param | Type | Description |
|---|---|---|
| file | Buffer | string |
PDF file as Buffer, or filepath of the PDF file to read. |
| [options] | PdfFontsOptions |
Options to pass to pdffonts binary. |
poppler.pdfImages(file, [outputPrefix], [options]) ⇒ Promise.<string>
Saves images from a PDF file as PPM, PBM, PNG, TIFF, JPEG, JPEG2000, or JBIG2 files.
Kind: instance method of Poppler
Returns: Promise.<string> - A promise that resolves with a stdout string, or rejects with an Error object.
Author: Frazer Smith
| Param | Type | Description |
|---|---|---|
| file | Buffer | string |
PDF file as Buffer, or filepath of the PDF file to read. |
| [outputPrefix] | string |
Filename prefix of output files. |
| [options] | PdfImagesOptions |
Options to pass to pdfimages binary. |
poppler.pdfInfo(file, [options]) ⇒ Promise.<(object|string)>
Prints the contents of the Info dictionary from a PDF file.
Kind: instance method of Poppler
Returns: Promise.<(object|string)> - A promise that resolves with a stdout string or JSON object if
options.printAsJson is true, or rejects with an Error object.
Author: Frazer Smith
| Param | Type | Description |
|---|---|---|
| file | Buffer | string |
PDF file as Buffer, or filepath of the PDF file to read. |
| [options] | PdfInfoOptions |
Options to pass to pdfinfo binary. |
poppler.pdfSeparate(file, outputPattern, [options]) ⇒ Promise.<string>
Extracts single pages from a PDF file, and writes one PDF file for each page to outputPattern. This will not work if the file is encrypted.
Kind: instance method of Poppler
Returns: Promise.<string> - A promise that resolves with a stdout string, or rejects with an Error object.
Author: Frazer Smith
| Param | Type | Description |
|---|---|---|
| file | string |
Filepath of the PDF file to read. |
| outputPattern | string |
Should contain %d (or any variant respecting printf format), since %d is replaced by the page number. As an example, sample-%d.pdf will produce sample-1.pdf for a single page document. |
| [options] | PdfSeparateOptions |
Options to pass to pdfseparate binary. |
poppler.pdfToCairo(file, [outputFile], [options]) ⇒ Promise.<string>
Converts a PDF file to EPS/JPEG/PDF/PNG/PS/SVG/TIFF.
Kind: instance method of Poppler
Returns: Promise.<string> - A promise that resolves with a stdout string, or rejects with an Error object.
Author: Frazer Smith
| Param | Type | Description |
|---|---|---|
| file | Buffer | string |
PDF file as Buffer, or filepath of the PDF file to read. |
| [outputFile] | string |
Filepath of the file to output the results to. If undefined then will write output to stdout. Using stdout is not valid with image formats (jpeg, png, and tiff) unless options.singleFile is set to true. Encoding is set to binary if used with options.singleFile or options.pdfFile. If not set then the output filename will be derived from the PDF file name. |
| [options] | PdfToCairoOptions |
Options to pass to pdftocairo binary. |
poppler.pdfToHtml(file, [outputFile], [options]) ⇒ Promise.<string>
Converts a PDF file to HTML.
Kind: instance method of Poppler
Returns: Promise.<string> - A promise that resolves with a stdout string, or rejects with an Error object.
Author: Frazer Smith
| Param | Type | Description |
|---|---|---|
| file | Buffer | string |
PDF file as Buffer, or filepath of the PDF file to read. |
| [outputFile] | string |
Filepath of the file to output the results to. If undefined then Poppler will use the directory and name of the original file and create a new file, with -html appended to the end of the filename. Required if file is a Buffer. |
| [options] | PdfToHtmlOptions |
Options to pass to pdftohtml binary. |
poppler.pdfToPpm(file, outputPath, [options]) ⇒ Promise.<string>
Converts a PDF file to colour image files in Portable Pixmap (PPM) format, grayscale image files in Portable Graymap (PGM) format, or monochrome image files in Portable Bitmap (PBM) format.
Kind: instance method of Poppler
Returns: Promise.<string> - A promise that resolves with a stdout string, or rejects with an Error object.
Author: Frazer Smith
| Param | Type | Description |
|---|---|---|
| file | Buffer | string |
PDF file as Buffer, or filepath of the PDF file to read. |
| outputPath | string |
Filepath to output the results to. |
| [options] | PdfToPpmOptions |
Options to pass to pdftoppm binary. |
poppler.pdfToPs(file, [outputFile], [options]) ⇒ Promise.<string>
Converts a PDF file to PostScript (PS).
Kind: instance method of Poppler
Returns: Promise.<string> - A promise that resolves with a stdout string, or rejects with an Error object.
Author: Frazer Smith
| Param | Type | Description |
|---|---|---|
| file | Buffer | string |
PDF file as Buffer, or filepath of the PDF file to read. |
| [outputFile] | string |
Filepath of the file to output the results to. If undefined then will write output to stdout. |
| [options] | PdfToPsOptions |
Options to pass to pdftops binary. |
poppler.pdfToText(file, [outputFile], [options]) ⇒ Promise.<string>
Converts a PDF file to TXT.
Kind: instance method of Poppler
Returns: Promise.<string> - A promise that resolves with a stdout string, or rejects with an Error object.
Author: Frazer Smith
| Param | Type | Description |
|---|---|---|
| file | Buffer | string |
PDF file as Buffer, or filepath of the PDF file to read. |
| [outputFile] | string |
Filepath of the file to output the results to. If undefined then will write output to stdout. |
| [options] | PdfToTextOptions |
Options to pass to pdftotext binary. |
poppler.pdfUnite(files, outputFile, [options]) ⇒ Promise.<string>
Merges several PDF files in order of their occurrence in the files array to one PDF result file.
Kind: instance method of Poppler
Returns: Promise.<string> - A promise that resolves with a stdout string, or rejects with an Error object.
Author: Frazer Smith
| Param | Type | Description |
|---|---|---|
| files | Array.<string> |
Filepaths of the PDF files to merge. An entire directory of PDF files can be merged like so: path/to/directory/*.pdf. |
| outputFile | string |
Filepath of the file to output the resulting merged PDF to. |
| [options] | PdfUniteOptions |
Options to pass to pdfunite binary. |
Poppler.Poppler : string | undefined
Kind: static property of Poppler
OptionDetails : object
Kind: global typedef
Properties
| Name | Type | Description |
|---|---|---|
| arg | string |
The argument to pass to the binary. |
| type | 'boolean' | 'number' | 'string' |
The type of the option. |
| [minVersion] | string |
The minimum version of the binary that supports this option. |
| [maxVersion] | string |
The maximum version of the binary that supports this option (optional). |
PopplerAcceptedOptions : Record.<string, OptionDetails>
PdfAttachOptions
Kind: global typedef
Properties
| Name | Type | Description |
|---|---|---|
| [printVersionInfo] | boolean |
Print copyright and version info. |
| [replace] | boolean |
Replace embedded file with same name (if it exists). |
PdfDetachOptions
Kind: global typedef
Properties
| Name | Type | Description |
|---|---|---|
| [listEmbedded] | boolean |
List all of the embedded files in the PDF file. File names are converted to the text encoding specified by options.outputEncoding. |
| [outputEncoding] | string |
Sets the encoding to use for text output. This defaults to UTF-8. |
| [ownerPassword] | string |
Owner password (for encrypted files). |
| [outputPath] | string |
Set the file name used when saving an embedded file with the save option enabled, or the directory if options.saveall is used. |
| [printVersionInfo] | boolean |
Print copyright and version info. |
| [saveAllFiles] | boolean |
Save all of the embedded files. This uses the file names associated with the embedded files (as printed by options.listEmbedded). By default, the files are saved in the current directory; this can be changed with options.outputPath. |
| [saveFile] | string |
Save the specified embedded file. By default, this uses the file name associated with the embedded file (as printed by options.listEmbedded); the file name can be changed with options.outputPath. |
| [saveSpecificFile] | number |
Save the specified embedded file. By default, this uses the file name associated with the embedded file (as printed by options.listEmbedded); the file name can be changed with options.outputPath. |
| [userPassword] | string |
User password (for encrypted files). |
PdfFontsOptions
Kind: global typedef
Properties
| Name | Type | Description |
|---|---|---|
| [firstPageToExamine] | number |
Specifies the first page to examine. |
| [lastPageToExamine] | number |
Specifies the last page to examine. |
| [listSubstitutes] | boolean |
List the substitute fonts that poppler will use for non-embedded fonts. |
| [ownerPassword] | string |
Owner password (for encrypted files). |
| [printVersionInfo] | boolean |
Print copyright and version info. |
| [userPassword] | string |
User password (for encrypted files). |
PdfImagesOptions
Kind: global typedef
Properties
| Name | Type | Description |
|---|---|---|
| [allFiles] | boolean |
Write JPEG, JPEG2000, JBIG2, and CCITT images in their native format. CMYK files are written as TIFF files. All other images are written as PNG files. |
| [ccittFile] | boolean |
Generate CCITT images as CCITT files. |
| [firstPageToConvert] | number |
Specifies the first page to convert. |
| [lastPageToConvert] | number |
Specifies the last page to convert. |
| [jbig2File] | boolean |
Generate JBIG2 images as JBIG2 files. |
| [jpeg2000File] | boolean |
Generate JPEG2000 images at JP2 files. |
| [jpegFile] | boolean |
Generate JPEG images as JPEG files. |
| [list] | boolean |
Instead of writing the images, list the images along with various information for each image. NOTE: Do not specify the outputPrefix with this option. |
| [ownerPassword] | string |
Owner password (for encrypted files). |
| [pngFile] | boolean |
Change the default output format to PNG. |
| [printVersionInfo] | boolean |
Print copyright and version info. |
| [tiffFile] | boolean |
Change the default output format to TIFF. |
| [userPassword] | string |
Specify the user password for the PDF file. |
PdfInfoOptions
Kind: global typedef
Properties
| Name | Type | Description |
|---|---|---|
| [firstPageToConvert] | number |
First page to print. |
| [lastPageToConvert] | number |
Last page to print. |
| [listEncodingOptions] | boolean |
List the available encodings. |
| [outputEncoding] | string |
Sets the encoding to use for text output. This defaults to UTF-8. |
| [ownerPassword] | string |
Owner password (for encrypted files). |
| [printAsJson] | boolean |
Print result as a JSON object. |
| [printBoundingBoxes] | boolean |
Prints the page box bounding boxes: MediaBox, CropBox, BleedBox, TrimBox, and ArtBox. |
| [printDocStruct] | boolean |
Prints the logical document structure of a Tagged-PDF file. |
| [printDocStructText] | boolean |
Print the textual content along with the document structure of a Tagged-PDF file. Note that extracting text this way might be slow for big PDF files. |
| [printIsoDates] | boolean |
Prints dates in ISO-8601 format (including the time zone). |
| [printJS] | boolean |
Prints all JavaScript in the PDF file. |
| [printMetadata] | boolean |
Prints document-level metadata. (This is the Metadata stream from the PDF file's Catalog object). |
| [printNamedDests] | boolean |
Print a list of all named destinations. If a page range is specified using the options.firstPageToConvert and options.lastPageToConvert options, only destinations in the page range are listed. |
| [printRawDates] | boolean |
Prints the raw (undecoded) date strings, directly from the PDF file. |
| [printUrls] | boolean |
Print all URLs in the PDF; only URLs referenced by PDF objects such as Link Annotations are listed, not URL strings in the text content. |
| [printVersionInfo] | boolean |
Print copyright and version info. |
| [userPassword] | string |
User password (for encrypted files). |
PdfSeparateOptions
Kind: global typedef
Properties
| Name | Type | Description |
|---|---|---|
| [firstPageToExtract] | number |
Specifies the first page to extract. This defaults to page 1. |
| [lastPageToExtract] | number |
Specifies the last page to extract. This defaults to the last page of the PDF file. |
| [printVersionInfo] | boolean |
Print copyright and version info. |
PdfToCairoOptions
Kind: global typedef
Properties
| Name | Type | Description |
|---|---|---|
| [antialias] | 'best' | 'default' | 'fast' | 'good' | 'gray' | 'none' | 'subpixel' |
Set the cairo antialias option used for text and drawing in image files (or rasterized regions in vector output). |
| [cropBox] | boolean |
Uses the crop box rather than media box when generating the files (PNG/JPEG/TIFF only). |
| [cropHeight] | number |
Specifies the height of crop area in pixels (image output) or points (vector output). |
| [cropSize] | number |
Specifies the size of crop square in pixels (image output) or points (vector output). |
| [cropWidth] | number |
Specifies the width of crop area in pixels (image output) or points (vector output). |
| [cropXAxis] | number |
Specifies the x-coordinate of the crop area top left corner in pixels (image output) or points (vector output). |
| [cropYAxis] | number |
Specifies the y-coordinate of the crop area top left corner in pixels (image output) or points (vector output). |
| [duplex] | boolean |
Adds the %%IncludeFeature: *Duplex DuplexNoTumble DSC comment to the PostScript file (PS only). This tells the print manager to enable duplexing. |
| [epsFile] | boolean |
Generate an EPS file. An EPS file contains a single image, so if you use this option with a multi-page PDF file, you must use options.firstPageToConvert and options.lastPageToConvert to specify a single page. The page size options (originalPageSizes, paperSize, paperWidth, paperHeight) can not be used with this option. |
| [evenPagesOnly] | boolean |
Generates only the even numbered pages. |
| [fillPage] | boolean |
Expand PDF pages smaller than the paper to fill the paper (PS,PDF,SVG only). By default, these pages are not scaled. |
| [firstPageToConvert] | number |
Specifies the first page to convert. |
| [grayscaleFile] | boolean |
Generate grayscale file (PNG, JPEG, and TIFF only). |
| [iccFile] | string |
Use the specified ICC file as the output profile (PNG only). The profile will be embedded in the PNG file. |
| [jpegFile] | boolean |
Generate JPEG file(s). |
| [jpegOptions] | string |
When used with options.jpegFile, this option can be used to control the JPEG compression parameters. It takes a string of the form "<opt>=<val>[,<opt>=<val>]". Currently available options are: - quality Selects the JPEG quality value. The value must be an integer between 0 and 100. - progressive Select progressive JPEG output. The possible values are "y", "n", indicating progressive (yes) or non-progressive (no), respectively. - optimize Sets whether to compute optimal Huffman coding tables for the JPEG output, which will create smaller files but make an extra pass over the data. The value must be "y" or "n", with "y" performing optimization, otherwise the default Huffman tables are used. Example: "quality=95,optimize=y". |
| [lastPageToConvert] | number |
Specifies the last page to convert. |
| [monochromeFile] | boolean |
Generate monochrome file (PNG and TIFF only). |
| [noCenter] | boolean |
By default, PDF pages smaller than the paper (after any scaling) are centered on the paper. This option causes them to be aligned to the lower-left corner of the paper instead (PS,PDF,SVG only). |
| [noCrop] | boolean |
By default, printing output is cropped to the CropBox specified in the PDF file. This option disables cropping (PS, PDF, SVG only). |
| [noShrink] | boolean |
Do not scale PDF pages which are larger than the paper (PS,PDF,SVG only). By default, pages larger than the paper are shrunk to fit. |
| [oddPagesOnly] | boolean |
Generates only the odd numbered pages. |
| [originalPageSizes] | boolean |
Set the paper size of each page to match the size specified in the PDF file. |
| [ownerPassword] | string |
Specify the owner password for the PDF file. Providing this will bypass all security restrictions. |
| [paperHeight] | number |
Set the paper height, in points (PS, PDF, SVG only). |
| [paperSize] | 'A3' | 'A4' | 'legal' | 'letter' | 'match' |
Set the paper size to one of A3, A4, legal, or letter (PS,PDF,SVG only). This can also be set to match, which will set the paper size of each page to match the size specified in the PDF file. If none of the paperSize, paperWidth, or paperHeight options are specified the default is to match the paper size. |
| [paperWidth] | number |
Set the paper width, in points (PS,PDF,SVG only). |
| [pdfFile] | boolean |
Generate PDF file. |
| [pngFile] | boolean |
Generate PNG file(s). |
| [printVersionInfo] | boolean |
Print copyright and version information. |
| [printDocStruct] | boolean |
If the input file contains structural information about the document's content, write this information to the output file (PDF only). |
| [psFile] | boolean |
Generate PS file. |
| [psLevel2] | boolean |
Generate Level 2 PostScript (PS only). |
| [psLevel3] | boolean |
Generate Level 3 PostScript (PS only). This enables all Level 2 features plus shading patterns and masked images. This is the default setting. |
| [quiet] | boolean |
Do not print any messages or errors. |
| [resolutionXAxis] | number |
Specifies the X resolution, in pixels per inch of image files (or rasterized regions in vector output). The default is 150 PPI. |
| [resolutionXYAxis] | number |
Specifies the X and Y resolution, in pixels per inch of image files (or rasterized regions in vector output). The default is 150 PPI. |
| [resolutionYAxis] | number |
Specifies the Y resolution, in pixels per inch of image files (or rasterized regions in vector output). The default is 150 PPI. |
| [scalePageTo] | number |
Scales the long side of each page (width for landscape pages, height for portrait pages) to fit in scale-to pixels. The size of the short side will be determined by the aspect ratio of the page (PNG/JPEG/TIFF only). |
| [scalePageToXAxis] | number |
Scales each page horizontally to fit in scale-to-x pixels. If scale-to-y is set to -1, the vertical size will determined by the aspect ratio of the page (PNG/JPEG/TIFF only). |
| [scalePageToYAxis] | number |
Scales each page vertically to fit in scale-to-y pixels. If scale-to-x is set to -1, the horizontal size will determined by the aspect ratio of the page (PNG/JPEG/TIFF only). |
| [singleFile] | boolean |
Writes only the first page and does not add digits. Can only be used with options.jpegFile, options.pngFile, and options.tiffFile. |
| [svgFile] | boolean |
Generate SVG (Scalable Vector Graphics) file. |
| [tiffCompression] | 'deflate' | 'jpeg' | 'lzw' | 'none' | 'packbits' |
Set TIFF compression. |
| [tiffFile] | boolean |
Generate TIFF file(s). |
| [transparentPageColor] | boolean |
Use a transparent page color instead of white (PNG and TIFF only). |
| [userPassword] | string |
Specify the user password for the PDF file. |
PdfToHtmlOptions
Kind: global typedef
Properties
| Name | Type | Description |
|---|---|---|
| [complexOutput] | boolean |
Generate complex output. |
| [dataUrls] | boolean |
Use data URLs instead of external images in HTML. |
| [exchangePdfLinks] | boolean |
Exchange .pdf links with .html. |
| [extractHidden] | boolean |
Force hidden text extraction. |
| [firstPageToConvert] | number |
First page to print. |
| [fontFullName] | boolean |
Outputs the font name without any substitutions. |
| [ignoreImages] | boolean |
Ignore images. |
| [imageFormat] | 'JPG' | 'PNG' |
Image file format for Splash output (JPG or PNG). If complexOutput is selected, but imageFormat is not specified, PNG will be assumed. |
| [lastPageToConvert] | number |
Last page to print. |
| [noDrm] | boolean |
Override document DRM settings. |
| [noFrames] | boolean |
Generate no frames. Not supported in complex output mode. |
| [noMergeParagraph] | boolean |
Do not merge paragraphs. |
| [noRoundedCoordinates] | boolean |
Do not round coordinates (with XML output only). |
| [outputEncoding] | string |
Sets the encoding to use for text output. This defaults to UTF-8. |
| [ownerPassword] | string |
Owner password (for encrypted files). |
| [printVersionInfo] | boolean |
Print copyright and version info. |
| [quiet] | boolean |
Do not print any messages or errors. |
| [singlePage] | boolean |
Generate single HTML that includes all pages. |
| [stdout] | boolean |
Use standard output. |
| [userPassword] | string |
User password (for encrypted files). |
| [wordBreakThreshold] | number |
Adjust the word break threshold percent. Default is 10. Word break occurs when distance between two adjacent characters is greater than this percent of character height. |
| [xmlOutput] | boolean |
Output for XML post-processing. |
| [zoom] | number |
Zoom the PDF document (default 1.5). |
PdfToPpmOptions
Kind: global typedef
Properties
| Name | Type | Description |
|---|---|---|
| [antialiasFonts] | 'no' | 'yes' |
Enable or disable font anti-aliasing. This defaults to yes. |
| [antialiasVectors] | 'no' | 'yes' |
Enable or disable vector anti-aliasing. This defaults to yes. |
| [cropBox] | boolean |
Uses the crop box rather than media box when generating the files (PNG/JPEG/TIFF only). |
| [cropHeight] | number |
Specifies the height of crop area in pixels (image output) or points (vector output). |
| [cropSize] | number |
Specifies the size of crop square in pixels (image output) or points (vector output). |
| [cropWidth] | number |
Specifies the width of crop area in pixels (image output) or points (vector output). |
| [cropXAxis] | number |
Specifies the x-coordinate of the crop area top left corner in pixels (image output) or points (vector output). |
| [cropYAxis] | number |
Specifies the y-coordinate of the crop area top left corner in pixels (image output) or points (vector output). |
| [defaultCmykProfile] | string |
If Poppler is compiled with colour management support, this option sets the DefaultCMYK color space to the ICC profile stored in the display profile file passed. |
| [defaultGrayProfile] | string |
If Poppler is compiled with colour management support, this option sets the DefaultGray color space to the ICC profile stored in the display profile file passed. |
| [defaultRgbProfile] | string |
If Poppler is compiled with colour management support, this option sets the DefaultRGB color space to the ICC profile stored in the display profile file passed. |
| [displayProfile] | string |
If Poppler is compiled with colour management support, this option sets the display profile to the ICC profile stored in the display profile file passed. |
| [evenPagesOnly] | boolean |
Generates only the even numbered pages. |
| [firstPageToConvert] | number |
Specifies the first page to convert. |
| [freetype] | 'no' | 'yes' |
Enable or disable FreeType (a TrueType / Type 1 font rasterizer). This defaults to yes. |
| [forcePageNumber] | boolean |
Force page number even if there is only one page. |
| [grayscaleFile] | boolean |
Generate grayscale PGM file (instead of a color PPM file). |
| [hideAnnotations] | boolean |
Hide annotations. |
| [jpegFile] | boolean |
Generate JPEG file instead a PPM file. |
| [lastPageToConvert] | number |
Specifies the last page to convert. |
| [monochromeFile] | boolean |
Generate monochrome PBM file (instead of a color PPM file). |
| [oddPagesOnly] | boolean |
Generates only the odd numbered pages. |
| [ownerPassword] | string |
Specify the owner password for the PDF file. Providing this will bypass all security restrictions. |
| [pngFile] | boolean |
Generate PNG file instead a PPM file. |
| [printProgress] | boolean |
Print progress info as each page is generated. Three space-separated fields are printed to STDERR: the number of the current page, the number of the last page that will be generated, and the path to the file written to. |
| [printVersionInfo] | boolean |
Print copyright and version information. |
| [quiet] | boolean |
Do not print any messages or errors. |
| [resolutionXAxis] | number |
Specifies the X resolution, in pixels per inch of image files (or rasterized regions in vector output). The default is 150 PPI. |
| [resolutionXYAxis] | number |
Specifies the X and Y resolution, in pixels per inch of image files (or rasterized regions in vector output). The default is 150 PPI. |
| [resolutionYAxis] | number |
Specifies the Y resolution, in pixels per inch of image files (or rasterized regions in vector output). The default is 150 PPI. |
| [scalePageTo] | number |
Scales the long side of each page (width for landscape pages, height for portrait pages) to fit in scale-to pixels. The size of the short side will be determined by the aspect ratio of the page. |
| [scalePageToXAxis] | number |
Scales each page horizontally to fit in scale-to-x pixels. If scale-to-y is set to -1, the vertical size will determined by the aspect ratio of the page. |
| [scalePageToYAxis] | number |
Scales each page vertically to fit in scale-to-y pixels. If scale-to-x is set to -1, the horizontal size will determined by the aspect ratio of the page. |
| [separator] | string |
Specify single character separator between name and page number. |
| [singleFile] | boolean |
Writes only the first page and does not add digits. |
| [thinLineMode] | 'none' | 'shape' | 'solid' |
Specifies the thin line mode. This defaults to none. |
| [tiffCompression] | 'deflate' | 'jpeg' | 'lzw' | 'none' | 'packbits' |
Set TIFF compression. |
| [tiffFile] | boolean |
Generate TIFF file instead a PPM file. |
| [userPassword] | string |
Specify the user password for the PDF file. |
PdfToPsOptions
Kind: global typedef
Properties
| Name | Type | Description |
|---|---|---|
| [antialias] | 'no' | 'yes' |
Enable anti-aliasing on rasterization, accepts no or yes. |
| [binary] | boolean |
Write binary data in Level 1 PostScript. By default, pdftops writes hex-encoded data in Level 1 PostScript. Binary data is non-standard in Level 1 PostScript but reduces the file size and can be useful when Level 1 PostScript is required only for its restricted use of PostScript operators. |
| [defaultCmykProfile] | string |
If Poppler is compiled with colour management support, this option sets the DefaultCMYK color space to the ICC profile stored in the display profile file passed. |
| [defaultGrayProfile] | string |
If Poppler is compiled with colour management support, this option sets the DefaultGray color space to the ICC profile stored in the display profile file passed. |
| [defaultRgbProfile] | string |
If Poppler is compiled with colour management support, this option sets the DefaultRGB color space to the ICC profile stored in the display profile file passed. |
| [duplex] | boolean |
Set the Duplex pagedevice entry in the PostScript file. This tells duplex-capable printers to enable duplexing. |
| [epsFile] | boolean |
Generate an EPS file. An EPS file contains a single image, so if you use this option with a multi-page PDF file, you must use options.firstPageToConvert and options.lastPageToConvert to specify a single page. The page size options (originalPageSizes, paperSize, paperWidth, paperHeight) can not be used with this option. |
| [fillPage] | boolean |
Expand PDF pages smaller than the paper to fill the paper. By default, these pages are not scaled. |
| [firstPageToConvert] | number |
Specifies the first page to convert. |
| [form] | number |
Generate PostScript form which can be imported by software that understands forms. A form contains a single page, so if you use this option with a multi-page PDF file, you must use options.firstPageToConvert and options.lastPageToConvert to specify a single page. The options.level1 option cannot be used with options.form. No more than one of the mode options (options.epsFile, options.form) may be given. |
| [lastPageToConvert] | number |
Specifies the last page to convert. |
| [level1] | boolean |
Generate Level 1 PostScript. The resulting PostScript files will be significantly larger (if they contain images), but will print on Level 1 printers. This also converts all images to black and white. |
| [level1Sep] | boolean |
Generate Level 1 separable PostScript. All colors are converted to CMYK. Images are written with separate stream data for the four components. |
| [level2] | boolean |
Generate Level 2 PostScript. Level 2 supports color images and image compression. This is the default setting. |
| [level2Sep] | boolean |
Generate Level 2 separable PostScript. All colors are converted to CMYK. The PostScript separation convention operators are used to handle custom (spot) colors. |
| [level3] | boolean |
Generate Level 3 PostScript. This enables all Level 2 features plus CID font embedding. |
| [level3Sep] | boolean |
Generate Level 3 separable PostScript. The separation handling is the same as for options.level2Sep. |
| [noCenter] | boolean |
By default, PDF pages smaller than the paper (after any scaling) are centered on the paper. This option causes them to be aligned to the lower-left corner of the paper instead. |
| [noCrop] | boolean |
By default, printing output is cropped to the CropBox specified in the PDF file. This option disables cropping. |
| [noEmbedCIDFonts] | boolean |
By default, any CID PostScript fonts which are embedded in the PDF file are copied into the PostScript file. This option disables that embedding. No attempt is made to substitute for non-embedded CID PostScript fonts. |
| [noEmbedCIDTrueTypeFonts] | boolean |
By default, any CID TrueType fonts which are embedded in the PDF file are copied into the PostScript file. This option disables that embedding. No attempt is made to substitute for non-embedded CID TrueType fonts. |
| [noEmbedTrueTypeFonts] | boolean |
By default, any TrueType fonts which are embedded in the PDF file are copied into the PostScript file. This option causes pdfToPs to substitute base fonts instead. Embedded fonts make PostScript files larger, but may be necessary for readable output. Also, some PostScript interpreters do not have TrueType rasterizers. |
| [noEmbedType1Fonts] | boolean |
By default, any Type 1 fonts which are embedded in the PDF file are copied into the PostScript file. This option causes pdfToPs to substitute base fonts instead. Embedded fonts make PostScript files larger, but may be necessary for readable output. |
| [noShrink] | boolean |
Do not scale PDF pages which are larger than the paper. By default, pages larger than the paper are shrunk to fit. |
| [opi] | boolean |
Generate OPI comments for all images and forms which have OPI information. |
| [optimizecolorspace] | boolean |
By default, bitmap images in the PDF pass through to the output PostScript in their original color space, which produces predictable results. This option converts RGB and CMYK images into Gray images if every pixel of the image has equal components. This can fix problems when doing color separations of PDFs that contain embedded black and white images encoded as RGB. |
| [originalPageSizes] | boolean |
Set the paper size of each page to match the size specified in the PDF file. |
| [overprint] | boolean |
Enable overprinting. |
| [ownerPassword] | string |
Owner password (for encrypted files). |
| [paperHeight] | number |
Set the paper height, in points. |
| [paperSize] | 'A3' | 'A4' | 'legal' | 'letter' | 'match' |
Set the paper size to one of A3, A4, legal, or letter. This can also be set to match, which will set the paper size of each page to match the size specified in the PDF file. If none of the paperSize, paperWidth, or paperHeight options are specified the default is to match the paper size. |
| [paperWidth] | number |
Set the paper width, in points. |
| [passfonts] | boolean |
By default, references to non-embedded 8-bit fonts in the PDF file are substituted with the closest Helvetica, Times-Roman, or Courier font. This option passes references to non-embedded fonts through to the PostScript file. |
| [preload] | boolean |
Preload images and forms. |
| [printVersionInfo] | boolean |
Print copyright and version information. |
| [processColorFormat] | 'CMYK8' | 'MONO8' | 'RGB8' |
Sets the process color format as it is used during rasterization and transparency reduction. The default depends on the other settings: For options.level1 the default is MONO8; for options.level1Sep, options.level2Sep, options.level3Sep, or options.overprint the default is CMYK8; in all other cases RGB8 is the default. If option.processColorProfile is set then options.processColorFormat is inferred from the specified ICC profile. |
| [processColorProfile] | string |
Sets the ICC profile that is assumed during rasterization and transparency reduction. |
| [quiet] | boolean |
Do not print any messages or errors. |
| [rasterize] | 'always' | 'never' | 'whenneeded' |
By default, pdfToPs rasterizes pages as needed, for example, if they contain transparencies. To force rasterization, set rasterize to always. Use this to eliminate fonts. To prevent rasterization, set rasterize to never. This may produce files that display incorrectly. |
| [resolutionXYAxis] | number |
Specifies the X and Y resolution, in pixels per inch of image files (or rasterized regions in vector output). The default is 300 PPI. |
| [userPassword] | string |
User password (for encrypted files). |
PdfToTextOptions
Kind: global typedef
Properties
| Name | Type | Description |
|---|---|---|
| [boundingBoxXhtml] | boolean |
Generate an XHTML file containing bounding box information for each word in the file. |
| [boundingBoxXhtmlLayout] | boolean |
Generate an XHTML file containing bounding box information for each block, line, and word in the file. |
| [cropBox] | boolean |
Use the crop box rather than the media box with options.boundingBoxXhtml and options.boundingBoxXhtmlLayout. |
| [cropHeight] | number |
Specifies the height of crop area in pixels (image output) or points (vector output). |
| [cropWidth] | number |
Specifies the width of crop area in pixels (image output) or points (vector output). |
| [cropXAxis] | number |
Specifies the x-coordinate of the crop area top left corner in pixels (image output) or points (vector output). |
| [cropYAxis] | number |
Specifies the y-coordinate of the crop area top left corner in pixels (image output) or points (vector output). |
| [eolConvention] | 'dos' | 'mac' | 'unix' |
Sets the end-of-line convention to use for text output: dos; mac; unix. |
| [firstPageToConvert] | number |
Specifies the first page to convert. |
| [fixedWidthLayout] | number |
Assume fixed-pitch (or tabular) text, with the specified character width (in points). This forces physical layout mode. |
| [generateHtmlMetaFile] | boolean |
Generate simple HTML file, including the meta information. This simply wraps the text in <pre> and </pre> and prepends the meta headers. |
| [generateTsvFile] | boolean |
Generate a TSV file containing the bounding box information for each block, line, and word in the file. |
| [lastPageToConvert] | number |
Specifies the last page to convert. |
| [listEncodingOptions] | boolean |
List the available encodings. |
| [maintainLayout] | boolean |
Maintain (as best as possible) the original physical layout of the text. The default is to undo physical layout (columns, hyphenation, etc.) and output the text in reading order. |
| [noDiagonalText] | boolean |
Discard diagonal text. |
| [noPageBreaks] | boolean |
Do not insert page breaks (form feed characters) between pages. |
| [outputEncoding] | string |
Sets the encoding to use for text output. This defaults to UTF-8. |
| [ownerPassword] | string |
Owner password (for encrypted files). |
| [printVersionInfo] | boolean |
Print copyright and version information. |
| [quiet] | boolean |
Do not print any messages or errors. |
| [rawLayout] | boolean |
Keep the text in content stream order. This is a hack which often undoes column formatting, etc. Use of raw mode is no longer recommended. |
| [userPassword] | string |
User password (for encrypted files). |
PdfUniteOptions
Kind: global typedef
Properties
| Name | Type | Description |
|---|---|---|
| [printVersionInfo] | boolean |
Print copyright and version information. |