mirror of
https://github.com/Komediruzecki/token-circles.git
synced 2026-10-20 09:46:43 +02:00
- 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
16 lines
337 B
JavaScript
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 };
|