# @types/pdf-fill-form

> TypeScript definitions for pdf-fill-form

Latest version **5.0.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/pdf-fill-form
pnpm add @types/pdf-fill-form
yarn add @types/pdf-fill-form
bun add @types/pdf-fill-form
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 5.0.4 |
| Published | 2023-11-07 |
| First published | 2020-04-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51384 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/pdf-fill-form
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pdf-fill-form
- npm.io page: https://npm.io/package/@types/pdf-fill-form

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 5.0.4 (latest) — 2023-11-07
- 5.0.2 (ts3.7) — 2021-09-05
- 5.0.1 (ts3.6) — 2021-07-08
- 5.0.0 (ts2.8) — 2020-04-03
- 5.0.3 — 2023-10-18

## README

# Installation
> `npm install --save @types/pdf-fill-form`

# Summary
This package contains type definitions for pdf-fill-form (https://github.com/tpisto/pdf-fill-form#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pdf-fill-form.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pdf-fill-form/index.d.ts)
````ts
/// <reference types="node" />

export interface WritableFields {
    [key: string]: string | boolean | number;
}

export type ReadableFields = Array<{
    name: string;
    page: number;
    value: string;
    id: number;
    type: string;
}>;

export interface PdfOptions {
    save?: string | undefined;
    cores?: number | undefined;
    scale?: number | undefined;
    antialias?: boolean | undefined;
}

export interface ImgPdfOptions extends PdfOptions {
    startPage?: number | undefined;
    endPage?: number | undefined;
}

export type Options = PdfOptions | ImgPdfOptions;

export type WriteAsyncCallback = (err: Error, result: Buffer) => void;

export function read(sourceFile: string): Promise<ReadableFields>;
export function readSync(sourceFile: string): ReadableFields;
export function readBuffer(sourceBuffer: Buffer): Promise<ReadableFields>;
export function readBufferSync(sourceBuffer: Buffer): ReadableFields;

export function write(sourceFile: string, fields: WritableFields, options?: Options): Promise<Buffer>;
export function writeSync(sourceFile: string, fields: WritableFields, options?: Options): Buffer;
export function writeBuffer(sourceBuffer: Buffer, fields: WritableFields, options?: Options): Promise<Buffer>;
export function writeBufferSync(sourceBuffer: Buffer, fields: WritableFields, options?: Options): Buffer;

// Options are not optional here because the callback MUST be defined to avoid a crash
export function writeAsync(
    sourceFile: string,
    fields: WritableFields,
    options: Options,
    callback: WriteAsyncCallback,
): void;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Grégoire Lodi](https://github.com/lodi-g).

---
_Source: https://npm.io/package/@types/pdf-fill-form · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
