PdfAPI.Core overview¶
Documentation context: Packaged Component (NuGet) Documented via: PdfAPI (PdfAPI\PdfAPI.csproj)
PdfAPI.Core is the shared contracts-and-primitives layer of the IT.CoreServices.PDFAPI repository. It defines the request, result, document, page-range, and tracking types used by the PdfAPI Web API service, the PdfAPI.SyncFusionCore processor library, and the PdfAPI.Client package, and it ships a small, stateless set of iTextSharp-backed PDF utilities. It sits at depth 1 of the repository's reference graph — depended on by every other project in the repository, while depending on no in-repo project itself.
Purpose¶
- Define the shared request/result/options/tracking DTOs and enums (
PdfRequest,ConvertRequest,MergeRequest,ExtractPagesRequest,PdfOptions,PdfResult,PdfTrackingInfo,PdfTrackingMetadata, and their supporting enums) that form the wire and in-process vocabulary shared by the API service, the processor library, and the client package. - Provide
Document,DocumentRange,DocumentRangeFactory, andPageRange/IPageRangetypes that model an in-memory-or-on-disk file and the page selections made against it, including page-expression parsing ("1-5,7,9-*,*"). - Provide
PdfClientService, the only behaviour-bearing type in the library — a static, stateless facade over iTextSharp 5.5.11 offering PDF inspection, transformation, and guard operations that execute entirely in the caller's process with no network or database access. - Define cache request/result contracts (
PdfAPI.Core.Cache) that describe a cache lookup/write outcome without implementing any cache store. - Consumed by the
PdfAPIWeb API service, thePdfAPI.SyncFusionCoreprocessor library, and thePdfAPI.Clientpackage, both as a same-repo project reference (PdfAPI) and as packaged source/binary content bundled into two downstream NuGet packages (Pdf.Local.Client,PdfAPI.Client).
Responsibilities¶
- Own the shared PDF request/result/options/tracking contract surface consumed across the repository.
- Provide the sole behaviour-bearing PDF utility type (
PdfClientService) for inspection, flattening, validation, and page extraction. - Model file and page-range selection (
Document,DocumentRange,PageRange) including destructive file-system lifecycle semantics. - Encode/decode the file-name tracking-prefix convention (
PdfTrackingMetadata) used to correlate files across the PDF platform.
Key components¶
PdfClientService: static facade over iTextSharp 5.5.11 for PDF inspection (IsPdf,Version,GetPageCount,HasFormFields), transformation (Flatten,ExtractPages/ExtractPageRanges), and validation (ValidatePdf).Document: in-memory-or-on-disk representation of a single file, with destructiveDispose()/Delete()semantics.DocumentRange/PageRange/DocumentRangeFactory: page-selection modeling and page-expression parsing.PdfRequestfamily (ConvertRequest,MergeRequest,ExtractPagesRequest): request contracts for conversion, merge, and extraction operations.PdfResult: result contract returned by every operation, carrying status, processor type, and output document.PdfTrackingMetadata/PdfTrackingInfo: file-name tracking-prefix encoding/decoding and tracking snapshots.PdfAPI.Core.Cachetypes (PdfCacheRequest,PdfCacheCreationRequest,PdfCacheResult,CacheType): cache lookup/write contracts with no implementing cache store.
Related documentation¶
- Index
- Architecture
- Dependencies
- Operations and processes
- Business rules
- Security and authorization
- API reference
Sources¶
PdfAPI.Core\PdfAPI.Core.csprojPdfAPI.Core\Document.csPdfAPI.Core\Extract\DocumentRange.csPdfAPI.Core\Extract\PageRange.csPdfAPI.Core\Services\PdfClientService.csPdfAPI.Core\PdfTrackingMetadata.csPdfAPI.Core\Cache\CacheType.csPdfAPI\PdfAPI.csproj