Lyo.Pdf.Models
2.0.0
See the version list below for details.
dotnet add package Lyo.Pdf.Models --version 2.0.0
NuGet\Install-Package Lyo.Pdf.Models -Version 2.0.0
<PackageReference Include="Lyo.Pdf.Models" Version="2.0.0" />
<PackageVersion Include="Lyo.Pdf.Models" Version="2.0.0" />
<PackageReference Include="Lyo.Pdf.Models" />
paket add Lyo.Pdf.Models --version 2.0.0
#r "nuget: Lyo.Pdf.Models, 2.0.0"
#:package Lyo.Pdf.Models@2.0.0
#addin nuget:?package=Lyo.Pdf.Models&version=2.0.0
#tool nuget:?package=Lyo.Pdf.Models&version=2.0.0
Lyo.Pdf.Models
PDF stack contracts and value types. Lyo.Pdf implements them, so you can take IPdfService, IPdfReader, IPdfWriter, and ITextExtractor without a direct PdfPig or PDFsharp reference.
Service contracts
IPdfService. Open PDFs (OpenFromFile/Bytes/Streamplus…Asyncand batch variants), open URLs (OpenFromUrlAsync/OpenFromUrlsAsync, async only), create empty docs or open for edit (CreateEmpty,OpenForEdit/OpenForEditAsync), and merge (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 safe across threads.IPdfWriter(IDisposable). PdfSharp editor withPageCount,ImportPagesFrom(IPdfReader)/ImportPagesFrom(ReadOnlySpan<byte>),RemovePage,InsertBlankPage,ReorderPages,ToBytes,Save/SaveAsync, andCopyTo/CopyToAsync. Page indices are zero-based. Not thread-safe.ITextExtractor.IPdfDocumentText+IPdfDocumentSectionscomposed together, reached 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). Each method has matching sync and async variants.IPdfDocumentSections. Slice by section:GetWordsBetweenSections,GetLinesBetweenSections/GetLinesBetweenSectionsAsync,GetSection/GetSectionAsync. 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 that sit on the same visual row.PdfBoundingBox(Page, Box). 1-based page plusLyo.Common.Metadata.Records.BoundingBox2Dexpressed in PDF points.PdfColumnarText(Columns)plusToCombinedString(separator).PdfSection(Name, StartPage, EndPage, Lines)plus a computedWordsproperty.ColumnHeader(Label, IsKey = false). Controls table extraction.IsKeycolumns start a new row. Other columns let unmatched lines append to the previous row.KvColumnResult(ColumnIndex, Values)plus aKvColumnResult.Merge(...)helper.PdfKeyValueLayout.Horizontal(value sits to the right of the key) orVertical(value sits below the key).PdfInferFormattingFlags.None,Bold,Semicolon(labels terminated by punctuation),Underline.
Options
PdfServiceOptions.AddPdfService(...)registers this as a singleton: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". There is no shared catalog and no total-loaded-bytes cap; the caller owns eachIPdfReader.
TFMs
netstandard2.0;net10.0. Depends on Lyo.Common.Core, Lyo.Exceptions, Lyo.Metrics, Lyo.Result, and Lyo.DataTable.Models.
Dependencies
Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).
Lyo.Common.Metadata(direct, lyo)Lyo.DataTable.Models(direct, lyo)Lyo.Metrics(direct, lyo)Lyo.Result(direct, lyo)Lyo.Common.Core(transitive, lyo)Lyo.Exceptions(transitive, lyo)Microsoft.Bcl.AsyncInterfaces10.0.5(transitive, microsoft, netstandard2.0)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.Metadata (>= 2.0.0)
- Lyo.DataTable.Models (>= 2.0.0)
- Lyo.Metrics (>= 2.0.0)
- Lyo.Result (>= 2.0.0)
-
net10.0
- Lyo.Common.Metadata (>= 2.0.0)
- Lyo.DataTable.Models (>= 2.0.0)
- Lyo.Metrics (>= 2.0.0)
- Lyo.Result (>= 2.0.0)
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.Web.Components
Reusable Blazor components for PDF workbenches, annotation helpers, and HTML to PDF workflows. |
|
|
Lyo.Pdf.Ocr
OCR pipeline for PDF pages: rasterize (PDFium), run IOcrEngine, map pixel boxes to PDF points. |
GitHub repositories
This package is not used by any popular GitHub repositories.