-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathindex.js
More file actions
30 lines (27 loc) · 1.03 KB
/
index.js
File metadata and controls
30 lines (27 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// index.js - Main entry point
const PDFProcessor = require('./lib/PDFProcessor');
const { PDFProcessingError } = require('./lib/errors');
const CommandExecutor = require('./lib/CommandExecutor');
const ImageProcessor = require('./lib/ImageProcessor');
const FileManager = require('./lib/FileManager');
const HTMLParser = require('./lib/HTMLParser');
// Export main functions with backward compatibility
module.exports = {
// Main API - bind methods to maintain the correct 'this' context
html: PDFProcessor.toHTML.bind(PDFProcessor),
pages: PDFProcessor.toPages.bind(PDFProcessor),
text: PDFProcessor.toText.bind(PDFProcessor),
meta: PDFProcessor.extractMetadata.bind(PDFProcessor),
thumbnail: PDFProcessor.generateThumbnail.bind(PDFProcessor),
extractImages: PDFProcessor.extractImages.bind(PDFProcessor),
// Export classes for advanced usage
PDFProcessor,
PDFProcessingError,
// Utility exports
utils: {
CommandExecutor,
ImageProcessor,
FileManager,
HTMLParser,
},
};