PDF_Out is an Ada package for producing easily and automatically PDF files, with text, vector graphics, and imported images (JPEG).
With PDF_Out, you can produce automatically reports, invoices, tickets, labels, delivery notes, charts, maps etc. from your Ada program.
The Ada PDF Writer is free and open-source, fully programmed in Ada.
I tried the library 1 or 2 years ago but I was stuck with how to compute the width and height of the text to display. It’s not part of the PDF specification, but you need it to layout the text correctly (ellipsize/truncate/split lines/whatever). How would you do that?
There is an investigative work behind this topic: get the font metrics.
For the “standard PDF fonts” the PDF 1.7 (ISO standard) says:
9.6.2.2 Standard Type 1 Fonts (Standard 14 Fonts)
The PostScript names of 14 Type 1 fonts, known as the standard 14 fonts, are as follows: Times-Roman,
Helvetica, Courier, Symbol, Times-Bold, Helvetica-Bold, Courier-Bold, ZapfDingbats, Times-Italic, Helvetica-
Oblique, Courier-Oblique, Times-BoldItalic, Helvetica-BoldOblique, Courier-BoldOblique
These fonts, or their font metrics and suitable substitution fonts, shall be available to the conforming reader.
NOTE The character sets and encodings for these fonts are listed in Annex D. The font metrics files for the standard
14 fonts are available from the ASN Web site (see the Bibliography). For more information on font metrics, see
Adobe Technical Note #5004, Adobe Font Metrics File Format Specification.
For usable numbers, I’d look into the sources of Ghostscript or PDF.js .