New Fl_PDF_File_Surface class to have FLTK create PDF documents

18 views
Skip to first unread message

Manolo

unread,
Apr 30, 2024, 4:54:11 AMApr 30
to fltk.coredev
To fellow FLTK developers

In agreement with Albrecht and Matthias, I've just committed a new class to appear
in FLTK 1.4 named Fl_PDF_File_Surface derived from class Fl_Paged_Device.
With this, any FLTK graphics can be put in a PDF document. Any text in any script
and any font is output in vectorial form. All graphics except images are vectorial.
All image formats supported by FLTK can be output. The 4 platforms support this
provided some 'modernity' condition is met.

On legacy systems, the same or similar result can be obtained with FLTK :
- install a "PDF printer" package, use class Fl_Printer, and directs it that printer;
or
- use class Fl_Postscript_File_Device (no vectorial output for non Roman text).
PDF.jpg

Albrecht Schlosser

unread,
Apr 30, 2024, 5:08:46 PMApr 30
to fltkc...@googlegroups.com
On 4/30/24 10:54 Manolo wrote:
> To fellow FLTK developers
>
> In agreement with Albrecht and Matthias, I've just committed a new
> class to appear
> in FLTK 1.4 named Fl_PDF_File_Surface derived from class Fl_Paged_Device.
> With this, any FLTK graphics can be put in a PDF document. Any text in
> any script
> and any font is output in vectorial form. All graphics except images
> are vectorial.

Many thanks to Manolo for adding this new feature.

I tested it with several examples, particularly text rendering with
special fonts and Emojis and it seems to work very well.

Note: test/device.cxx has been modified to test this feature, its output
can be written directly to a PDF file.

Reply all
Reply to author
Forward
0 new messages