Ability to set font height ratio

Created on 25 May 2025, 14 days ago

Problem/Motivation

When using Dompdf, the font line height in the PDF is different to the height of the rendered HTML in the browser.
Dompdf sets a default font height ratio of 1.1 and provides the setFontHeightRatio method to override that value.

Steps to reproduce

Compare the line-height of fonts of the rendered HTML on the PDF debug page versus the corresponding PDF.

Proposed resolution

Provide a way to set 'font_height_ratio' via Dompdf configuration.

Remaining tasks

Merge request to come.

User interface changes

Add a Font Height Ratio field to Dompdf configuration.

API changes

Data model changes

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇳🇿New Zealand hitfactory

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024