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:
@@ -0,0 +1,17 @@
|
||||
namespace DocumentService.Client.Models.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Coordinate origin point for PDF annotations.
|
||||
/// </summary>
|
||||
public enum AnnotationOrigin
|
||||
{
|
||||
/// <summary>
|
||||
/// Bottom-left corner (PDF native coordinate system, default)
|
||||
/// </summary>
|
||||
BottomLeft,
|
||||
|
||||
/// <summary>
|
||||
/// Top-left corner (common in UI frameworks)
|
||||
/// </summary>
|
||||
TopLeft
|
||||
}
|
||||
32
DocumentService.Client/Models/ValueObjects/AnnotationType.cs
Normal file
32
DocumentService.Client/Models/ValueObjects/AnnotationType.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
namespace DocumentService.Client.Models.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Supported PDF annotation types
|
||||
/// </summary>
|
||||
public enum AnnotationType
|
||||
{
|
||||
/// <summary>
|
||||
/// Text markup annotation (highlight, underline, strikeout)
|
||||
/// </summary>
|
||||
TextMarkup,
|
||||
|
||||
/// <summary>
|
||||
/// Free text annotation (text box with visible text)
|
||||
/// </summary>
|
||||
FreeText,
|
||||
|
||||
/// <summary>
|
||||
/// Sticky note annotation (popup comment icon)
|
||||
/// </summary>
|
||||
StickyNote,
|
||||
|
||||
/// <summary>
|
||||
/// Circle shape annotation
|
||||
/// </summary>
|
||||
Circle,
|
||||
|
||||
/// <summary>
|
||||
/// Square shape annotation
|
||||
/// </summary>
|
||||
Square
|
||||
}
|
||||
13
DocumentService.Client/Models/ValueObjects/OnReconfigure.cs
Normal file
13
DocumentService.Client/Models/ValueObjects/OnReconfigure.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DocumentService.Client.Models.ValueObjects;
|
||||
|
||||
public enum OnReconfigure
|
||||
{
|
||||
ThrowException = 0,
|
||||
Ignore = 1,
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
namespace DocumentService.Client.Models.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Predefined stamp types with standard text and styling.
|
||||
/// </summary>
|
||||
public enum PredefinedStampType
|
||||
{
|
||||
/// <summary>
|
||||
/// CONFIDENTIAL stamp (red, bold).
|
||||
/// </summary>
|
||||
Confidential,
|
||||
|
||||
/// <summary>
|
||||
/// APPROVED stamp (green, bold).
|
||||
/// </summary>
|
||||
Approved,
|
||||
|
||||
/// <summary>
|
||||
/// DRAFT stamp (gray, italic).
|
||||
/// </summary>
|
||||
Draft,
|
||||
|
||||
/// <summary>
|
||||
/// VOID stamp (red, strikethrough effect).
|
||||
/// </summary>
|
||||
Void,
|
||||
|
||||
/// <summary>
|
||||
/// FOR REVIEW stamp (orange, bold).
|
||||
/// </summary>
|
||||
ForReview
|
||||
}
|
||||
17
DocumentService.Client/Models/ValueObjects/StampPlacement.cs
Normal file
17
DocumentService.Client/Models/ValueObjects/StampPlacement.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace DocumentService.Client.Models.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Specifies whether the stamp should appear in the foreground or background.
|
||||
/// </summary>
|
||||
public enum StampPlacement
|
||||
{
|
||||
/// <summary>
|
||||
/// Stamp appears on top of existing page content.
|
||||
/// </summary>
|
||||
Foreground,
|
||||
|
||||
/// <summary>
|
||||
/// Stamp appears behind existing page content (watermark effect).
|
||||
/// </summary>
|
||||
Background
|
||||
}
|
||||
22
DocumentService.Client/Models/ValueObjects/StampType.cs
Normal file
22
DocumentService.Client/Models/ValueObjects/StampType.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
namespace DocumentService.Client.Models.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the type of stamp to add to a PDF document.
|
||||
/// </summary>
|
||||
public enum StampType
|
||||
{
|
||||
/// <summary>
|
||||
/// Text-based stamp with custom text, font, and color.
|
||||
/// </summary>
|
||||
Text,
|
||||
|
||||
/// <summary>
|
||||
/// Image-based stamp (PNG/JPEG overlay).
|
||||
/// </summary>
|
||||
Image,
|
||||
|
||||
/// <summary>
|
||||
/// Predefined stamp with standard text (e.g., CONFIDENTIAL, APPROVED).
|
||||
/// </summary>
|
||||
Predefined
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
namespace DocumentService.Client.Models.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Text markup annotation style (highlight, underline, strikeout)
|
||||
/// </summary>
|
||||
public enum TextMarkupStyle
|
||||
{
|
||||
/// <summary>
|
||||
/// Highlight text with background color
|
||||
/// </summary>
|
||||
Highlight,
|
||||
|
||||
/// <summary>
|
||||
/// Underline text
|
||||
/// </summary>
|
||||
Underline,
|
||||
|
||||
/// <summary>
|
||||
/// Strikeout text (strikethrough)
|
||||
/// </summary>
|
||||
Strikeout
|
||||
}
|
||||
Reference in New Issue
Block a user