fix: Replace Prawn with Grover for PDF ticket generation

- Replace Prawn PDF generation with Grover (Chrome headless) for better compatibility
- Add HTML-based ticket template with embedded CSS styling
- Implement robust Grover loading with fallback to HTML download
- Add QR code generation methods to Ticket model
- Remove legacy TicketPdfGenerator service and tests
- Update PDF generation in TicketsController with proper error handling

The new implementation provides:
- Better HTML/CSS rendering for ticket layouts
- More reliable PDF generation using Chrome engine
- Fallback mechanism for better user experience
- Cleaner separation of template rendering and PDF conversion

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
kbe
2025-09-06 00:04:02 +02:00
parent 974edce238
commit 7ef934d8a8
10 changed files with 372 additions and 425 deletions

View File

@@ -87,8 +87,7 @@ gem "kaminari-tailwind", "~> 0.1.0"
gem "stripe", "~> 15.5"
# PDF generation for tickets
gem "prawn", "~> 2.5"
gem "prawn-qrcode", "~> 0.5"
gem 'grover'
# QR code generation
gem "rqrcode", "~> 3.1"