Reportes Genera Pdfs Desde Node Full -mega- !!hot!! — Nestjs
curl -X POST http://localhost:3000/reports/invoice \ -H "Content-Type: application/json" \ -d ' "invoiceNumber": "INV-123", "date": "2025-03-15", "customer": "name": "Acme Corp", "address": "123 Business Rd" , "items": [ "name": "Laptop", "qty": 1, "price": 1200 , "name": "Mouse", "qty": 2, "price": 25 ], "total": 1250 ' \ --output invoice.pdf
@Injectable() export class PdfErrorInterceptor implements NestInterceptor intercept(context: ExecutionContext, next: CallHandler): Observable<any> return next.handle().pipe( catchError((error) => if (error.message.includes('puppeteer')) throw new InternalServerErrorException('Error generando PDF'); NestJs Reportes Genera PDFs desde Node Full -Mega-
@Module( providers: [PdfService], controllers: [PdfController], exports: [PdfService], ) export class PdfModule {} "customer": "name": "Acme Corp"

