Modules@robinpath/pdf

@robinpath/pdf

0.1.1Public

PDF generation from HTML/text and text extraction from PDFs

@robinpath/pdf

PDF generation (documents, tables, HTML-to-PDF) and parsing (text extraction, metadata, page count)

Category Functions Auth License

Why use this module?

The pdf module lets you:

  • Generate a PDF document with title, content, and sections
  • Parse a PDF file and extract text, metadata, and page count
  • Extract all text from a PDF file
  • Get the number of pages in a PDF
  • Get PDF metadata (author, title, creation date, etc.)

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/pdf

Quick Start

No credentials needed — start using it right away:

pdf.parse "./document.pdf"

Available Functions

FunctionDescription
pdf.generateGenerate a PDF document with title, content, and sections
pdf.parseParse a PDF file and extract text, metadata, and page count
pdf.extractTextExtract all text from a PDF file
pdf.pageCountGet the number of pages in a PDF
pdf.metadataGet PDF metadata (author, title, creation date, etc.)
pdf.generateTableGenerate a PDF with a formatted table
pdf.generateFromHtmlGenerate a PDF from basic HTML content

Examples

Parse a PDF file and extract text, metadata, and page count

pdf.parse "./document.pdf"

Extract all text from a PDF file

pdf.extractText "./document.pdf"

Get the number of pages in a PDF

pdf.pageCount "./document.pdf"

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/pdf";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  pdf.parse "./document.pdf"
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT

Versions (1)

VersionTagPublished
0.1.1latestyesterday
Install
$ robinpath install @robinpath/pdf
Version0.1.1
LicenseMIT
Unpacked Size4.9 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

Category

productivity