Commit Graph

2 Commits

Author SHA1 Message Date
OlgunR
1144c45826 Improve error handling in PDF processing workflow
Refactored the PDF processing workflow to enhance error handling
and provide more descriptive exception messages. Added `try-catch`
blocks around the PDF/A-3b conversion and document saving steps
to handle potential failures.

Labeled the workflow steps for clarity:
- Step 1: Convert to PDF/A-3b
- Step 2: Buffer converted PDF
- Step 3: Embed attachment
- Step 4: Save document

Removed redundant `MemoryStream` initialization for the original
PDF and updated comments to improve code readability and
maintainability.
2026-05-29 09:20:34 +02:00
OlgunR
87f27682ce Add support for generating result PDFs
Introduced the `ResultFilePath` property in the `ZugferdInvoice` model to store the path of generated result PDFs. Added a new service, `PdfResultPackageService`, to create result PDFs by converting the original PDF to PDF/A-3b format and attaching a report file. Updated `Upload.cshtml` and `Upload.cshtml.cs` to handle and display the `ResultFilePath`.

Created a migration to add the `ResultFilePath` column to the database. Updated `Program.cs` to register the new service and added configuration sections in `appsettings.json` for input and output directories. Enhanced error handling and logging for better traceability.
2026-05-27 13:43:14 +02:00