Skip to content

Latest commit

 

History

History
457 lines (382 loc) · 105 KB

API.md

File metadata and controls

457 lines (382 loc) · 105 KB

Classes

Poppler

Functions

parseOptions(options, acceptedOptions)Promise.<(string|Error)>

Check each option provided is valid and of the correct type.

Poppler

Kind: global class

new Poppler([binPath])

Param Type Description
[binPath] string Path of poppler-utils binaries. Useful for Linux users who have poppler-utils binaries already installed.

poppler.pdfAttach([options], file, fileToAttach, outputFile) ⇒ Promise.<(string|Error)>

Embeds files (attachments) into a PDF file.

Kind: instance method of Poppler
Returns: Promise.<(string|Error)> - Promise of stdout string on resolve, or Error object on rejection.
Author: Frazer Smith

Param Type Description
[options] object Object containing options to pass to binary.
[options.printVersionInfo] boolean Print copyright and version info.
[options.replace] boolean Replace embedded file with same name (if it exists).
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.

poppler.pdfDetach([options], file) ⇒ Promise.<(string|Error)>

Lists or extracts embedded files (attachments) from a PDF file.

Kind: instance method of Poppler
Returns: Promise.<(string|Error)> - Promise of stdout string on resolve, or Error object on rejection.
Author: Frazer Smith

Param Type Description
[options] object Object containing options to pass to binary.
[options.listEmbedded] boolean List all of the embedded files in the PDF file. File names are converted to the text encoding specified by the 'outputEncoding' option.
[options.ownerPassword] string Owner password (for encrypted files).
[options.outputEncoding] string Sets the encoding to use for text output. This defaults to "UTF-8".
[options.outputPath] string Set the file name used when saving an embedded file with the save option enabled, or the directory if the 'saveall' option is used.
[options.printVersionInfo] boolean Print copyright and version info.
[options.saveAllFiles] boolean Save all of the embedded files. This uses the file names associated with the embedded files (as printed by the 'listEmbedded' option). By default, the files are saved in the current directory; this can be changed with the 'outputPath' option.
[options.saveFile] string Save the specified embedded file. By default, this uses the file name associated with the embedded file (as printed by the 'listEmbedded' option); the file name can be changed with the 'outputPath' option.
[options.saveSpecificFile] number Save the specified embedded file. By default, this uses the file name associated with the embedded file (as printed by the 'listEmbedded' option); the file name can be changed with the 'outputPath' option.
[options.userPassword] string User password (for encrypted files).
file string Filepath of the PDF file to read.

poppler.pdfFonts([options], file) ⇒ Promise.<(string|Error)>

Lists the fonts used in a PDF file along with various information for each font.

Kind: instance method of Poppler
Returns: Promise.<(string|Error)> - Promise of stdout string on resolve, or Error object on rejection.
Author: Frazer Smith

Param Type Description
[options] object Object containing options to pass to binary.
[options.firstPageToExamine] number Specifies the first page to examine.
[options.lastPageToExamine] number Specifies the last page to examine.
[options.listSubstitutes] boolean List the substitute fonts that poppler will use for non-embedded fonts.
[options.ownerPassword] string Owner password (for encrypted files).
[options.printVersionInfo] boolean Print copyright and version info.
[options.userPassword] string User password (for encrypted files).
file string Filepath of the PDF file to read.

poppler.pdfImages([options], file, outputPrefix) ⇒ Promise.<(string|Error)>

Saves images from a PDF file as PPM, PBM, PNG, TIFF, JPEG, JPEG2000, or JBIG2 files.

Kind: instance method of Poppler
Returns: Promise.<(string|Error)> - Promise of stdout string on resolve, or Error object on rejection.
Author: Frazer Smith

Param Type Description
[options] object Object containing options to pass to binary.
[options.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.
[options.ccittFile] boolean Generate CCITT images as CCITT files.
[options.firstPageToConvert] number Specifies the first page to convert.
[options.lastPageToConvert] number Specifies the last page to convert.
[options.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.
[options.jbig2File] boolean Generate JBIG2 images as JBIG2 files.
[options.jpeg2000File] boolean Generate JPEG2000 images at JP2 files.
[options.jpegFile] boolean Generate JPEG images as JPEG files.
[options.ownerPassword] string Owner password (for encrypted files).
[options.pngFile] boolean Change the default output format to PNG.
[options.printVersionInfo] boolean Print copyright and version info.
[options.tiffFile] boolean Change the default output format to TIFF.
[options.userPassword] string Specify the user password for the PDF file.
file string Filepath of the PDF file to read.
outputPrefix string Filename prefix of output files.

poppler.pdfInfo([options], file) ⇒ Promise.<(string|Error)>

Prints the contents of the ´Info' dictionary from a PDF file.

Kind: instance method of Poppler
Returns: Promise.<(string|Error)> - Promise of stdout string on resolve, or Error object on rejection.
Author: Frazer Smith

Param Type Description
[options] object Object containing options to pass to binary.
[options.firstPageToConvert] number First page to print.
[options.lastPageToConvert] number Last page to print.
[options.listEncodingOptions] boolean List the available encodings.
[options.outputEncoding] string Sets the encoding to use for text output. This defaults to "UTF-8".
[options.ownerPassword] string Owner password (for encrypted files).
[options.printBoundingBoxes] boolean Prints the page box bounding boxes: MediaBox, CropBox, BleedBox, TrimBox, and ArtBox.
[options.printDocStruct] boolean Prints the logical document structure of a Tagged-PDF file.
[options.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.
[options.printIsoDates] boolean Prints dates in ISO-8601 format (including the time zone).
[options.printJS] boolean Prints all JavaScript in the PDF file.
[options.printMetadata] boolean Prints document-level metadata. (This is the "Metadata" stream from the PDF file's Catalog object).
[options.printNamedDests] boolean Print a list of all named destinations. If a page range is specified using the 'firstPageToConvert' and 'lastPageToConvert' options, only destinations in the page range are listed.
[options.printRawDates] boolean Prints the raw (undecoded) date strings, directly from the PDF file.
[options.printVersionInfo] boolean Print copyright and version info.
[options.userPassword] string User password (for encrypted files).
file string Filepath of the PDF file to read.

poppler.pdfSeparate([options], file, outputPattern) ⇒ Promise.<(string|Error)>

Extract 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|Error)> - Promise of stdout string on resolve, or Error object on rejection.
Author: Frazer Smith

Param Type Description
[options] object Object containing options to pass to binary.
[options.firstPageToExtract] number Specifies the first page to extract. This defaults to page 1.
[options.lastPageToExtract] number Specifies the last page to extract. This defaults to the last page of the PDF file.
[options.printVersionInfo] boolean Print copyright and version info.
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.

poppler.pdfToCairo(options, file, [outputFile]) ⇒ Promise.<(string|Error)>

Converts PDF to PNG/JPEG/TIFF/PDF/PS/EPS/SVG.

Kind: instance method of Poppler
Returns: Promise.<(string|Error)> - Promise of stdout string on resolve, or Error object on rejection.
Author: Frazer Smith

Param Type Description
options object Object containing options to pass to binary.
[options.antialias] 'default' | 'none' | 'gray' | 'subpixel' | 'fast' | 'good' | 'best' Set the cairo antialias option used for text and drawing in image files (or rasterized regions in vector output).
[options.cropBox] boolean Uses the crop box rather than media box when generating the files (PNG/JPEG/TIFF only).
[options.cropHeight] number Specifies the height of crop area in pixels (image output) or points (vector output).
[options.cropSize] number Specifies the size of crop square in pixels (image output) or points (vector output).
[options.cropWidth] number Specifies the width of crop area in pixels (image output) or points (vector output).
[options.cropXAxis] number Specifies the x-coordinate of the crop area top left corner in pixels (image output) or points (vector output).
[options.cropYAxis] number Specifies the y-coordinate of the crop area top left corner in pixels (image output) or points (vector output).
[options.duplex] boolean Adds the %%IncludeFeature: *Duplex DuplexNoTumble DSC comment to the PostScript file (PS only). This tells the print manager to enable duplexing.
[options.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 'firstPageToConvert' and 'lastPageToConvert' to specify a single page. The page size options (originalPageSizes, paperSize, paperWidth, paperHeight) can not be used with this option.
[options.evenPagesOnly] boolean Generates only the even numbered pages.
[options.fillPage] boolean Expand PDF pages smaller than the paper to fill the paper (PS,PDF,SVG only). By default, these pages are not scaled.
[options.firstPageToConvert] number Specifies the first page to convert.
[options.grayscaleFile] boolean Generate grayscale file (PNG, JPEG, and TIFF only).
[options.iccFile] boolean Use the specified ICC file as the output profile (PNG only). The profile will be embedded in the PNG file.
[options.jpegFile] boolean Generate JPEG file(s).
[options.lastPageToConvert] number Specifies the last page to convert.
[options.monochromeFile] boolean Generate monochrome file (PNG and TIFF only).
[options.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).
[options.noCrop] boolean By default, printing output is cropped to the CropBox specified in the PDF file. This option disables cropping (PS, PDF, SVG only).
[options.noShrink] boolean Don't scale PDF pages which are larger than the paper (PS,PDF,SVG only). By default, pages larger than the paper are shrunk to fit.
[options.oddPagesOnly] boolean Generates only the odd numbered pages.
[options.originalPageSizes] boolean Set the paper size of each page to match the size specified in the PDF file.
[options.ownerPassword] string Specify the owner password for the PDF file. Providing this will bypass all security restrictions.
[options.paperHeight] number Set the paper height, in points (PS, PDF, SVG only).
[options.paperSize] 'letter' | 'legal' | 'A4' | 'A3' | 'match' Set the paper size to one of "letter", "legal", "A4", or "A3" (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.
[options.paperWidth] number Set the paper width, in points (PS,PDF,SVG only).
[options.pdfFile] boolean Generate PDF file.
[options.pngFile] boolean Generate PNG file(s).
[options.printVersionInfo] boolean Print copyright and version information.
[options.psFile] boolean Generate PS file.
[options.psLevel2] boolean Generate Level 2 PostScript (PS only).
[options.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.
[options.quiet] boolean Don't print any messages or errors.
[options.resolutionXAxis] number Specifies the X resolution, in pixels per inch of image files (or rasterized regions in vector output). The default is 150 PPI.
[options.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.
[options.resolutionYAxis] number Specifies the Y resolution, in pixels per inch of image files (or rasterized regions in vector output). The default is 150 PPI.
[options.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).
[options.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).
[options.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).
[options.singleFile] boolean Writes only the first page and does not add digits.
[options.svgFile] boolean Generate SVG (Scalable Vector Graphics) file.
[options.tiffCompression] 'none' | 'packbits' | 'jpeg' | 'lzw' | 'deflate' Set TIFF compression.
[options.tiffFile] boolean Generate TIFF file(s).
[options.transparentPageColor] boolean Use a transparent page color instead of white (PNG and TIFF only).
[options.userPassword] string Specify the user password for the PDF file.
file string Filepath of the PDF file to read.
[outputFile] string Filepath of the file to output the results to.

poppler.pdfToHtml([options], file) ⇒ Promise.<(string|Error)>

Converts PDF file to HTML. Poppler will use the directory and name of the original file and append '-html' to the end of the filename.

Kind: instance method of Poppler
Returns: Promise.<(string|Error)> - Promise of stdout string on resolve, or Error object on rejection.
Author: Frazer Smith

Param Type Description
[options] object Object containing options to pass to binary.
[options.complexOutput] boolean Generate complex output.
[options.exchangePdfLinks] boolean Exchange .pdf links with .html.
[options.extractHidden] boolean Force hidden text extraction.
[options.firstPageToConvert] number First page to print.
[options.fontFullName] boolean Outputs the font name without any substitutions.
[options.ignoreImages] boolean Ignore images.
[options.imageFormat] 'PNG' | 'JPG' Image file format for Splash output (PNG or JPG). If complexOutput is selected, but imageFormat is not specified, PNG will be assumed.
[options.lastPageToConvert] number Last page to print.
[options.noDrm] boolean Override document DRM settings.
[options.noFrames] boolean Generate no frames. Not supported in complex output mode.
[options.noMergeParagraph] boolean Do not merge paragraphs.
[options.noRoundedCoordinates] boolean Do not round coordinates (with XML output only).
[options.outputEncoding] string Sets the encoding to use for text output. This defaults to "UTF-8".
[options.ownerPassword] string Owner password (for encrypted files).
[options.printVersionInfo] boolean Print copyright and version info.
[options.quiet] boolean Do not print any messages or errors.
[options.singlePage] boolean generate single HTML that includes all pages.
[options.stdout] boolean Use standard output.
[options.userPassword] string User password (for encrypted files).
[options.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.
[options.xmlOutput] boolean Output for XML post-processing.
[options.zoom] number Zoom the PDF document (default 1.5).
file string Filepath of the PDF file to read.

poppler.pdfToPpm(options, file, outputPath) ⇒ Promise.<(string|Error)>

Converts PDF to 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|Error)> - Promise of stdout string on resolve, or Error object on rejection.
Author: Frazer Smith

Param Type Description
options object Object containing options to pass to binary.
[options.antialiasFonts] 'yes' | 'no' Enable or disable font anti-aliasing. This defaults to "yes".
[options.antialiasVectors] 'yes' | 'no' Enable or disable vector anti-aliasing. This defaults to "yes".
[options.cropBox] boolean Uses the crop box rather than media box when generating the files (PNG/JPEG/TIFF only).
[options.cropHeight] number Specifies the height of crop area in pixels (image output) or points (vector output).
[options.cropSize] number Specifies the size of crop square in pixels (image output) or points (vector output).
[options.cropWidth] number Specifies the width of crop area in pixels (image output) or points (vector output).
[options.cropXAxis] number Specifies the x-coordinate of the crop area top left corner in pixels (image output) or points (vector output).
[options.cropYAxis] number Specifies the y-coordinate of the crop area top left corner in pixels (image output) or points (vector output).
[options.evenPagesOnly] boolean Generates only the even numbered pages.
[options.firstPageToConvert] number Specifies the first page to convert.
[options.freetype] 'yes' | 'no' Enable or disable FreeType (a TrueType / Type 1 font rasterizer). This defaults to "yes".
[options.grayscaleFile] boolean Generate grayscale PGM file (instead of a color PPM file).
[options.jpegFile] boolean Generate JPEG file instead a PPM file.
[options.lastPageToConvert] number Specifies the last page to convert.
[options.monochromeFile] boolean Generate monochrome PBM file (instead of a color PPM file).
[options.oddPagesOnly] boolean Generates only the odd numbered pages.
[options.ownerPassword] string Specify the owner password for the PDF file. Providing this will bypass all security restrictions.
[options.pngFile] boolean Generate PNG file instead a PPM file.
[options.printVersionInfo] boolean Print copyright and version information.
[options.quiet] boolean Don't print any messages or errors.
[options.resolutionXAxis] number Specifies the X resolution, in pixels per inch of image files (or rasterized regions in vector output). The default is 150 PPI.
[options.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.
[options.resolutionYAxis] number Specifies the Y resolution, in pixels per inch of image files (or rasterized regions in vector output). The default is 150 PPI.
[options.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.
[options.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.
[options.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.
[options.singleFile] boolean Writes only the first page and does not add digits.
[options.thinLineMode] 'none' | 'solid' | 'shape' Specifies the thin line mode. This defaults to "none".
[options.tiffCompression] 'none' | 'packbits' | 'jpeg' | 'lzw' | 'deflate' Set TIFF compression.
[options.tiffFile] boolean Generate TIFF file instead a PPM file.
[options.userPassword] string Specify the user password for the PDF file.
file string Filepath of the PDF file to read.
outputPath string Filepath to output the results to.

poppler.pdfToPs([options], file, outputFile) ⇒ Promise.<(string|Error)>

Converts PDF to PostScript (PS).

Kind: instance method of Poppler
Returns: Promise.<(string|Error)> - Promise of stdout string on resolve, or Error object on rejection.
Author: Frazer Smith

Param Type Description
[options] object Object containing options to pass to binary.
[options.antialias] 'yes' | 'no' Enable anti-aliasing on rasterization, accepts "yes" or "no".
[options.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.
[options.duplex] boolean Set the Duplex pagedevice entry in the PostScript file. This tells duplex-capable printers to enable duplexing.
[options.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 'firstPageToConvert' and 'lastPageToConvert' to specify a single page. The page size options (originalPageSizes, paperSize, paperWidth, paperHeight) can not be used with this option.
[options.fillPage] boolean Expand PDF pages smaller than the paper to fill the paper. By default, these pages are not scaled.
[options.firstPageToConvert] number Specifies the first page to convert.
[options.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 'firstPageToConvert' and 'lastPageToConvert to specify a single page. The 'level1' option cannot be used with -form. No more than one of the mode options ('epsFile', 'form') may be given.
[options.lastPageToConvert] number Specifies the last page to convert.
[options.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.
[options.level1Sep] boolean Generate Level 1 separable PostScript. All colors are converted to CMYK. Images are written with separate stream data for the four components.
[options.level2] boolean Generate Level 2 PostScript. Level 2 supports color images and image compression. This is the default setting.
[options.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.
[options.level3] boolean Generate Level 3 PostScript. This enables all Level 2 featuresplus CID font embedding.
[options.level3Sep] boolean Generate Level 3 separable PostScript. The separation handling is the same as for 'level2Sep'.
[options.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.
[options.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.
[options.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.
[options.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.
[options.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.
[options.noCrop] boolean By default, printing output is cropped to the CropBox specified in the PDF file. This option disables cropping.
[options.noShrink] boolean Don't scale PDF pages which are larger than the paper. By default, pages larger than the paper are shrunk to fit.
[options.opi] boolean Generate OPI comments for all images and forms which have OPI information.
[options.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.
[options.originalPageSizes] boolean Set the paper size of each page to match the size specified in the PDF file.
[options.overprint] boolean Enable overprinting.
[options.ownerPassword] string Owner password (for encrypted files).
[options.paperHeight] number Set the paper height, in points.
[options.paperSize] 'letter' | 'legal' | 'A4' | 'A3' | 'match' Set the paper size to one of "letter", "legal", "A4", or "A3". 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.
[options.paperWidth] number Set the paper width, in points.
[options.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.
[options.preload] boolean Preload images and forms.
[options.printVersionInfo] boolean Print copyright and version information.
[options.quiet] boolean Don't print any messages or errors.
[options.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.
[options.userPassword] string User password (for encrypted files).
file string Filepath of the PDF file to read.
outputFile string Filepath of the file to output the results to.

poppler.pdfToText([options], file, [outputFile]) ⇒ Promise.<(string|Error)>

Converts PDF to TXT.

Kind: instance method of Poppler
Returns: Promise.<(string|Error)> - Promise of stdout string on resolve, or Error object on rejection.
Author: Frazer Smith

Param Type Description
[options] object Object containing options to pass to binary.
[options.boundingBoxXhtml] boolean Generate an XHTML file containing bounding box information for each word in the file.
[options.boundingBoxXhtmlLayout] boolean Generate an XHTML file containing bounding box information for each block, line, and word in the file.
[options.cropHeight] number Specifies the height of crop area in pixels (image output) or points (vector output).
[options.cropWidth] number Specifies the width of crop area in pixels (image output) or points (vector output).
[options.cropXAxis] number Specifies the x-coordinate of the crop area top left corner in pixels (image output) or points (vector output).
[options.cropYAxis] number Specifies the y-coordinate of the crop area top left corner in pixels (image output) or points (vector output).
[options.eolConvention] 'unix' | 'dos' | 'mac' Sets the end-of-line convention to use for text output: unix; dos; mac.
[options.firstPageToConvert] number Specifies the first page to convert.
[options.fixedWidthLayout] number Assume fixed-pitch (or tabular) text, with the specified character width (in points). This forces physical layout mode.
[options.generateHtmlMetaFile] boolean Generate simple HTML file, including the meta information. This simply wraps the text in
 and 
and prepends the meta headers.
[options.lastPageToConvert] number Specifies the last page to convert.
[options.listEncodingOptions] boolean List the available encodings.
[options.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.
[options.noDiagonalText] boolean Discard diagonal text.
[options.noPageBreaks] boolean Don't insert page breaks (form feed characters) between pages.
[options.outputEncoding] string Sets the encoding to use for text output. This defaults to "UTF-8".
[options.ownerPassword] string Owner password (for encrypted files).
[options.printVersionInfo] boolean Print copyright and version information.
[options.quiet] boolean Don't print any messages or errors.
[options.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.
[options.userPassword] string User password (for encrypted files).
file string Filepath of the PDF file to read.
[outputFile] string Filepath of the file to output the results to.

poppler.pdfUnite([options], files, [outputFile]) ⇒ Promise.<(string|Error)>

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|Error)> - Promise of stdout string on resolve, or Error object on rejection.
Author: Frazer Smith

Param Type Description
[options] object Object containing options to pass to binary.
[options.printVersionInfo] boolean Print copyright and version information.
files Array 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.

parseOptions(options, acceptedOptions) ⇒ Promise.<(string|Error)>

Check each option provided is valid and of the correct type.

Kind: global function
Returns: Promise.<(string|Error)> - Promise of stdout string on resolve, or Error object on rejection.
Author: Frazer Smith

Param Type Description
options object Object containing options to pass to binary.
acceptedOptions object Object containing options that a binary accepts.