Repository navigation
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
bodyor table cell has no top margin, and the last one of a cell has no bottom margin. Aformhas a1embottom margin. - A table does not inherit the font,
line-height,white-space,text-alignor 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.
htmlandbodyfill the first page, and a percentageheightresolves against the page when the ancestors have no height.- Class and ID selectors ignore case, and
color: ff0000andwidth: 100are a color and a length. - Outside quirks mode, class and ID selectors are now case-sensitive (
.Cardno longer matchesclass="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
colspancell no longer widens the table by theborder-spacingbetween 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 ownpaddingis honored in the default separated model (it was ignored). A real<table>isbox-sizing: border-boxby default, so itswidthandheightcover its padding and border. Adisplay: tableelement with no authorbox-sizingiscontent-box. - Borders and alignment. A
borderon atr, row group,colorcolgroupis no longer drawn in a separated-border table (CSS 2.1 section 17.6). Athis centered only when its parent'stext-alignis the initial value, andtext-align: inheritnow applies. - Heights.
vertical-align: baselineon a cell now lines up the cells' baselines (it acted astop), so some rows grow. A cell's own percentageheightis treated asautofor sizing the cell; a row holding one gets its share of a definite-height table instead (a 300px table with 50px rows and aheight: 100%middle cell is 50 / 200 / 50).min-heightis honored on a box whose percentageheightcannot be resolved.max-heighton a table is ignored. - Other. An empty table takes the
widthandheightyou gave it.rowspan="0"spans to the last row of the group.<table rules>other thannoneswitches 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: avoidno longer sits alone at the foot of a page, and a<tbody>withbreak-inside: avoidstays 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). Addmin-height: 0to let it shrink as before. grid-template-rows: 1fr 2frin 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-areanames. A track ofminmax(<length>, auto)stretches like a bareautotrack. - The two-keyword
displaysyntax works for pairs with a single-keyword equal (display: inline flexisinline-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,Ean8andUpcAon containers, and CSS has a-peachpdf-barcode()image function for backgrounds and generated content. - CSS Grid Lanes.
display: grid-lanesandinline-grid-lanes(masonry-style layout), withfit-tolerance,grid-lanes-directionandgrid-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.PageLabelandIDocumentBuilder.PageLabelswrite the labels a viewer shows in its page box and thumbnails. - XHTML and document modes are described above, with
--document-syntaxand--document-modeon thepeachpdftool.
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.PDFimport. 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.GetTextreturns 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.Coregains theBarcodesnamespace:Canvas.DrawBarcode,GraphicsPath.AddBarcodeandBarcodeSvg.ToSvg.PeachDrawing.Win2D: glyph runs take the hinted, ClearType-aware path.PeachDrawing.CoreGraphicsaddsnet10.0-maccatalystandnet11.0-maccatalysttargets.
For PeachBrackets and screen users
PeachBrackets.Avaloniais a new package: an Avalonia 12HtmlViewoverPeachDrawing.Skiawith 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-tablesandcss2-tablesfloors.