feat: Add IPdfProcessor.ExtractAttachmentsAsync interface method

This commit is contained in:
2026-07-21 09:26:11 +02:00
parent 1989ca7ef7
commit 2c673ea98e

View File

@@ -42,4 +42,20 @@ public interface IPdfProcessor
/// Thrown when stream is empty, invalid, or not positioned at the beginning
/// </exception>
Task<AttachmentInfo> CheckAttachmentsAsync(Stream pdfStream);
/// <summary>
/// Extracts all embedded files from a PDF document and returns them as a ZIP archive.
/// </summary>
/// <param name="pdfStream">
/// PDF document stream. Must be readable and positioned at the beginning (Position = 0).
/// Non-seekable streams are supported. Caller is responsible for disposal.
/// </param>
/// <returns>ZIP archive containing all extracted attachments as byte array</returns>
/// <exception cref="Domain.Common.Exceptions.BadRequestException">
/// Thrown when stream is empty, invalid, or not positioned at the beginning
/// </exception>
/// <exception cref="Domain.Common.Exceptions.NotFoundException">
/// Thrown when PDF contains no attachments
/// </exception>
Task<byte[]> ExtractAttachmentsAsync(Stream pdfStream);
}