« All about EndOfLine | Home | Cyber Weekend Deals »

Save Records as PDF oddities with FileMaker Server on Linux

Today we looked into things for saving PDFs on server when using FileMaker Server for Linux.

First you need to know that whenever PDF creation fails, it seems to always return error 800. That is not helpful as the error is not about creating the file itself, but about assembling the PDF before writing it.

For example if you have a smiley 😀 in the text, you may see FileMaker on macOS ignore it. The smiley will be missing in saved PDF. But on Linux, we get an error 800 and PDF creation fails. Now you can use Text.FilterUTF16 function in our plugin to prepare all your texts and remove the emojis.

For the fonts itself, please be aware, that Linux comes with a different font list than macOS or Windows. And while you can install a Microsoft font package on Linux to get Arial, Wingdings and others, you may just relay on the font substitution done by the PDF engine in FileMaker on Linux. For example Arial will be converted to LiberationSans. Sadly font substitution doesn't work well for us and using Times or Capitals as fonts gives you error 800 again. Best may be to use PDF Standard Fonts.

We installed Jet Brains Mono font on the Linux machine by copying the font files into a new folder /usr/share/fonts/JetBrainsMono. Then we run the "fc-cache -f -v" command in Terminal to rebuild the font cache. Running "fc-list" shows the font list in Terminal. Once the font is installed and WebDirect noticed (we restarted the computer, but not sure whether it's required.), we successfully used the font for a label on a PDF created on the server.

You can use fonts on Linux for text, e.g. by evaluating TextFont ( "Hello" ; "Caladea" ). If you specify a font not available, it may fall back to the default font. Enjoy!

28 11 20 - 17:33