header image news page

Microtypography and font expansion

The speedata Publisher is built on top of LuaTeX, a typesetting software with a strong focus on typography. Therefore it inherits all the possibilities offered by the layout engine. One of the older features is the ability to stretch or shrink glyph widths on demand to allow even better line breaking.

TeX already uses the famous line breaking algorithm that optimizes the appearance of a full paragraph as a whole, not a line-by-line approach that might lead to large inter-word spacing.

The ability to stretch or shrink glyphs by a little amount can lead to many more possible line breaks and thus enhancing the overall visual outcome of a paragraph. The famous Gutenberg 42 line bible (B42) has a similar approach to line breaking.

from Patrick Gundlach |

speedata Publisher and accessibility

Version 4.19.8 has a completely written module for creating tagged PDF for accessibility.

First, you need to set the output format to PDF/UA with

<PDFOptions format="PDF/UA" />

Tagged PDF also needs an outline of the structure of the document. See the previous blog entry for more details on tagged PDF. To summarize: you create an description of what is visible in the PDF. Each visible part gets tagged with a structure type (“this is a label for a table of contents link”, “this is a heading” and so on).

from Patrick Gundlach |

What is PDF? Part 5 - Metadata

This part of the mini-series on PDF will be about metadata. Metadata is not visible in the document when printed, but only useful for curious human beings and some software that needs a PDF in a special format (like electronic invoices in the ZUGFeRD format). Metadata is always “about this document”, so it changes from document to document and must be applied individually.

from Patrick Gundlach |

Release speedata Publisher 4.18

Last week I have released the new stable version 4.18 with some big internal changes, which hopefully don’t affect your documents. Very intensive testing has been done and all test files (currently more than 220 and some bigger production documents) run fine with the new version.

New XML/ XPath parser

This internal change is to make the new XML and XPath parser the default parser, which is a complete rewrite and is more robust than the old one.

from Patrick Gundlach |

What is PDF? Part 4 - interactive features

Interaction

PDF allows a lot of different interactive features such as web hyperlinks, jumping to a different location in the document, notes, video playback, JavaScript programs and many more. In this part I cover some of the basic features (bookmarks and annotations).

from Patrick Gundlach |

What is PDF? Part 3 – Vector graphis

Vector graphics

In the third part I cover vector graphics. You can also include PNG and JPEG images in the PDF, which will be covered in a later part of the PDF introduction.

from Patrick Gundlach |

What is PDF? Part 2 – Fonts

This is part 2 of a mini-series on PDF.

Part 1 – PDF syntax and file structure
Part 2 – Fonts
Part 3 - Vector graphics
Part 4 - Interactive features
Part 5 - Metadata
Part 6 - Tagged PDF

Please note that all of these examples are created manually. If you wish to experiment with the examples, you can do so yourself. For more information, visit https://github.com/speedata/fixxref which provides a small program that supports manual PDF editing.

In the previous article in this series, I introduced the basic structure of a PDF file and how to create a PDF file using a text editor.

My goal in this post is to add some text to the PDF (using the included fonts). I should mention that you can find all the details in the PDF specification. There is one for 1.7 (recommended, very readable) and for 2.0 (register to download, few PDF viewers support 2.0 at the time of writing).

Writing text

For this introduction, I don’t want to complicate things. So I will use one of the PDF viewer’s built-in fonts, a so-called “standard 14” font. These are Courier, Courier-Bold, Courier-BoldOblique, Courier-Oblique, Helvetica, Helvetica-Bold, Helvetica-BoldOblique, Helvetica-Oblique, Symbol, Times-Bold, Times-BoldItalic, Times-Italic, Times-Roman, ZapfDingbats.

from Patrick Gundlach |

Debugging PDF files

While developing the speedata Publisher, I have to create PDF instructions to draw shapes, create accessibility data structures and embed files for example. For boxes and glue, I have to create a PDF file from scratch. But once in a while I make mistakes and the PDF file cannot be displayed in the viewer. Then I need to look into the PDF file and check manually where the problem is. For example Adobe Acrobat shows a message:

from Patrick Gundlach |