#1 2026-09-12 07:48:02

mdoyle
Member
Registered: 2020-11-29
Posts: 27

mORMot PDF crossplatform

I’ve been a big fan of mORMot for a long time, and I’ve used the PDF engine extensively over the years. It’s a powerful library, and I really appreciate how much it can do.

Recently, with the move to Lazarus on macOS and Linux, I became especially interested in a cross-platform solution for PDF generation and reporting. That led me to build and refine a project that abstracts the platform-specific parts and works across those environments.

This is a very complex library, so I relied heavily on Claude to help with the porting and integration work. It has been extremely useful in navigating the complexity and getting the cross-platform pieces to fit together cleanly.

The project currently includes 6 example files that demonstrate the main use cases and APIs:

direct PDF generation,
TCanvas-style usage,
report generation,
markdown/export flow,
CJK support,
RTL/Arabic text handling.

You can find the project on https://github.com/martin-doyle/mORMot2 … ssPlatform.

I’d love to hear whether this kind of cross-platform mORMot PDF/reporting project is of interest to others in the community. If there is interest, I’d be happy to share more details and examples.

Martin

Offline

#2 2026-09-13 09:47:05

edwinsn
Member
Registered: 2010-07-02
Posts: 1,230

Re: mORMot PDF crossplatform

@Martin, thanks for sharing, it must be very helpful.


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#3 2026-09-14 08:08:17

flydev
Member
From: France
Registered: 2020-11-27
Posts: 205
Website

Re: mORMot PDF crossplatform

thanks! good timing, I've just been asked to add report generation and pdf export on our backend, and I never touched the pdf side of mormot until now. will give it a try this week.

Offline

#4 2026-09-15 13:00:37

JD
Member
Registered: 2015-08-20
Posts: 132

Re: mORMot PDF crossplatform

@mdoyle Thank you so much for sharing your work.

Offline

#5 Today 19:11:33

mdoyle
Member
Registered: 2020-11-29
Posts: 27

Re: mORMot PDF crossplatform

Besides the cross-platform support, creating accessible PDFs was a design goal. Since the European Accessibility Act came into force on 28 June 2025, accessibility is mandatory for many PDFs published online (and it has been required for public-sector bodies for even longer).

I've made a few adjustments so that most of the examples now pass an accessibility test, carried out with the German testing tool PAC. All demos except the Chinese and RTL ones now run through the tests without any errors.

Offline

Board footer

Powered by FluxBB