Skip to content

Commit

Permalink
chore: prep release
Browse files Browse the repository at this point in the history
  • Loading branch information
Frazer Smith committed Apr 21, 2021
1 parent 118b0c0 commit 3f62b5a
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 36 deletions.
22 changes: 11 additions & 11 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ version of binary.</p>
* [.pdfAttach(file, fileToAttach, outputFile, [options])](#Poppler+pdfAttach) ⇒ <code>Promise.&lt;(string\|Error)&gt;</code>
* [.pdfDetach(file, [options])](#Poppler+pdfDetach) ⇒ <code>Promise.&lt;(string\|Error)&gt;</code>
* [.pdfFonts(file, [options])](#Poppler+pdfFonts) ⇒ <code>Promise.&lt;(string\|Error)&gt;</code>
* [.pdfImages(file, outputPrefix, [options])](#Poppler+pdfImages) ⇒ <code>Promise.&lt;(string\|Error)&gt;</code>
* [.pdfImages(file, [outputPrefix], [options])](#Poppler+pdfImages) ⇒ <code>Promise.&lt;(string\|Error)&gt;</code>
* [.pdfInfo(file, [options])](#Poppler+pdfInfo) ⇒ <code>Promise.&lt;(string\|Error)&gt;</code>
* [.pdfSeparate(file, outputPattern, [options])](#Poppler+pdfSeparate) ⇒ <code>Promise.&lt;(string\|Error)&gt;</code>
* [.pdfToCairo(file, [outputFile], [options])](#Poppler+pdfToCairo) ⇒ <code>Promise.&lt;(string\|Error)&gt;</code>
Expand Down Expand Up @@ -94,7 +94,7 @@ Lists the fonts used in a PDF file along with various information for each font.

| Param | Type | Description |
| --- | --- | --- |
| file | <code>string</code> | Filepath of the PDF file to read. |
| file | <code>Buffer</code> \| <code>string</code> | PDF file as Buffer, or filepath of the PDF file to read. |
| [options] | <code>object</code> | Object containing options to pass to binary. |
| [options.firstPageToExamine] | <code>number</code> | Specifies the first page to examine. |
| [options.lastPageToExamine] | <code>number</code> | Specifies the last page to examine. |
Expand All @@ -105,7 +105,7 @@ Lists the fonts used in a PDF file along with various information for each font.

<a name="Poppler+pdfImages"></a>

### poppler.pdfImages(file, outputPrefix, [options]) ⇒ <code>Promise.&lt;(string\|Error)&gt;</code>
### poppler.pdfImages(file, [outputPrefix], [options]) ⇒ <code>Promise.&lt;(string\|Error)&gt;</code>
Saves images from a PDF file as PPM, PBM, PNG, TIFF, JPEG, JPEG2000, or JBIG2 files.

**Kind**: instance method of [<code>Poppler</code>](#Poppler)
Expand All @@ -114,8 +114,8 @@ Saves images from a PDF file as PPM, PBM, PNG, TIFF, JPEG, JPEG2000, or JBIG2 fi

| Param | Type | Description |
| --- | --- | --- |
| file | <code>string</code> | Filepath of the PDF file to read. |
| outputPrefix | <code>string</code> | Filename prefix of output files. |
| file | <code>Buffer</code> \| <code>string</code> | PDF file as Buffer, or filepath of the PDF file to read. |
| [outputPrefix] | <code>string</code> | Filename prefix of output files. |
| [options] | <code>object</code> | Object containing options to pass to binary. |
| [options.allFiles] | <code>boolean</code> | 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] | <code>boolean</code> | Generate CCITT images as CCITT files. |
Expand All @@ -142,7 +142,7 @@ Prints the contents of the `Info` dictionary from a PDF file.

| Param | Type | Description |
| --- | --- | --- |
| file | <code>string</code> | Filepath of the PDF file to read. |
| file | <code>Buffer</code> \| <code>string</code> | PDF file as Buffer, or filepath of the PDF file to read. |
| [options] | <code>object</code> | Object containing options to pass to binary. |
| [options.firstPageToConvert] | <code>number</code> | First page to print. |
| [options.lastPageToConvert] | <code>number</code> | Last page to print. |
Expand Down Expand Up @@ -191,7 +191,7 @@ Converts a PDF file to PNG/JPEG/TIFF/PDF/PS/EPS/SVG.

| Param | Type | Description |
| --- | --- | --- |
| file | <code>string</code> | Filepath of the PDF file to read. |
| file | <code>Buffer</code> \| <code>string</code> | PDF file as Buffer, or filepath of the PDF file to read. |
| [outputFile] | <code>string</code> | 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 unless `options.singleFile` is set to `true`. If not set then the output filename will be derived from the PDF file name. |
| [options] | <code>object</code> | Object containing options to pass to binary. |
| [options.antialias] | <code>&#x27;default&#x27;</code> \| <code>&#x27;none&#x27;</code> \| <code>&#x27;gray&#x27;</code> \| <code>&#x27;subpixel&#x27;</code> \| <code>&#x27;fast&#x27;</code> \| <code>&#x27;good&#x27;</code> \| <code>&#x27;best&#x27;</code> | Set the cairo antialias option used for text and drawing in image files (or rasterized regions in vector output). |
Expand Down Expand Up @@ -254,7 +254,7 @@ and append `-html` to the end of the filename.

| Param | Type | Description |
| --- | --- | --- |
| file | <code>string</code> | Filepath of the PDF file to read. |
| file | <code>Buffer</code> \| <code>string</code> | PDF file as Buffer, or filepath of the PDF file to read. |
| [options] | <code>object</code> | Object containing options to pass to binary. |
| [options.complexOutput] | <code>boolean</code> | Generate complex output. |
| [options.dataUrls] | <code>boolean</code> | Use data URLs instead of external images in HTML. |
Expand Down Expand Up @@ -293,7 +293,7 @@ in Portable Bitmap (PBM) format.

| Param | Type | Description |
| --- | --- | --- |
| file | <code>string</code> | Filepath of the PDF file to read. |
| file | <code>Buffer</code> \| <code>string</code> | PDF file as Buffer, or filepath of the PDF file to read. |
| outputPath | <code>string</code> | Filepath to output the results to. |
| [options] | <code>object</code> | Object containing options to pass to binary. |
| [options.antialiasFonts] | <code>&#x27;yes&#x27;</code> \| <code>&#x27;no&#x27;</code> | Enable or disable font anti-aliasing. This defaults to `yes`. |
Expand Down Expand Up @@ -347,7 +347,7 @@ Converts a PDF file to PostScript (PS).

| Param | Type | Description |
| --- | --- | --- |
| file | <code>string</code> | Filepath of the PDF file to read. |
| file | <code>Buffer</code> \| <code>string</code> | PDF file as Buffer, or filepath of the PDF file to read. |
| [outputFile] | <code>string</code> | Filepath of the file to output the results to. If `undefined` then will write output to stdout. |
| [options] | <code>object</code> | Object containing options to pass to binary. |
| [options.antialias] | <code>&#x27;yes&#x27;</code> \| <code>&#x27;no&#x27;</code> | Enable anti-aliasing on rasterization, accepts `yes` or `no`. |
Expand Down Expand Up @@ -403,7 +403,7 @@ Converts a PDF file to TXT.

| Param | Type | Description |
| --- | --- | --- |
| file | <code>string</code> | Filepath of the PDF file to read. |
| file | <code>Buffer</code> \| <code>string</code> | PDF file as Buffer, or filepath of the PDF file to read. |
| [outputFile] | <code>string</code> | Filepath of the file to output the results to. If `undefined` then will write output to stdout. |
| [options] | <code>object</code> | Object containing options to pass to binary. |
| [options.boundingBoxXhtml] | <code>boolean</code> | Generate an XHTML file containing bounding box information for each word in the file. |
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,21 @@
"testTimeout": 10000
},
"devDependencies": {
"@commitlint/cli": "^12.0.1",
"@commitlint/config-conventional": "^12.0.1",
"eslint": "^7.22.0",
"@commitlint/cli": "^12.1.1",
"@commitlint/config-conventional": "^12.1.1",
"eslint": "^7.24.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^8.1.0",
"eslint-config-prettier": "^8.2.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.3.2",
"eslint-plugin-jest": "^24.3.5",
"eslint-plugin-jsdoc": "^32.3.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-security": "^1.4.0",
"glob": "^7.1.6",
"husky": "^6.0.0",
"jest": "^26.6.3",
"jsdoc-to-markdown": "^7.0.0",
"jsdoc-to-markdown": "^7.0.1",
"prettier": "2.2.1",
"typescript": "^4.2.3"
"typescript": "^4.2.4"
}
}
36 changes: 18 additions & 18 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class Poppler {
* @author Frazer Smith
* @description Lists the fonts used in a PDF file along with various information for each font.
*
* @param {string} file - Filepath of the PDF file to read.
* @param {Buffer| string} file - PDF file as Buffer, or filepath of the PDF file to read.
* @param {object=} options - Object containing options to pass to binary.
* @param {number=} options.firstPageToExamine - Specifies the first page to examine.
* @param {number=} options.lastPageToExamine - Specifies the last page to examine.
Expand All @@ -69,15 +69,15 @@ export class Poppler {
* @returns {Promise<string|Error>} Promise of stdout string on resolve, or Error object on rejection.
*/
pdfFonts(
file: string,
file: Buffer | string,
options?: object | undefined
): Promise<string | Error>;
/**
* @author Frazer Smith
* @description Saves images from a PDF file as PPM, PBM, PNG, TIFF, JPEG, JPEG2000, or JBIG2 files.
*
* @param {string} file - Filepath of the PDF file to read.
* @param {string} outputPrefix - Filename prefix of output files.
* @param {Buffer| string} file - PDF file as Buffer, or filepath of the PDF file to read.
* @param {string=} outputPrefix - Filename prefix of output files.
* @param {object=} options - Object containing options to pass to binary.
* @param {boolean=} options.allFiles - 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.
Expand All @@ -98,15 +98,15 @@ export class Poppler {
* @returns {Promise<string|Error>} Promise of stdout string on resolve, or Error object on rejection.
*/
pdfImages(
file: string,
outputPrefix: string,
file: Buffer | string,
outputPrefix?: string | undefined,
options?: object | undefined
): Promise<string | Error>;
/**
* @author Frazer Smith
* @description Prints the contents of the `Info` dictionary from a PDF file.
*
* @param {string} file - Filepath of the PDF file to read.
* @param {Buffer| string} file - PDF file as Buffer, or filepath of the PDF file to read.
* @param {object=} options - Object containing options to pass to binary.
* @param {number=} options.firstPageToConvert - First page to print.
* @param {number=} options.lastPageToConvert - Last page to print.
Expand Down Expand Up @@ -135,7 +135,7 @@ export class Poppler {
* @returns {Promise<string|Error>} Promise of stdout string on resolve, or Error object on rejection.
*/
pdfInfo(
file: string,
file: Buffer | string,
options?: object | undefined
): Promise<string | Error>;
/**
Expand Down Expand Up @@ -165,7 +165,7 @@ export class Poppler {
* @author Frazer Smith
* @description Converts a PDF file to PNG/JPEG/TIFF/PDF/PS/EPS/SVG.
*
* @param {string} file - Filepath of the PDF file to read.
* @param {Buffer| string} file - PDF file as Buffer, or filepath of the PDF file to read.
* @param {string=} outputFile - 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
Expand Down Expand Up @@ -266,7 +266,7 @@ export class Poppler {
* @returns {Promise<string|Error>} Promise of stdout string on resolve, or Error object on rejection.
*/
pdfToCairo(
file: string,
file: Buffer | string,
outputFile?: string | undefined,
options?: object | undefined
): Promise<string | Error>;
Expand All @@ -276,7 +276,7 @@ export class Poppler {
* Poppler will use the directory and name of the original file
* and append `-html` to the end of the filename.
*
* @param {string} file - Filepath of the PDF file to read.
* @param {Buffer| string} file - PDF file as Buffer, or filepath of the PDF file to read.
* @param {object=} options - Object containing options to pass to binary.
* @param {boolean=} options.complexOutput - Generate complex output.
* @param {boolean=} options.dataUrls - Use data URLs instead of external images in HTML.
Expand Down Expand Up @@ -309,7 +309,7 @@ export class Poppler {
* @returns {Promise<string|Error>} Promise of stdout string on resolve, or Error object on rejection.
*/
pdfToHtml(
file: string,
file: Buffer | string,
options?: object | undefined
): Promise<string | Error>;
/**
Expand All @@ -318,7 +318,7 @@ export class Poppler {
* grayscale image files in Portable Graymap (PGM) format, or monochrome image files
* in Portable Bitmap (PBM) format.
*
* @param {string} file - Filepath of the PDF file to read.
* @param {Buffer| string} file - PDF file as Buffer, or filepath of the PDF file to read.
* @param {string} outputPath - Filepath to output the results to.
* @param {object=} options - Object containing options to pass to binary.
* @param {('yes'|'no')=} options.antialiasFonts - Enable or disable font anti-aliasing.
Expand Down Expand Up @@ -388,15 +388,15 @@ export class Poppler {
* @returns {Promise<string|Error>} Promise of stdout string on resolve, or Error object on rejection.
*/
pdfToPpm(
file: string,
file: Buffer | string,
outputPath: string,
options?: object | undefined
): Promise<string | Error>;
/**
* @author Frazer Smith
* @description Converts a PDF file to PostScript (PS).
*
* @param {string} file - Filepath of the PDF file to read.
* @param {Buffer| string} file - PDF file as Buffer, or filepath of the PDF file to read.
* @param {string=} outputFile - Filepath of the file to output the results to.
* If `undefined` then will write output to stdout.
* @param {object=} options - Object containing options to pass to binary.
Expand Down Expand Up @@ -503,15 +503,15 @@ export class Poppler {
* @returns {Promise<string|Error>} Promise of stdout string on resolve, or Error object on rejection.
*/
pdfToPs(
file: string,
file: Buffer | string,
outputFile?: string | undefined,
options?: object | undefined
): Promise<string | Error>;
/**
* @author Frazer Smith
* @description Converts a PDF file to TXT.
*
* @param {string} file - Filepath of the PDF file to read.
* @param {Buffer| string} file - PDF file as Buffer, or filepath of the PDF file to read.
* @param {string=} outputFile - Filepath of the file to output the results to.
* If `undefined` then will write output to stdout.
* @param {object=} options - Object containing options to pass to binary.
Expand Down Expand Up @@ -555,7 +555,7 @@ export class Poppler {
* @returns {Promise<string|Error>} Promise of stdout string on resolve, or Error object on rejection.
*/
pdfToText(
file: string,
file: Buffer | string,
outputFile?: string | undefined,
options?: object | undefined
): Promise<string | Error>;
Expand Down

0 comments on commit 3f62b5a

Please sign in to comment.