rekhu
← All news

Seshat fills templates in any font, centred and faster

Seshat now fills templates set in Type 1 fonts with their own encoding and in subset fonts, keeps names centred on centred certificates, names files in plain Latin letters, and makes merged files a fraction of their size.

By Rekhu 2 min read

Seshat's template filling (fillTemplate) now handles the templates that came out wrong before, and does it faster.

What changes for you

  • Templates in older fonts are filled. Diplomas and certificates are often set in Type 1 fonts that carry their own letter table. Seshat now reads that table from the font itself, so placeholders such as [name] are found and replaced.
  • No more empty boxes. A font embedded as a subset holds only the letters the template used. Seshat now checks the font itself before it writes a name: the template's own font when it has every letter, else the same font from the library (now including DejaVu Sans, Serif and Mono), else a clear report with the missing letters. A copy is only marked done when it prints.
  • Names stay centred. With align: 'center', the middle of each filled text stays where the placeholder's middle was, so a long or short name sits right on a centred certificate. 'right' keeps the end. It works for the whole job, per row item, and on the replace_text fix.
  • Faster, and merged files stay small. Every placeholder of a copy is now filled in one pass over the file, and the template's fonts are read once for all copies. Copies merged into one PDF now share the template's pictures and fonts: 250 copies of a 4 MB diploma make a 4 MB file instead of about a gigabyte. In our tests, 300 copies of such a diploma take about 20 seconds as a ZIP. A ZIP is closed sooner when it reaches about 50 MB, so large templates come in more, smaller files.
  • File names in plain letters. name_by writes Łukasz as Lukasz, Yılmaz as Yilmaz and Greek and Cyrillic names in Latin letters, so every system can open the ZIP.
  • The real font size. textPositions gives the size text prints at, also when a file sets it at size 1 and scales it.

Charges

replace_text that finds nothing to change is no longer charged. A job's answer now shows what it cost in meta.cost_usd when you poll it.

Update to rekhu/core 0.8.0 for Laravel or @rekhu/core 0.8.0 for Node to use align. Examples are on the Seshat docs.

Share LinkedIn X

Related

More on the same topics

Try Rekhu Builder on your site

Create a free account, connect a site, drop in a template. Converting is free; only the chat draws from the credit.