Refactored `ExtractSwissQrCodeAsync` to `InspectSwissQrCodeAsync`, introducing `SwissQrCodeResult` to encapsulate both validation and extraction results. Removed `throwIfInvalid` parameter, ensuring validation details are always returned without exceptions. Added extension methods for file path handling to improve usability.
Updated tests to reflect the new behavior, ensuring extraction is never attempted on invalid documents and validation results are always populated. Simplified API surface by removing redundant overloads and improving stream handling. Enhanced documentation and performed general code cleanup for better maintainability.
Replaced `ExtractAsync` with `ExtractSwissQrCodeAsync` in C#, VB.NET, and PowerShell examples for Swiss QR Code extraction. Updated the `throwIfInvalid` parameter to allow handling invalid PDFs without exceptions.
Revised the API endpoint table in README.md to reflect updated method names (`ExtractSwissQrCodeAsync` replaced with `ExtractAsync` for `Client.Attachment`, `Client.SwissQrCode`, and `Client.Zugferd`). Retained `ExtractSwissQrCodeAsync` for `Client.Workflows`.
These changes improve clarity, consistency, and functionality in the API and documentation.
The NuGet package version for `documentservice.client` has been
updated from `1.0.0` to `1.1.0` in the documentation. Changes
include:
- Updating the **NuGet-Paket** URL under the "Installation" section.
- Updating the PowerShell script example for downloading and
extracting the package.
This ensures users reference the latest version of the package.
Updated the project version from 1.0.0 to 1.1.0 to reflect new changes or improvements. Updated `AssemblyVersion` and `FileVersion` to 1.1.0.0 to maintain consistency with the new project version.
Renamed methods across multiple client classes for consistency,
shortening and aligning naming conventions (e.g., `CheckAttachmentsAsync` → `CheckAsync`, `ValidatePdfAsync` → `ValidateAsync`).
Updated corresponding interfaces, unit tests, and documentation
to reflect the new method names. Standardized method signatures
to support both `Stream` and `byte[]` overloads consistently.
Improved error handling in tests and updated examples in the
README for batch processing and validation scenarios. Enhanced
API endpoint overview for clarity.
Introduced the `Client.Workflows` feature to enable combined
operations with pre-validation. Added the method
`ExtractSwissQrCodeValidatedAsync()` for extracting Swiss QR
Code data with validation in one step.
Updated the README to document the new feature, including
usage examples in C#, VB.NET, and PowerShell, details on the
`throwIfInvalid` parameter, and method signature.
Added the method to the API Endpoints section with a note
about its current `NotImplementedException` status. Clarified
the use of `[Obsolete]` for unimplemented endpoints. Enhanced
the PowerShell note to recommend threading for long-running
operations.
Introduced a new `WorkflowsClient` to orchestrate multi-step
operations, combining `IPdfValidationClient` and
`ISwissQrCodeClient`. Added methods to validate PDFs and extract
Swiss QR Codes in a single call, with overloads for byte arrays,
streams, and file paths. Registered `WorkflowsClient` as a scoped
service in `ServiceCollectionExtensions`.
Updated `PdfValidationResult` with an `IsValid` property to
simplify PDF validity checks. Added `IWorkflowsClient` interface
to define the contract for the new client, with detailed XML
documentation for its methods.
Enhanced README with German translation and examples.
- Added German translation to README alongside English content.
- Expanded installation, configuration, and usage examples.
- Documented static `Client` entry point and error handling.
- Removed STREAM_API_DESIGN.md as it is no longer relevant.
- Changed solution configuration to build in Release mode by default.
Consolidated DTOs under `DocumentService.Application.Common.DTOs.Requests`
to centralize and align them with the application layer. Introduced
`PdfBase64RequestBase` to encapsulate shared properties, reducing
redundancy across request DTOs. Updated controllers, clients, and tests
to use the new DTO structure. Removed redundant DTOs and cleaned up
unused namespaces and comments. Improved documentation and ensured
consistent naming conventions across the codebase.
The `AddAttachmentsRequest` record has been removed. This record was previously used as a request DTO for adding attachments to a Base64-encoded PDF. It included a `Base64Pdf` property for the PDF document and an `Attachments` property for the list of attachments to embed.
The `ExtractPdfAttachmentsRequest` and `AttachmentRequestDto` records remain unchanged.
Refactored the codebase to use shared DTOs from `DocumentService.Application.Common.DTOs`, removing inline DTO definitions in client interfaces and tests. Introduced conditional compilation to handle framework-specific differences in DTOs and handlers.
Updated test cases to align with the new DTO structures, including `SwissQrCodeExtractionResult`, `PdfValidationResult`, and `ZugferdExtractionResult`. Adjusted test data to match updated DTO properties.
Cleaned up solution and project files, ensuring proper references and organization. Removed unused files and fixed project references in `DocumentService.Tests.csproj`. Improved maintainability and consistency across the codebase.
Enabled multi-targeting in `DocumentService.Application` to support `net462`, `net480`, and `net8.0`. Updated dependencies with framework-specific versions and added conditional configurations for compatibility.
Refactored `DocumentService.Client` by removing redundant enums and unused code. Adjusted namespaces and project references to streamline the codebase and improve maintainability.
These changes modernize the project, enhance compatibility, and align with modular design principles.
Introduced multiple interfaces and DTOs to support a wide range of
PDF-related operations, including attachment handling, conversion,
validation, annotation, stamping, and metadata extraction.
Key changes:
- Added `DocumentServiceClientOptions` for HTTP client config.
- Introduced `IPdfAttachmentClient` for attachment operations.
- Added `IPdfConversionClient` for PDF/A conversion (marked obsolete).
- Added `IPdfOperationsClient` for merge, annotate, and stamp ops.
- Introduced `IPdfValidationClient` for PDF and PDF/A validation.
- Added `ISwissQrCodeClient` for Swiss QR Code extraction.
- Added `IZugferdClient` for ZUGFeRD detection and extraction.
- Created request DTOs for Base64-encoded operations.
- Added enums for annotation, stamp, and validation configurations.
These changes provide a flexible and extensible foundation for
interacting with PDF documents, supporting both multipart and
Base64-encoded inputs, and ensuring type safety with enums and records.
Introduced a new `DocumentService.Client` project targeting `net462`, `net480`, and `net8.0`. The project includes metadata for NuGet packaging, such as `PackageId`, `Authors`, and `Company`, and references `Microsoft.Extensions.DependencyInjection` and `Microsoft.Extensions.Logging`.
Updated `DocumentService.sln` to include the new project, its build configurations, and solution folder associations.
Added `icon.png` as the NuGet package icon and included it in the project file.