Abstract
Protected
constructorOptional
filepathProtected
initializedProtected
checkCompresses the file object, either as a PDF or an image.
Quality of the compression. For images, this is the JPEG quality. For PDFs, this affects image quality within the PDF.
Maximum width for image resizing. Ignored for PDFs.
Maximum height for image resizing. Ignored for PDFs.
For PDFs, whether to force compression even if source text is present.
For PDFs, whether to disable source text during compression.
A Promise that resolves when the compression is complete.
Cut PDF pages.
Deprecated in favor of LocalInputSource.applyPageOptions.
Protected
getProtected
Returns the file object as a Buffer.
Buffer representation of the file object
Returns the number of pages in the input source. For PDFs, returns the actual page count. For images, returns 1.
Promise
Returns true if the object is a PDF and has source text. False otherwise.
boolean
Determines whether the current file is a PDF.
Returns true if the file is a PDF; otherwise, returns false.
Constructor parameters.