Add interfaces and DTOs for PDF operations support
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.
This commit is contained in:
49
DocumentService.Client/Interfaces/IPdfConversionClient.cs
Normal file
49
DocumentService.Client/Interfaces/IPdfConversionClient.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
namespace DocumentService.Client.Interfaces;
|
||||
|
||||
/// <summary>
|
||||
/// Client for PDF conversion operations (PDF ? PDF/A).
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// All methods on this interface are marked obsolete because the corresponding
|
||||
/// API endpoints are not yet implemented.
|
||||
/// </remarks>
|
||||
public interface IPdfConversionClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts a standard PDF to PDF/A format (multipart).
|
||||
/// </summary>
|
||||
/// <param name="pdfStream">Source PDF stream</param>
|
||||
/// <param name="pdfALevel">Target PDF/A level (e.g., "PDF/A-3b")</param>
|
||||
/// <param name="cancellationToken">Cancellation token</param>
|
||||
/// <returns>PDF/A document as stream</returns>
|
||||
[Obsolete("API endpoint not implemented yet")]
|
||||
Task<Stream> ConvertToPdfAAsync(Stream pdfStream, string pdfALevel = "PDF/A-3b", CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Converts a standard PDF to PDF/A format (Base64).
|
||||
/// </summary>
|
||||
/// <param name="pdfBytes">Source PDF as byte array</param>
|
||||
/// <param name="pdfALevel">Target PDF/A level (e.g., "PDF/A-3b")</param>
|
||||
/// <param name="cancellationToken">Cancellation token</param>
|
||||
/// <returns>PDF/A document as stream</returns>
|
||||
[Obsolete("API endpoint not implemented yet")]
|
||||
Task<Stream> ConvertToPdfAAsync(byte[] pdfBytes, string pdfALevel = "PDF/A-3b", CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Converts a PDF/A document to standard PDF (multipart).
|
||||
/// </summary>
|
||||
/// <param name="pdfStream">Source PDF/A stream</param>
|
||||
/// <param name="cancellationToken">Cancellation token</param>
|
||||
/// <returns>Standard PDF as stream</returns>
|
||||
[Obsolete("API endpoint not implemented yet")]
|
||||
Task<Stream> ConvertFromPdfAAsync(Stream pdfStream, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Converts a PDF/A document to standard PDF (Base64).
|
||||
/// </summary>
|
||||
/// <param name="pdfBytes">Source PDF/A as byte array</param>
|
||||
/// <param name="cancellationToken">Cancellation token</param>
|
||||
/// <returns>Standard PDF as stream</returns>
|
||||
[Obsolete("API endpoint not implemented yet")]
|
||||
Task<Stream> ConvertFromPdfAAsync(byte[] pdfBytes, CancellationToken cancellationToken = default);
|
||||
}
|
||||
Reference in New Issue
Block a user