Skip to content

v0.10.1

Latest

Choose a tag to compare

@github-actions github-actions released this 21 Nov 01:24
· 19 commits to main since this release
e4ce643

PeachPDF 0.10.1 Release Notes

Release date: November 20, 2026
Full changelog: v0.10.0...v0.10.1
Release tag: v0.10.1

0.10.1 follows 0.10.0 by a week and is mostly a tables release: two dozen table layout fixes, most of them found by running the CSS tables web-platform-tests. It also lays out a document with no DOCTYPE in quirks mode, as a browser does, parses XHTML as XML, adds CSS Grid Lanes and barcodes, and starts a PDF reader app on top of the PDF import support. About 20 commits since 0.10.0 are included.

Install with dotnet add package PeachPDF --version 0.10.1.

Upgrading from 0.10.0

Read this first: HTML with no DOCTYPE now renders differently. The parser used to work out quirks mode from the DOCTYPE and then ignore the answer. A document with no DOCTYPE or a legacy one is now laid out in quirks mode, and a transitional XHTML 1.0 or HTML 4.01 DOCTYPE with a system identifier in limited-quirks mode, as in a browser. HTML handed to PdfGenerator without a DOCTYPE (a fragment, most often) changes:

  • The first paragraph, heading or list of a body or table cell has no top margin, and the last one of a cell has no bottom margin. A form has a 1em bottom margin.
  • A table does not inherit the font, line-height, white-space, text-align or color of what it sits in.
  • A line holding only an image is the image's height, and an empty inline element makes no line taller.
  • html and body fill the first page, and a percentage height resolves against the page when the ancestors have no height.
  • Class and ID selectors ignore case, and color: ff0000 and width: 100 are a color and a length.
  • Outside quirks mode, class and ID selectors are now case-sensitive (.Card no longer matches class="card" in a document with a DOCTYPE). That includes fragments given to the declarative builder, which are never in quirks mode.

To keep the old output, add <!DOCTYPE html> or set PdfGenerateConfig.DocumentMode = PdfDocumentMode.NoQuirks (--document-mode=no-quirks on the command line, HtmlDocumentOptions.DocumentMode for PeachBrackets). HtmlDocument.DocumentMode reports the mode a document is in.

XHTML is parsed as XML. A .xhtml or .xht file, or a response of application/xhtml+xml, is parsed with an XML parser: it must be well-formed (otherwise HtmlRenderException with the line and position), no html/head/body/tbody is made up, <![CDATA[...]]> works, and the document is never in quirks mode. A string passed to GeneratePdf is unchanged unless the config says PdfDocumentSyntax.Xml. To keep the old parse, set PdfGenerateConfig.DocumentSyntax = PdfDocumentSyntax.Html (--document-syntax=html).

Tables. Documents that use tables will see small changes in size and placement:

  • Cell widths. A percentage cell width is the cell's whole share of the grid (its padding is no longer added outside it). A colspan cell no longer widens the table by the border-spacing between its columns. A declared cell width is no longer a minimum for a table nested in it. A percentage column whose content needs more than its share no longer makes the table wider than its declared width. All four match headless Chrome.
  • Padding and box-sizing. A <table>'s own padding is honored in the default separated model (it was ignored). A real <table> is box-sizing: border-box by default, so its width and height cover its padding and border. A display: table element with no author box-sizing is content-box.
  • Borders and alignment. A border on a tr, row group, col or colgroup is no longer drawn in a separated-border table (CSS 2.1 section 17.6). A th is centered only when its parent's text-align is the initial value, and text-align: inherit now applies.
  • Heights. vertical-align: baseline on a cell now lines up the cells' baselines (it acted as top), so some rows grow. A cell's own percentage height is treated as auto for sizing the cell; a row holding one gets its share of a definite-height table instead (a 300px table with 50px rows and a height: 100% middle cell is 50 / 200 / 50). min-height is honored on a box whose percentage height cannot be resolved. max-height on a table is ignored.
  • Other. An empty table takes the width and height you gave it. rowspan="0" spans to the last row of the group. <table rules> other than none switches the table to collapsed borders. Anonymous table boxes inherit their parent's style, and one table is made per run of siblings (CSS 2.1 section 17.2.1).
  • Pagination. A heading row with break-after: avoid no longer sits alone at the foot of a page, and a <tbody> with break-inside: avoid stays whole when it fits a page.

Grid and flexbox

  • A <img>, inline <svg> or <iframe> in a column flex container too short for its items stops shrinking at its natural height (its automatic minimum size). Add min-height: 0 to let it shrink as before.
  • grid-template-rows: 1fr 2fr in a grid with no definite height now gives rows in the ratio of their flex factors, with each row at least its content.
  • An absolutely positioned child of a grid that is not its containing block is aligned in the grid's content box, not in the grid area its grid-area names. A track of minmax(<length>, auto) stretches like a bare auto track.
  • The two-keyword display syntax works for pairs with a single-keyword equal (display: inline flex is inline-flex); it was dropped as invalid.

Form controls. An <input> (text, search, tel, url, email, password, number) or a drop-down <select> now sits on its line of text, as in a browser, so a label beside it shares its baseline, and a row of inline form controls is as tall as the control. Rows come out shorter than in 0.10.0, and labels move up to meet the text in the field. Checkboxes, radio buttons, buttons, pickers, list boxes and <textarea> keep resting on their bottom margin edge.

Pages and numbers. target-counter(<link>, page) now shows the same value counter(page) shows on the target's page, so a table of contents in a document that restarts page numbering has correct numbers. Documents without @page counter rules render as before. PdfOperation (take, merge, append) now carries the page labels of the pages it takes; before, a merged PDF lost them.

For PeachPDF users (PDF output)

New

  • Barcodes. QR code, Data Matrix, Code 128, GS1-128, EAN-13, EAN-8 and UPC-A, drawn as vector paths. The declarative builder has QrCode, DataMatrix, Code128, Gs1128, Ean13, Ean8 and UpcA on containers, and CSS has a -peachpdf-barcode() image function for backgrounds and generated content.
  • CSS Grid Lanes. display: grid-lanes and inline-grid-lanes (masonry-style layout), with fit-tolerance, grid-lanes-direction and grid-lanes-pack, and fragmentation across pages. A set of CSS Grid test failures was fixed alongside it.
  • Declarative builder. Containers gain MinWidth/MaxWidth/MinHeight/MaxHeight, Opacity, ZIndex, direction, rotation, flip, translate and scale, page-break helpers and multi-column properties. Text styles and spans gain named weights, WrapAnywhere, decoration and alignment.
  • PDF page labels. PdfComposer.AddPageLabels, IPageDescriptor.PageLabel and IDocumentBuilder.PageLabels write the labels a viewer shows in its page box and thumbnails.
  • XHTML and document modes are described above, with --document-syntax and --document-mode on the peachpdf tool.

Fixes

  • Arabic text no longer produces empty ToUnicode destinations (an invalid entry that made PdfPig throw), and a space next to text running the other way (42 <arabic>) is placed beside its neighbor instead of at the far end of the run.
  • The in-browser demo builds without runtime-async, which the WebAssembly interpreter cannot run (Generate PDF threw an empty InvalidProgramException).

For PeachDrawing users

  • PeachDrawing.PDF import. A font that is not embedded is drawn with an installed family chosen from its name and flags, using the file's own widths, and each stand-in is reported as "font substituted". PdfPageSource.GetText returns a page's text in drawing order with the position of every character, plus hit testing, word and line lookup and search (case, whole word, diacritics, wrapped phrases). Rendering fixes include negative-size text under horizontal scaling, macOS Quartz font subsets, shading /Extend, forms nested up to 40 deep, and Lab color spaces. A PDFium pixel-test runner compares the import with PDFium's own expected images in CI.
  • PeachDrawing.Core gains the Barcodes namespace: Canvas.DrawBarcode, GraphicsPath.AddBarcode and BarcodeSvg.ToSvg.
  • PeachDrawing.Win2D: glyph runs take the hinted, ClearType-aware path.
  • PeachDrawing.CoreGraphics adds net10.0-maccatalyst and net11.0-maccatalyst targets.

For PeachBrackets and screen users

  • PeachBrackets.Avalonia is a new package: an Avalonia 12 HtmlView over PeachDrawing.Skia with GPU tiles, scrolling and zoom, touch, links, selection, forms and pickers, text editing with input-method support, and accessibility peers.
  • PeachReader, a PDF reader app, starts in this release, with Windows and Android heads and a platform-free PeachReader.Core (outline, page layout, links, history, bookmarks, selection and search). It is not published as a package.
  • Web-platform-tests. The pinned test commit moves forward, and the table work above raised the css-tables and css2-tables floors.