Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@types/pdf2html

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/pdf2html

TypeScript definitions for pdf2html

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
3.1.0
Version published
Maintainers
1
Created
Source

Installation

npm install --save @types/pdf2html

Summary

This package contains type definitions for pdf2html (https://github.com/shebinleo/pdf2html#readme).

Details

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

index.d.ts

// Project: https://github.com/shebinleo/pdf2html
// Definitions by: manuzcheruz <https://github.com/manuzcheruz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node" />

import { Stream } from "stream";

/**
 * Configuration options for PDF to HTML conversion
 */
interface PDF2HTMLOptions {
    binary?: string; // Path to the pdftohtml binary
    first_page?: number; // First page to convert
    last_page?: number; // Last page to convert
    complex?: boolean; // Generate complex output
    single_page?: boolean; // Generate a single HTML file
    no_background?: boolean; // No background images
    no_frames?: boolean; // No frames in HTML
    zoom?: number; // Zoom factor
}

/**
 * Error type for PDF2HTML conversion errors
 */
interface PDF2HTMLError extends Error {
    code?: string;
    path?: string;
    syscall?: string;
}

/**
 * Callback function type for async operations
 */
type PDF2HTMLCallback = (error: PDF2HTMLError | null, html?: string) => void;

/**
 * Convert PDF file to HTML synchronously
 * @param source - Path to PDF file or readable stream
 * @param options - Conversion options
 * @returns HTML string
 */
declare function pdf2htmlSync(source: string | Stream, options?: PDF2HTMLOptions): string;

/**
 * Convert PDF file to HTML asynchronously
 * @param source - Path to PDF file or readable stream
 * @param options - Conversion options
 * @param callback - Callback function
 */
declare function pdf2html(source: string | Stream, options: PDF2HTMLOptions, callback: PDF2HTMLCallback): void;

/**
 * Convert PDF file to HTML asynchronously (overload without options)
 * @param source - Path to PDF file or readable stream
 * @param callback - Callback function
 */
declare function pdf2html(source: string | Stream, callback: PDF2HTMLCallback): void;

declare namespace pdf2html {
    export { pdf2htmlSync };
}

export = pdf2html;

Additional Details

  • Last updated: Mon, 03 Mar 2025 07:02:16 GMT
  • Dependencies: @types/node

Credits

These definitions were written by manuz cheruz.

FAQs

Package last updated on 03 Mar 2025

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