font in text box field not exported to PDF

asked 2021-02-22 23:39:48 +0100

bc131 gravatar image

updated 2021-02-23 06:47:08 +0100

I am trying to create a PDF form that uses the font of my choice for a text box entry field. (The idea is that for just one text box, I want to use a font that looks like handwriting, for an electronic signature, while the rest of the text boxes use a typical highly legible font. Mind, that is an electronic signature, not a digital signature.) The user's input into the PDF form should appear in the font I chose. Seems to work correctly inside Writer, but when I export to PDF, the font is some default system font.

I guess this is a bug. But maybe, this can't be done in a PDF? Or that the Font option in the "Properties: Text Box" dialog is for the labels, if any, and not the user's input? Or could it be that the PDF readers are doing the font substitution? No problem setting the font to anything I like for the label of a checkbox.

I have upgraded to LibreOffice Am still running into an occasional problem with "export to PDF" leaving out the fonts. This is on Lubuntu 18.04 and Linux Mint 20.1

edit retag flag offensive close merge delete


I did some more checking. Yes, PDF does support different fonts in different text entry fields, and Adobe Acrobat DC can change those fonts. And PDF readers such as Okular and Evince can display the text entered in these fields in the correct fonts. So this inability to set the font for a text box is either a limitation or a bug in LibreOffice.

bc131 gravatar imagebc131 ( 2021-02-24 02:34:31 +0100 )edit

What happens when you click outside of a text box after entering text into a PDF form's text box?

Astur gravatar imageAstur ( 2021-02-27 22:15:21 +0100 )edit

Astur: depends on the PDF reader. For PDF forms, Okular has 2 modes, a "show forms" and a "hide forms" mode. The user can enter text when in "show forms" mode. None of the text in the entry fields will be in the font specified in the PDF, it is some default system or application font. When the user switches to "Hide forms", Okular displays all entered text in the correct font and at the correct size.

Other PDF readers have similar behavior, without being quite so explicit about having 2 modes. The way they seem to work is that they use a default font for the one field in which the user can be entering text, while using the font specified in the PDF for all other text entry fields.

bc131 gravatar imagebc131 ( 2021-03-04 20:10:59 +0100 )edit