
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@types/pdf2image
Advanced tools
TypeScript definitions for pdf2image
npm install --save @types/pdf2image
This package contains type definitions for pdf2image (https://bitbucket.org/RicardoCacheira/pdf2image#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pdf2image.
// TypeScript Version: 2.9
/**
* A token starts with the character '%'
*
* d - the page number, if the first page of the PDF is page 1
* D - the page number, if the first page of the PDF is page 0
* i - the processed page number, if the first processed page is page 1
* I - the processed page number, if the first processed page is page 0
* t - the total number of pages in the pdf
* T - the total of processed pages
* s - the name of the pdf file
* p - the path of the pdf file
* % - the character '%'
* {...} - a custom piece of code where all of the above values can be used
*/
/// <reference types="node" />
export type OutputFormat =
| ((
pageNum: number,
pageIndex: number,
totalPagesProcessed: number,
totalPDFPages: number,
name: string,
path: string,
vm: typeof import("vm"),
) => string)
| string;
export interface Options {
density: number;
height: number;
width: number;
outputType: "jpg" | "png" | ".jpg" | ".png";
quality: number;
pages: "*" | string; // * | even | odd | '/1,/3,5-6,-8, 9-'
singleProcess: boolean;
backgroundColor: string; // #ffffff
outputFormat: OutputFormat;
}
export interface ConvertedFile {
page: number;
index: number;
name: string;
path: string;
}
export function convertPDF(pdfFilePath: string, options?: Partial<Options>): Promise<ConvertedFile[]>;
export interface Converter {
convertPDF(pdfFilePath: string): Promise<ConvertedFile[]>;
convertPDFList(pdfList: string[]): Promise<ConvertedFile[]>;
}
export function compileConverter(options?: Partial<Options>): Converter;
These definitions were written by taoqf.
FAQs
TypeScript definitions for pdf2image
We found that @types/pdf2image demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.