<div dir="ltr">Amazing work, thank you so much Nyall!<div><br></div><div>Regards</div><div><br></div><div>Tim</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Nov 13, 2026 at 4:35 AM Nyall Dawson via QGIS-PSC <<a href="mailto:qgis-psc@lists.osgeo.org">qgis-psc@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi PSC,<br>
<br>
I'm happy to report that following the grant "Restore the print layout<br>
HTML item for QGIS 4"<br>
(<a href="https://github.com/qgis/QGIS-Enhancement-Proposals/pull/377" rel="noreferrer" target="_blank">https://github.com/qgis/QGIS-Enhancement-Proposals/pull/377</a>), the<br>
print layout HTML item has now been resurrected for QGIS 4.4!<br>
<br>
This was a heavy undertaking, involving many different parts. The<br>
upstream removal of the QtWebkit support and replacement by the<br>
less-featured (but more modern and secure) webengine framework<br>
completely removed the API we were relying on for rendering the HTML<br>
print layout item.<br>
<br>
No direct replacement API was available for rendering webengine<br>
content in high quality, vector formats. To work around this, I've<br>
implemented a complicated approach that uses webengine's print<br>
capabilities to export vectorised HTML content to a PDF file, and then<br>
the PDF4QT library to render this into the layout HTML item.<br>
<br>
Via this approach I've been able to resurrect almost all the<br>
functionality that the item had under QGIS 3, including support for<br>
user stylesheets, and injection of atlas feature json into the HTML.<br>
<br>
Additionally, I took the opportunity to fix a long-standing<br>
performance issue relating to the HTML item. In QGIS 3, the HTML<br>
content would always be loaded and rendered immediately, in the main<br>
thread, when creating the item. This also occurred whenever a QGIS<br>
project was loaded that contained a HTML item, resulting in very slow<br>
load times for these projects! Furthermore, all the HTML rendering was<br>
always done on the GUI thread, so navigating and interacting with<br>
layouts containing HTML content was slow and would result in many QGIS<br>
pauses.<br>
<br>
Now, all the loading and rendering is done asynchronously. The HTML<br>
fetching and rendering will only happen when required (no longer at<br>
project load time!), and now happens in a background thread so that<br>
the layout designer always remains responsive to work with.<br>
<br>
That said, there remains some regressions which users should be aware<br>
of when compared with the HTML item support in QGIS 3:<br>
<br>
- The webengine backend uses its own independent networking library,<br>
which is not integrated in any way with the networking library used by<br>
the rest of QGIS. Accordingly, the HTML item will ignore the proxy,<br>
SSL, cache, user agent, authentication and other QGIS network<br>
settings. Requests won't be shown in the QGIS Network logger panel<br>
either. QGIS administrators will need to be aware of this and adjust<br>
their network's firewall settings accordingly.<br>
- While the HTML content is always rendered as high-quality vectors,<br>
text from the HTML will always be converted to paths. This looks<br>
identical, but means that text from the HTML item in PDF or SVG<br>
exported layouts won't be selectable, searchable, or editable. (It's<br>
possible that this limitation may be fixable in follow-up work)<br>
- HTML content will render slightly larger than in QGIS 3 (around 10%<br>
larger). This is a feature, not a bug! The original webkit library<br>
incorrectly sized the HTML content, as reported in<br>
<a href="https://github.com/qgis/QGIS/issues/19901" rel="noreferrer" target="_blank">https://github.com/qgis/QGIS/issues/19901</a>. Now, the font and css sizes<br>
from the HTML content will be an exact match for font and other sizes<br>
for non-HTML layout items. Users may need to adjust their HTML or CSS<br>
to adjust for this sizing difference when loading older projects into<br>
QGIS 4.<br>
<br>
Thanks to the QGIS project and all donors for funding this work and<br>
restoring this valuable capability!<br>
<br>
(The final part of this work is currently waiting review at<br>
<a href="https://github.com/qgis/QGIS/pull/68161" rel="noreferrer" target="_blank">https://github.com/qgis/QGIS/pull/68161</a>)<br>
<br>
Nyall<br>
_______________________________________________<br>
QGIS-PSC mailing list<br>
<a href="mailto:QGIS-PSC@lists.osgeo.org" target="_blank">QGIS-PSC@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/qgis-psc" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-psc</a><br>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><img src="https://ci3.googleusercontent.com/mail-sig/AIorK4w8P1tDzlLwlGFBARg1twcOLqcDfLRRv0hL-5nevML2byVSSmdSsh4pgh_BfPNUz45fy3dnFtgaQ_e7KqXxIlo2cipZeq_NMk8nRW1JxYWA2zo"><br><div><br></div><div><br></div><div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><b>Tim Sutton</b></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">QGIS Project Steering Committee</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><a href="mailto:tim@qgis.org" target="_blank">tim@qgis.org</a></div></div></div></div>