Repository navigation
Bump PeachPDF from 0.9.23 to 0.9.25 - #6
Merged
tzinmein merged 1 commit intoNov 4, 2026
Merged
Conversation
--- updated-dependencies: - dependency-name: PeachPDF dependency-version: 0.9.25 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
dependabot
Bot
deleted the
dependabot/nuget/src/OxyKit.Render.Core/PeachPDF-0.9.25
branch
November 4, 2026 14:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated PeachPDF from 0.9.23 to 0.9.25.
Release notes
Sourced from PeachPDF's releases.
0.9.25
PeachPDF 0.9.25 Release Notes
Release date: October 30, 2026
Full changelog: v0.9.24...v0.9.25
Release tag: v0.9.25
PeachPDF 0.9.25 turns
PeachBracketsinto an engine you can select, search and edit text in, adds a Win2D backend (PeachDrawing.Win2D), and reads CSS Color 4'scolor(),noneand relative color syntax, with gradients that fade totransparentkeeping their colour. Table backgrounds now follow CSS 2.1 §17.5.1, and a long list of pagination, table, flex and grid defects is fixed. The hot paths of the engine, the PDF writer and the rasterizer allocate far less. 45 pull requests are included.Thanks to @ChrisVanDijk, who authored three of them (the
visibilityandinitialfixes for inline SVG), to @SlyNet for table track backgrounds that cover only their own cells, and to @mbp, who made their first contribution with custom string entries in a page's dictionary.Highlights
PeachBrackets: where the text is, selection, highlights and editingHtmlDocumentcan now answer questions a viewer or an editor asks of a laid-out document, with no PDF involved. See PeachBrackets.HtmlDocumentOptions.RecordTextRunsset,TextRuns/GetTextRuns(pageIndex)report each line of a block in points, with per-character offsets (snapped to grapheme boundaries), baseline metrics, direction, block id and link.HitTest,GetCaretPosition,GetSelectionRects,GetText,FindText,GetWordAt,GetBlockAt,GetElementandGetElementAtare built on them. Nothing is computed unless asked for, and layout and painting are unchanged.HtmlDocument.Selectionis aDocumentSelectionwith a DOM-like model (SetBaseAndExtent,Collapse*,Extend,Modifyby character, word, line or block,SelectAll,SelectWordAt,SelectBlockAt,GetRegions,GetCaretBounds) andSelectionChangedevents that carry the regions to repaint.SelectionBackground/SelectionForegroundset the default colours andEnableSelectionStylingapplies::selectionrules.SetHighlight/RemoveHighlight/ClearHighlightspaint::highlight(),::spelling-errorand::grammar-error, andApplyTextFragmentDirectivepaints a URL text fragment as::target-text. A highlight fills the whole line box, restyles text withtext-shadowand a text stroke, draws atext-decorationit adds, and inheritscolorandtext-shadowfrom an ancestor's highlight through an element with rules of its own. Vertical text has no text runs yet, so it is not highlighted.EnableIncrementalUpdatesset,InsertTextAsync,DeleteTextAsync,ReplaceTextAsync,SplitParagraphAsync,JoinWithNextParagraphAsync(list items included, with the markers after them renumbered),WrapRangeAsyncandUnwrapElementAsync(forstrong,em,u,a,spanand the like) change the document and re-lay out only what the edit reaches.SetStylerestyles an element, andPaintPageRegionAsyncrepaints just the region an edit dirtied. After a split or join, later siblings are re-cascaded so:first-child,:last-childand adjacent-sibling rules see the new tree, and counters, quote depths and generated content are resolved again. A paragraph split no longer gives its copy the original's id.New package:
PeachDrawing.Win2DA fourth
Canvas/RenderContextbackend, over Win2D for the Windows App SDK, at the same version as PeachPDF and usable with no PeachPDF reference. It is Windows-only (net10.0-windows10.0.19041.0, plusnet11.0-windowsunder the .NET 11 SDK). See PeachDrawing.Win2D.Win2dCanvasdraws into a caller'sCanvasDrawingSession(borrowed, never closed, state restored) or into the offscreen bitmap of aWin2dComposer(PNG, JPEG, BMP, TIFF, GIF or premultiplied pixels).PeachDrawing.Textengine by default, or through DirectWrite; the DirectWrite mode is documented as not feature complete.CSS Color 4:
color(),none, relative color syntax and alpha-aware gradientscolor()is read in every predefined space (a98-rgb,prophoto-rgbandrec2020are new) and clipped to sRGB. Abackground-colorusing it used to be dropped.noneis a missing component. It is 0 on its own (an alpha ofnoneis transparent), and in acolor-mix()or an animation it takes the other colour's value.rgb(),hsl()andhwb()withnonemix in Oklab, like Chrome.noneis not accepted in the legacy comma syntax.rgb(from #336699 calc(r + 20) g b), and the same inhsl(),hwb(),lab(),lch(),oklab(),oklch()andcolor(). An omitted alpha is the origin's, and in an animation the colour is mixed in Oklab.transparentkeeps its colour. Stops are interpolated premultiplied by alpha (CSS Color 4 §12.3), solinear-gradient(to right, red, transparent)stays red while it fades instead of going gray in the middle. This applies in every interpolation space, with hints and in conic gradients.lch,oklch,hslandhwbgradients (and incolor-mix()inhsl/hwb), as the specification says and ascolor-mix()already did.Table backgrounds, rowspans and nested tables
rowspancell no longer shows a later row's colour in its lower part, acolspancell takes the colour of the column it starts in, and theborder-spacinggaps and empty slots show the table's own background. Details and theempty-cells/visibilityconsequences are in the migration section below.break-inside: avoidon a row of such a nested table is honoured.rtlcontainer is anchored to the right edge, less its right margin, as a block-level box is (CSS 2.1 §10.3.3).Page metadata
PdfComposerPage.SetCustomString(dictionaryKey, key, value)stores a custom string entry in a dictionary associated with the page, andTryGetCustomStringreads it back from a written document. Names must be valid PDF names, an existing page entry (including the reserved page keys) is never overwritten, and a dictionary name is reused for every entry set under it.Much less allocation in the hot paths
Output is unchanged; these only reduce garbage and time.
PeachDrawing.Text: a case-insensitive family dictionary and cached range query in font matching, span-based hyphenation lookup, per-run script-set lookups, pooledgvarscratch arrays and word-wise table checksums./Warrays and SVG numbers are written straight into the output, the Flate stream is presized and the PNG CRC uses slicing-by-4.Vector128code with scalar references, and per-pixel allocations are gone from the arithmetic, tile and colour-matrix paths.... (truncated)
0.9.25-preview1
PeachPDF 0.9.25-preview1 Release Notes
Release date: October 27, 2026
Full changelog: v0.9.24...v0.9.25-preview1
Release tag: v0.9.25-preview1
This is a preview of 0.9.25. It adds a fifth drawing package,
PeachDrawing.Win2D, which draws with hardware-accelerated Win2D on Windows, and it reads the rest of CSS Color 4's color syntax (color(),none, relative colors) with gradients that fade totransparentkeeping their color. Tables get four layout fixes (nested tables in sliced rows,break-inside: avoidon nested rows, rows kept whole across the page foot, tables inrtlcontainers), CSS Grid and inline-block alignment close four gaps, and the text, PDF-writer, SVG and raster paths allocate less. 21 pull requests are included.Install the preview with
--prerelease(or pin0.9.25-preview1):dotnet add package PeachPDF --prerelease. The docs site is not updated for a preview.Highlights
New package:
PeachDrawing.Win2DA Windows
Canvasfor the same drawing API asPeachDrawing.PDF,PeachDrawing.SvgandPeachDrawing, usable with no PeachPDF reference. It uses Win2D 1.4 (Windows App SDK) and targetsnet10.0-windows10.0.19041.0(andnet11.0-windows10.0.19041.0under the .NET 11 SDK). It builds on Windows only. See PeachDrawing.Win2D.Win2dCanvas.FromSessiondraws into a drawing session you already have (aCanvasControl, a swap chain). The session is borrowed: it is never closed and its transform, blend and anti-aliasing are put back.Win2dComposerdraws an offscreen page and reads it back as pixels or saves PNG, JPEG, BMP, TIFF or GIF.DrawImageBlendedOver, tiles (vector command lists) and the raster fallback are covered too.PopClip, brushes and geometry live for one draw call, a tile or layer owns a command list, and a canvas disposed with clips or layers still open unwinds them. A borrowed device or session is never disposed.Win2dRenderContextisIDisposable; a lost device is replaced on next use and raisesDeviceLost, and reading a lost page throwsWin2dDeviceLostException.PeachDrawing.Textengine by default, so it lays out exactly as on the other canvases, or through DirectWrite (Win2dTextEngine.DirectWrite) so it looks like the rest of Windows. DirectWrite mode is not feature complete: no glyph outlines (gradient-filled text falls back to a solid color), nofont-variation-settings, nounicode-rangesplitting, and its layout differs from the other backends. The guide has the full table.Win2dCanvas.Linksfor the host to hit-test.TryActivateAsyncopens an address with the system's default handler for its scheme, and onlyhttp,https,mailtoandtelare launched unless the host widensWin2dLinkOptions.AllowedSchemes. A link to a place in the document is left to the host to scroll to.PushBlendModeis exact forPlusandDarkenand draws the other modes asNormal(CSSmix-blend-modeis not honored on this canvas); a two-circle radial gradient starts from a point focus; a blur or shadow with unequal x and y deviations uses their mean.Tables
<thead>; the two disagreed by the header's height on every page, so inner rows drifted from the third page on and a row at the page foot was drawn on two pages.break-inside: avoidon a row of a nested table is honored (it was declined for every table inside a table cell), so such a row moves whole to the next page, under the repeated header.break-after: avoidheadings) at the start of a cell used to travel to the next page and leave the cell empty on the first, and a taller-than-a-band row's second cell had a line cut by the page edge. The run is now trimmed past a member that is the first in-flow child of a cell, and the row is laid out so no line is cut.rtlcontainer is anchored to the right edge, as a block-level box is (CSS 2.1 §10.3.3).Color
color()is read in every predefined space (srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyz,xyz-d50,xyz-d65) and clipped to sRGB, sobackground-color: color(...)is no longer dropped.noneis a missing component (CSS Color 4 §12.2): 0 on its own, and incolor-mix()and animations it takes the other color's value.rgb(none 0 0)is read;noneis rejected in the legacy comma syntax.rgb(),hsl(),hwb(),lab(),lch(),oklab(),oklch()andcolor():rgb(from #336699 calc(r + 20) g b). The origin may itself be relative, the alpha is the origin's unless written, and in an animation a relative color is mixed in Oklab.transparentkeep their color. Stops of different alpha are interpolated premultiplied by alpha (CSS Color 4 §12.3), solinear-gradient(to right, red, transparent)stays red as it fades instead of going gray. This is done in the engine, so the PDF and raster backends agree.lch,oklch,hslandhwb(CSS Color 4 §4.4.1), so a gradient and acolor-mix()of the same stops agree.#808080toredinoklchisrgb(198, 99, 86)at the midpoint, thecolor-mix()value. This differs from Chrome'soklchgradient, which keeps the gray's own hue.CSS Grid and inline-level boxes
autogrid rows fill a definite container height (css-grid-2 §12.8), so items stretch oralign-selfhas room.width: autois as wide as the sum of its tracks and gutters, not all the free width of the flex container.inline-gridorinline-tablehonorsvertical-align: the box and its items move together.inline-flex,inline-gridorinline-tablebox counts intext-align, and moves with its content, aligned at its margin-box width. Underjustifyit is neither moved nor resized.Paged media and text
@pagemargin-topandmargin-bottompercentages resolve against the page height, not the width (css-page-3 §6).element()running element in a margin box follows the box'svertical-align(defaultmiddle) instead of being drawn at the top (css-page-3 §6.2).hyphenate-characteris. A custom or empty character no longer lets the word overflow.unicode-range. It was measured and drawn in theunicode-rangeface.Performance
Output is unchanged in all of these; each has equivalence tests against the code it replaced.
Vector128kernels, and the per-pixel allocations in the arithmetic, tile and mirror-pad filters are gone.... (truncated)
0.9.24
PeachPDF 0.9.24 Release Notes
Release date: October 23, 2026
Full changelog: v0.9.23...v0.9.24
Release tag: v0.9.24
PeachPDF 0.9.24 can stamp pages of an existing PDF over or under a document you build (
OverlayFile/UnderlayFile), and the HTML/CSS/SVG/MathML engine now ships as its own package,PeachBrackets, beside a new SVG output package,PeachDrawing.Svg. It also lays out text-only multi-column containers as real columns, puts text beside a float that follows it, and fixes a long list of CSSbackgroundandcolor-mix()mismatches with browsers. 67 pull requests are included.Thanks to @ChrisVanDijk, who authored five of them: the
backgroundshorthand layers, CSS animations on inline<svg>elements, percentage opacity in keyframes, the gradient alpha fix and the background-deviation notes. Thanks also to @zzyzy for columnizing text-only multi-column containers and to @SlyNet, who made their first contribution with keeping a table row that avoids breaks whole.Highlights
New:
OverlayFileandUnderlayFileIDocumentBuilder.OverlayFile/UnderlayFiledraw pages of an existing PDF over or under the pages of a declarative document. Pages are paired withTargetPages,SourcePagesandRepeatSourcePagesranges ("1-3,5","2-z"). They are read by a new PDF importer inPeachDrawing.PDF, public asPdfPageSource, which re-draws a page onto anyCanvas.PdfAnnotationBuilderfor highlights, notes, stamps, ink and shapes.PdfPageSource.Paint: mesh shadings, stroked text, Type 1/CFF/Type 3 fonts. In the showcase round trip, all 430 pages stay under a 2% pixel difference from the original (it began at 32 of 429 pages over the threshold).Page(...)calls keep all their structure: the structure tree holds oneDocumentelement with every handler's structure, and each page has its own parent-tree key. They used to keep only the last handler's.New packages:
PeachBracketsandPeachDrawing.PDFThe HTML/CSS/SVG/MathML engine and the PDF writer are now separate NuGet packages at the same version as PeachPDF, both usable with no PeachPDF reference.
PeachBracketsloads, paginates and paints HTML onto anyCanvas:HtmlDocument.LoadAsync,LayoutAsyncandPaintPageAsync, with a public annotation model (links, outline, form fields) and a tagging seam. It does not reference the PDF writer. See PeachBrackets.PeachDrawing.PDFholds the PDFCanvasandPdfComposer, with PDF/A and PDF/X conformance, links and bookmarks, tagged PDF, forms and encryption. See PeachDrawing.PDF.PdfGeneratoroutput is unchanged. Each package carries its own README and third-party notices.New:
PeachDrawing.SvgA vector SVG
Canvas(SvgCanvas,SvgRenderContext,SvgComposer) beside the PDF and raster ones. Paths keep their curves, brushes become gradients and patterns, clips, transforms and blend modes become groups and CSS compositing, and images are embedded as they came. Text is exact glyph outlines or, withSvgTextMode.Text, selectable<text>with an embedded subset font. The only bitmap is the raster-fallback seam. See PeachDrawing.Svg.Canvascalls (AddLink,AddDestinationLink,AddDestination; default no-ops).PdfCanvaswrites them as link annotations and named destinations andSvgCanvasas<a href>. HTML documents write their links through them, and tagged-PDF links stay attached to their structure elements.RasterCanvasas well).Multi-column containers that hold only text
Text placed directly in a
columns/column-countcontainer used to flow as one inline run across the full width. It is now divided into columns like any other column content, including text beside a float. Text in a vertical writing mode and a bounded scroll container (overflowother thanvisiblewith aheightormax-height) that holds only text keep their previous layout.A float after text no longer covers it
A float placed after text on the same line used to sit at the top of that line with the text underneath it. The text on the line now moves beside the float when it fits, and otherwise the float starts the next line. A float wider than the line takes the text below it. Float placement also no longer hangs on certain combinations of float sizes, margins and
clear: a fuzz run of 560 documents hung 26 and 58 times on the previous code and 0 times now.A flex item in a row keeps its automatic minimum size
An item of a
display: flexrow withmin-width: auto(now the initial value, as in CSS Sizing 3) is no longer shrunk below its min-content width: an<img>used to be squeezed under its natural width, and anowrapor long-word item narrowed until its text overflowed. It is floored at its min-content width, or at its definitewidthwhen that is smaller, and the shrink it cannot take goes to the other items; a row that cannot fit overflows, as in a browser. Items withmin-width: 0or anoverflowother thanvisible/clipstill shrink freely. Widths match Chrome on the rows tested (two 96px images in a 100pt row stay 72pt each, where they were 50pt). A document that relied on tiles squeezing to fit now overflows; addflex-wrap: wrapormin-width: 0to restore the old fit. Flex items in a column, grid items, and items being grown (flex: 1with a long unbreakable word) do not get the automatic minimum yet.break-inside: avoidon a table rowbreak-inside: avoid(oravoid-page, orpage-break-inside: avoid) on a<tr>or its cells was ignored once a cell wrapped, so the row was cut at the page foot. Such a row now moves whole to the next page, under the repeated header, when it fits there. A row taller than a page, and a row of a table nested in another table's cell, are still split. Documents with rows that avoid breaks can change page count.avoidrow can gain or lose a page by this.CSS backgrounds
... (truncated)
Commits viewable in compare view.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)