This commit implements a complete rebranding of the project:
- Updated all namespaces from `DocumentOperator` to `DocumentService`.
- Renamed file paths, embedded resources, and test data references.
- Updated configuration keys, logging paths, and Redis instance names.
- Revised documentation to reflect the new project name.
- Modified project and solution files to align with the new structure.
- Updated class names, DTOs, commands, queries, and handlers.
- Adjusted middleware, controllers, and API endpoints.
- Updated Swagger metadata and API titles to `DocumentService API`.
- Refactored test namespaces, resource paths, and embedded resources.
- Updated build and deployment configurations for the new name.
- Replaced all references to `DocumentOperator` in comments and literals.
These changes ensure consistency across the codebase and documentation.
Introduced endpoints for embedding attachments in PDFs and converting
between standard PDFs and PDF/A formats. Added `PdfAttachmentController`
and `PdfConversionController` with multipart/form-data and Base64-based
support. Implemented commands, handlers, and validators for these
operations.
Extended `IPdfProcessor` with methods for adding attachments and
PDF/A conversion. Partially implemented functionality in
`DevExpressPdfProcessor`, including `ConvertFromPdfAAsync`.
Added `attachment.xml` and `withoutAttachment.pdf` as resources for
testing. Marked endpoints as `[Obsolete]` to indicate incomplete
implementation. Improved validation and error handling for commands.
- Removed `<Folder>` elements in `DocumentOperator.Domain.csproj`
and replaced them with `<Compile Remove>`, `<EmbeddedResource Remove>`,
and `<None Remove>` to exclude specific directories.
- Removed unused `using DocumentOperator.Domain.Exceptions;` directive.
- Simplified `Split` method syntax for delimiter specification.
- Updated `return` statements to use concise parameter syntax.
- Removed page number validation logic in `DevExpressSwissQrCodeProcessor`.
- Replaced default page scanning logic with modern range expression.
- Overall, improved code clarity, reduced redundancy, and modernized syntax.
- Change return type to tuple (Bill, string[])
- Remove custom parsing methods (ParseSwissQrBillContent, MapAddress, DetermineReferenceType)
- Use Codecrete QRBill.DecodeQrCodeText() for parsing
- Add SkiaSharp.QrCode v1.0.0 for QR decoding
- Remove obsolete ZXing and System.Drawing dependencies
- Add StringExtensions for QR code detection
- Raw lines properly split and trimmed from QR text
- Replace System.Drawing.Bitmap with DevExpress.Drawing.DXBitmap
- Fix CA1416 warnings (Windows-specific API usage)
- Fix CS0618 warning (TryInverted property moved to Options.TryInverted)
- Add [SupportedOSPlatform(windows)] attribute to DecodeQrCodeFromImage()
- Add Swiss QR Bill backward compatibility documentation
- Suppress CS0618 for AddressLine1/AddressLine2 (deprecated since Nov 2025)
- Use modern C# 12 collection expression syntax
Technical changes:
- CreateBitmap() to CreateDXBitmap() (returns DXBitmap)
- Convert DXBitmap to PNG stream to System.Drawing.Bitmap for ZXing
- Add using DevExpress.Drawing and System.Runtime.Versioning
Result: 0 CA1416 warnings, 0 CS0618 warnings in DevExpressSwissQrCodeProcessor
Updated PHASENPLAN.md and ROADMAP.md to reflect the new
feature order, making "ExtractSwissQrCode" Feature 2 and
renumbering previous Features 2-5 to 3-6. Added detailed
steps, endpoints, and acceptance criteria for the new
feature.
Implemented `ISwissQrCodeProcessor` interface with
`DevExpressSwissQrCodeProcessor` for extracting and parsing
Swiss QR Codes using DevExpress and Codecrete libraries.
Registered the new service in DependencyInjection.cs.
Introduced `SwissQrCodeData` value object and
`SwissQrCodeNotFoundException` for domain modeling and
error handling. Updated project dependencies to include
libraries for QR code processing.
Adjusted existing feature descriptions and steps to align
with the new feature order.
Refactored `DevExpressPdfProcessor` to improve attachment detection:
- Changed `DetectEmbeddedFiles` return type to a tuple for better
handling of attachment presence and count.
- Enhanced logic to parse `/Names` arrays and count object references
for accurate attachment detection.
- Implemented robust search for `/EmbeddedFiles` to handle multiple
occurrences and ensure proper context validation.
Updated PHASENPLAN.md and ROADMAP.md to reflect these changes, including
the addition of fixes for attachment detection and counting logic.
Added new tests in `DevExpressPdfProcessorTests`:
- Verified detection of multiple attachments and accurate counts.
- Ensured no crashes when processing PDFs with `/EmbeddedFiles`.
Included a new test resource (`pdfWithMoreThanOneAttachment.pdf`) for
validating multiple attachment scenarios.
Updated PHASENPLAN.md and ROADMAP.md to reflect a complete restructuring of the development plan and added a "Bugfix: Attachment Detection" entry.
Implemented attachment detection in DevExpressPdfProcessor.cs using the new `DetectEmbeddedFiles` method, which scans raw PDF data for the `/EmbeddedFiles` keyword. Updated the `hasAttachments` property to use this method and set `attachmentCount` to `-1` when attachments are detected.
Added a new test, `ValidateAsync_PdfWithoutAttachments_ReturnsNoAttachments`, in DevExpressPdfProcessorTests.cs to verify that PDFs without attachments are correctly identified. Included a note about future testing for PDFs with attachments using ZUGFeRD files.
All related tests are passing (12/12 green).
Eliminated a redundant `using DevExpress.Pdf;` statement to improve code readability and maintain cleaner imports. This change has no functional impact but enhances code clarity.
Replaced `DevExpress.Pdf.Core` with `DevExpress.Document.Processor` in `DocumentOperator.Infrastructure.csproj` to adopt a newer library for PDF processing. Removed the `Services\PdfProcessing\` folder reference.
Updated `DevExpressPdfProcessorTests` to reflect changes in the `ValidateAsync` method's behavior.
Introduced the `DevExpressPdfProcessor` class, implementing the `IPdfProcessor` interface. This class validates PDF documents and extracts metadata using the `DevExpress.Pdf` library. Added defensive input validation, metadata extraction, and exception handling for domain consistency.