Lyo.Pdf.Models
1.0.2
dotnet add package Lyo.Pdf.Models --version 1.0.2
NuGet\Install-Package Lyo.Pdf.Models -Version 1.0.2
<PackageReference Include="Lyo.Pdf.Models" Version="1.0.2" />
<PackageVersion Include="Lyo.Pdf.Models" Version="1.0.2" />
<PackageReference Include="Lyo.Pdf.Models" />
paket add Lyo.Pdf.Models --version 1.0.2
#r "nuget: Lyo.Pdf.Models, 1.0.2"
#:package Lyo.Pdf.Models@1.0.2
#addin nuget:?package=Lyo.Pdf.Models&version=1.0.2
#tool nuget:?package=Lyo.Pdf.Models&version=1.0.2
Lyo.Pdf.Models
Interfaces and value types for the Lyo PDF stack. Defines the contracts implemented by Lyo.Pdf so consumers can depend on IPdfService, IPdfReader, IPdfWriter, and ITextExtractor without pulling in PdfPig or PDFsharp directly.
Service contracts
IPdfService— façade for loading PDFs (OpenFromFile/Bytes/Streamplus…Asyncand batch variants), URL loading (OpenFromUrlAsync/OpenFromUrlsAsync— async only), creating empty / opening for edit (CreateEmpty,OpenForEdit/OpenForEditAsync), and merging (MergePdfs,MergePdfsToFile,MergePdfsToStream,MergePdfFiles,MergePdfBytes, all sync + async).IPdfReader(IDisposable,IAsyncDisposable) — open PDF:SourceBytes(immutable buffer for merges /OpenForEdit),Metrics,Text(ITextExtractor),GetInfo(), andGetPageSizePoints(pageNumber1Based). Not thread-safe.IPdfWriter(IDisposable) — PdfSharp-backed editor withPageCount,ImportPagesFrom(IPdfReader)/ImportPagesFrom(ReadOnlySpan<byte>),RemovePage,InsertBlankPage,ReorderPages,ToBytes,Save/SaveAsync, andCopyTo/CopyToAsync. Page indices are zero-based; not thread-safe.ITextExtractor— composition ofIPdfDocumentText+IPdfDocumentSections, reachable asIPdfReader.Text.IPdfDocumentText— words / lines (GetWords,GetLines,GetWordsBetween,GetLinesBetween), bounding-box and columnar reads (GetLinesInBoundingBox,GetColumnarTextInBoundingBox,GetColumnarText), key/value extraction (ExtractKeyValuePairswith page, word-list,PdfSection, and section-name overloads, plusInferKeyValuePairsFromFormatting), table extraction (ExtractTable/ExtractDataTablewith the same overload shapes plusParseBytesAsDataTable), and inference helpers (InferTableHeadersFromFormatting). Every method has matching sync and async variants.IPdfDocumentSections— section slicing:GetWordsBetweenSections,GetLinesBetweenSections/GetLinesBetweenSectionsAsync,GetSection/GetSectionAsync. Section navigation is anchored by ordered section labels with optionaldefaultEndSection,startPage,endPage, andyTolerance.
Value types
PdfInfo—PageCount,Title,Author,Subject,Creator,Producer,FilePath,Url,CreationDate,ModifiedDate.PdfWord(Text, BoundingBox, Format?)andPdfWordFormat(FontSize?, FontName?, FontBold, FontItalic, FontColor?, FontUnderline).PdfTextLine(Y, Words, Text)— words on the same visual row.PdfBoundingBox(Page, Box)— 1-based page +Lyo.Common.Records.BoundingBox2Din PDF points.PdfColumnarText(Columns)withToCombinedString(separator).PdfSection(Name, StartPage, EndPage, Lines)with computedWordsproperty.ColumnHeader(Label, IsKey = false)— drives table extraction;IsKeycolumns anchor a new row, others let unmatched lines append to the previous row.KvColumnResult(ColumnIndex, Values)withKvColumnResult.Merge(...)helper.PdfKeyValueLayout—Horizontal(value to the right of the key) orVertical(value below the key).PdfInferFormattingFlags—None,Bold,Semicolon(punctuation-terminated labels),Underline.
Options
PdfServiceOptions— knobs registered as a singleton byAddPdfService(...):DefaultYTolerance(5.0),DefaultKeyValueGap(0.0),TableHeaderMergeThreshold(20.0),TableHeaderMatchThreshold(0.75),TableColumnXTolerance(5.0),BoundingBoxOverlapThreshold(0.8),MaxContinuationYGap(10.0),MaxContinuationXDistance(100.0),ValueColumnXTolerance(20.0),KeyValueStackedMaxFirstGap(120.0),MaxPdfSizeBytes(falls back toSuggestedMaxPdfSizeBytes = 25 MiB),EnableMetrics(defaultfalse), and configurationSectionName = "PdfServiceOptions".MaxTotalLoadedBytesis[Obsolete]; the shared catalog is gone — eachIPdfReaderis caller-owned.
Targeting
netstandard2.0;net10.0. References Lyo.Common, Lyo.Exceptions, Lyo.Metrics, Lyo.Result, and Lyo.DataTable.Models.
Dependencies
Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).
Lyo.Common— (direct, lyo)Lyo.DataTable.Models— (direct, lyo)Lyo.Metrics— (direct, lyo)Lyo.Result— (direct, lyo)Lyo.Exceptions— (transitive, lyo)Microsoft.Extensions.DependencyInjection.Abstractions10.0.5— (transitive, microsoft)Microsoft.Extensions.Logging.Abstractions10.0.5— (transitive, microsoft)Microsoft.Extensions.Options.ConfigurationExtensions10.0.5— (transitive, microsoft)System.Memory4.6.3— (transitive, microsoft, netstandard2.0)System.Text.Json10.0.5— (transitive, microsoft, netstandard2.0)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Lyo.Common (>= 1.0.2)
- Lyo.DataTable.Models (>= 1.0.2)
- Lyo.Metrics (>= 1.0.2)
- Lyo.Result (>= 1.0.2)
-
net10.0
- Lyo.Common (>= 1.0.2)
- Lyo.DataTable.Models (>= 1.0.2)
- Lyo.Metrics (>= 1.0.2)
- Lyo.Result (>= 1.0.2)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Lyo.Pdf.Models:
| Package | Downloads |
|---|---|
|
Lyo.Pdf
PDF processing library using PdfPig for reading and PDFsharp for creating and manipulating PDF documents. |
|
|
Lyo.Pdf.Ocr
OCR pipeline for PDF pages: rasterize (PDFium), run IOcrEngine, map pixel boxes to PDF points. |
|
|
Lyo.Pdf.Web.Components
Reusable Blazor components for PDF workbenches, annotation helpers, and HTML to PDF workflows. |
GitHub repositories
This package is not used by any popular GitHub repositories.