New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@types/pdf2image

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/pdf2image

TypeScript definitions for pdf2image

ts4.5
ts4.6
ts4.7
ts4.8
ts4.9
ts5.0
ts5.1
ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
ts6.0
latest
Source
npmnpm
Version
1.2.4
Version published
Weekly downloads
547
-4.87%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/pdf2image

Summary

This package contains type definitions for pdf2image (https://bitbucket.org/RicardoCacheira/pdf2image#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pdf2image.

index.d.ts

// 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;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: @types/node

Credits

These definitions were written by taoqf.

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

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.

Install

Related posts