# node-ts-pdf

> none

Latest version **1.0.5** (published 2023-06-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install node-ts-pdf
pnpm add node-ts-pdf
yarn add node-ts-pdf
bun add node-ts-pdf
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2023-06-13 |
| First published | 2023-06-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 60 |
| Unpacked size | 24.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Nishant Panwar |
| Maintainers | nishantpanwar |
| Keywords | - |

## Links

- npm: https://www.npmjs.com/package/node-ts-pdf
- Repository: -
- npm.io page: https://npm.io/package/node-ts-pdf

## Dependencies (60)

- [ms](https://npm.io/package/ms.md) ^2.1.2
- [has](https://npm.io/package/has.md) ^1.0.3
- [diff](https://npm.io/package/diff.md) ^4.0.2
- [glob](https://npm.io/package/glob.md) ^7.2.3
- [once](https://npm.io/package/once.md) ^1.4.0
- [y18n](https://npm.io/package/y18n.md) ^5.0.8
- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [cliui](https://npm.io/package/cliui.md) ^8.0.1
- [debug](https://npm.io/package/debug.md) ^4.3.4
- [tslib](https://npm.io/package/tslib.md) ^1.14.1
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.6
- [semver](https://npm.io/package/semver.md) ^5.7.1
- [wrappy](https://npm.io/package/wrappy.md) ^1.0.2
- [esprima](https://npm.io/package/esprima.md) ^4.0.1
- [js-yaml](https://npm.io/package/js-yaml.md) ^3.14.1
- [resolve](https://npm.io/package/resolve.md) ^1.22.2
- [tsutils](https://npm.io/package/tsutils.md) ^2.29.0
- [argparse](https://npm.io/package/argparse.md) ^1.0.10
- [error-ex](https://npm.io/package/error-ex.md) ^1.3.2
- [escalade](https://npm.io/package/escalade.md) ^3.1.1
- [has-flag](https://npm.io/package/has-flag.md) ^3.0.0
- [inflight](https://npm.io/package/inflight.md) ^1.0.6
- [inherits](https://npm.io/package/inherits.md) ^2.0.4
- [minimist](https://npm.io/package/minimist.md) ^1.2.8
- [callsites](https://npm.io/package/callsites.md) ^3.1.0
- [commander](https://npm.io/package/commander.md) ^2.20.3
- [js-tokens](https://npm.io/package/js-tokens.md) ^4.0.0
- [minimatch](https://npm.io/package/minimatch.md) ^3.1.2
- [puppeteer](https://npm.io/package/puppeteer.md) ^20.5.0
- [wrap-ansi](https://npm.io/package/wrap-ansi.md) ^7.0.0
- [ansi-regex](https://npm.io/package/ansi-regex.md) ^5.0.1
- [color-name](https://npm.io/package/color-name.md) ^1.1.3
- [concat-map](https://npm.io/package/concat-map.md) ^0.0.1
- [parse-json](https://npm.io/package/parse-json.md) ^5.2.0
- [path-parse](https://npm.io/package/path-parse.md) ^1.0.7
- [source-map](https://npm.io/package/source-map.md) ^0.6.1
- [sprintf-js](https://npm.io/package/sprintf-js.md) ^1.0.3
- [strip-ansi](https://npm.io/package/strip-ansi.md) ^6.0.1
- [ansi-styles](https://npm.io/package/ansi-styles.md) ^3.2.1
- [emoji-regex](https://npm.io/package/emoji-regex.md) ^8.0.0
- [fs.realpath](https://npm.io/package/fs.realpath.md) ^1.0.0
- [graceful-fs](https://npm.io/package/graceful-fs.md) ^4.2.11
- [is-arrayish](https://npm.io/package/is-arrayish.md) ^0.2.1
- [string-width](https://npm.io/package/string-width.md) ^4.2.3
- [yargs-parser](https://npm.io/package/yargs-parser.md) ^21.1.1
- [color-convert](https://npm.io/package/color-convert.md) ^1.9.3
- [function-bind](https://npm.io/package/function-bind.md) ^1.1.1
- [balanced-match](https://npm.io/package/balanced-match.md) ^1.0.2
- [is-core-module](https://npm.io/package/is-core-module.md) ^2.12.1
- [supports-color](https://npm.io/package/supports-color.md) ^5.5.0
- [brace-expansion](https://npm.io/package/brace-expansion.md) ^1.1.11
- [builtin-modules](https://npm.io/package/builtin-modules.md) ^1.1.1
- [get-caller-file](https://npm.io/package/get-caller-file.md) ^2.0.5
- [path-is-absolute](https://npm.io/package/path-is-absolute.md) ^1.0.1
- [lines-and-columns](https://npm.io/package/lines-and-columns.md) ^1.2.4
- [require-directory](https://npm.io/package/require-directory.md) ^2.1.1
- [escape-string-regexp](https://npm.io/package/escape-string-regexp.md) ^1.0.5
- [is-fullwidth-code-point](https://npm.io/package/is-fullwidth-code-point.md) ^3.0.0
- [json-parse-even-better-errors](https://npm.io/package/json-parse-even-better-errors.md) ^2.3.1
- [supports-preserve-symlinks-flag](https://npm.io/package/supports-preserve-symlinks-flag.md) ^1.0.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2023-06-13
- 1.0.4 — 2023-06-13
- 1.0.3 — 2023-06-13
- 1.0.2 — 2023-06-13
- 1.0.1 — 2023-06-09
- 1.0.0 — 2023-06-09

## README

# node-ts-pdf


A simple html template to base64 converter package, beautifully designed & well maintained.

Will use in node.js OR node with typescript backend.




## Installation

Install **node-ts-pdf** with npm

```bash
  npm install node-ts-pdf
```
    
## Usage/Examples

```javascript
import { html_to_base64 } from 'node-ts-pdf/lib/add';


async function App() {
  const base64_result = await html_to_base64(`YOUR_HTML_TEMPLATE`, false);
  console.log('get base64 result :=', base64_result);
  return base64_result;
}
```

#### Implementation using optional parameters

```javascript
async function App() {
  const base64_result = await html_to_base64(`YOUR_HTML_TEMPLATE`, false, 595, 842, 2);
  console.log('get base64 result :=', base64_result);
  return base64_result;
}
```

## Parameters

| Parameter | Type     | Description                |
| :-------- | :------- | :------------------------- |
| `printBackground` | `boolean` | **Required**. Pass this parameter true/false for printing the background |
| `vw_width` | `number` | **Optional**. Adjust the A4 paper width in pixels. **Default:** 595 |
| `vw_height` | `number` | **Optional**. Adjust the A4 paper height in pixels **Default:** 842|
| `deviceScaleFactor` | `number` | **Optional**. Adjust the scale factor if needed. **Default:** 2 |


## Authors

- [@nishantpanwar77](http://github.com/nishantpanwar77)

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