# topdf

> A node.js addon for Oracle's pdf export library.

Latest version **0.0.7** (published 2013-01-17) · BSD license · 0 weekly downloads

## Install

```sh
npm install topdf
pnpm add topdf
yarn add topdf
bun add topdf
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2013-01-17 |
| First published | 2012-11-16 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 3 |
| Author | Ryan Cole |
| Maintainers | ryancole |
| Keywords | oracle, pdf, converter |

## Links

- npm: https://www.npmjs.com/package/topdf
- Repository: git@github.com:ryancole/topdf
- npm.io page: https://npm.io/package/topdf

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 0.0.7 (latest) — 2013-01-17
- 0.0.6 — 2012-12-18
- 0.0.5 — 2012-12-04
- 0.0.4 — 2012-11-27
- 0.0.3 — 2012-11-18
- 0.0.2 — 2012-11-16
- 0.0.1 — 2012-11-16

## README

A node.js addon for Oracle's pdf export library.

## Example

```javascript
var topdf = require('topdf');

topdf.convert('./test/etc/foo.xlsx', './test/etc/foo.pdf', options, function (err, success) {
    
    /* ... */
    
});
```

## API

### convert(source, destination, [options,] callback)

Takes a `source` document and saves it to `destination` as a PDF. The `options` parameter is optional.

- `watermark`: A path to an image file to be used as the watermark image. This defaults to no watermark, if this propery is omitted.
- `fontdirectory`: A path to a directory containing true type fonts to be used. This option is *required*, if the default does not fit your setup. This defaults to `/usr/share/fonts/truetype/msttcorefonts`.
- `override`: A `boolean` specifying whether or not you wish to override the settings specified in the document. This defaults to `false`, which means any settings stored in the document to be converted will be used. This must be `true` in order to use any other formatting options.
- `gridlines`: A `boolean` specifying whether or not to print gridlines in spreadsheet documents. This `defaults` to `false`. 
- `headings`: A `boolean` specifying whether or not to print headings in spreadsheet documents. This `defaults` to `false`.
- `memory`: An `integer` specifying the maximum about of memory, in MB, that the PDF converter may use for caching the `source` file. More memory means less disk reads. Must be a value in the following collection: `4`, `16`, `64`, `256`, `1024`. This defaults to `16`.
- `pages`: An `integer` specifying the maximum number of pages to write to the `destination` file. Specifying `0` will save all pages. This `defaults` to `0`.

## Runtime Prerequisites

Make sure `/usr/local/lib/pdfexport` is in `$LD_LIBRARY_PATH`.

## Compiling Prerequisites

Download the Oracle pdf export SDK, place the header files in `/usr/local/include/pdfexport` and the *entire* contents of the sdk's `redist` directory into `/usr/local/lib/pdfexport`. Make sure `/usr/local/lib/pdfexport` is in `$LD_LIBRARY_PATH`.

## Oracle

You can download Oracle's tools at the following URL: http://www.oracle.com/technetwork/middleware/content-management/downloads/oit-dl-otn-097435.html

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