From 2c673ea98edb64f615d4adbb279c80950ac53dd1 Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 21 Jul 2026 09:26:11 +0200 Subject: [PATCH] feat: Add IPdfProcessor.ExtractAttachmentsAsync interface method --- .../Common/Interfaces/IPdfProcessor.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/DocumentOperator.Application/Common/Interfaces/IPdfProcessor.cs b/DocumentOperator.Application/Common/Interfaces/IPdfProcessor.cs index 87b4a78..dc914ce 100644 --- a/DocumentOperator.Application/Common/Interfaces/IPdfProcessor.cs +++ b/DocumentOperator.Application/Common/Interfaces/IPdfProcessor.cs @@ -42,4 +42,20 @@ public interface IPdfProcessor /// Thrown when stream is empty, invalid, or not positioned at the beginning /// Task CheckAttachmentsAsync(Stream pdfStream); + + /// + /// Extracts all embedded files from a PDF document and returns them as a ZIP archive. + /// + /// + /// PDF document stream. Must be readable and positioned at the beginning (Position = 0). + /// Non-seekable streams are supported. Caller is responsible for disposal. + /// + /// ZIP archive containing all extracted attachments as byte array + /// + /// Thrown when stream is empty, invalid, or not positioned at the beginning + /// + /// + /// Thrown when PDF contains no attachments + /// + Task ExtractAttachmentsAsync(Stream pdfStream); } \ No newline at end of file