Files
token-circles/backend/services/pdfService.js
T
Komediruzecki b779728fe7 fix(backend): fix runtime startup error and lint issues
- Fix uploadImport/importUpload variable name mismatch in index.js and importRoutes.js
- Add missing toCamelCase imports in categories.js and portfolio.js
- Apply prettier formatting across all backend files
2026-05-28 22:18:23 +00:00

16 lines
337 B
JavaScript

/**
* PDF Service — wraps pdfkit for PDF generation.
* Lazy-loaded so pdfkit is only required when actually generating a PDF.
*/
function createDocument(options = {}) {
const PDFDocument = require('pdfkit');
return new PDFDocument({
size: 'A4',
margin: 50,
...options,
});
}
module.exports = { createDocument };