readpdfs
v0.1.0
Published
A TypeScript/Node.js client for the ReadPDFs API
Downloads
11
Readme
ReadPDFs
A TypeScript/Node.js client for the ReadPDFs API that allows you to process PDF files and convert them to markdown.
Installation
npm install readpdfs
# or
yarn add readpdfs
Usage
import { ReadPDFs } from 'readpdfs';
// Initialize the client
const client = new ReadPDFs({ apiKey: 'your_api_key' });
// Process a PDF from a URL
const result = await client.processPdf({
pdfUrl: 'https://example.com/document.pdf',
});
// Process a local PDF file
const result = await client.processPdf({
filePath: 'path/to/local/document.pdf',
});
// Fetch markdown content
const markdown = await client.fetchMarkdown('https://api.readpdfs.com/documents/123/markdown');
// Get user documents
const documents = await client.getUserDocuments('user_123');
Features
- Process PDFs from URLs or local files
- Convert PDFs to markdown
- Fetch markdown content
- Retrieve user documents
- Configurable processing quality
- Full TypeScript support
- Comprehensive test coverage
Requirements
- Node.js 14+
- TypeScript 4.5+ (for development)
License
This project is licensed under the MIT License - see the LICENSE file for details.