Ask Your Question
0

pdf form: embed font for fill-ins

asked 2016-12-13 19:07:23 +0200

jice gravatar image

updated 2016-12-13 21:13:34 +0200

Hi

I have a form designed in writer with code128 font (bar codes) for some fill-ins.

Once the pdf is generated it works well on the machine it has been generated on.

But on other machines where the code128 font is not installed, it does not.

This is because the code128 font does not get embedded within the pdf form.

Is there a way to have this font embedded, or should I fill an enhancement request?

Regards

JC

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2016-12-13 19:46:50 +0200

LibreTraining gravatar image

There is a setting to embed the fonts in the File menu.

File > Properties > Font (tab) > Embed fonts in the document (check box)

Is that setting checked?

edit flag offensive delete link more

Comments

Yes it is. AFAIK this setting is to embed the font in the odt file, not the pdf file.

jice gravatar imagejice ( 2016-12-13 21:11:52 +0200 )edit

I have seen this setting mentioned also in regards to PDFs.

Is the font actually in use in the form? Are there visible characters in use. Or is the font simply assigned.

I am wondering if it is not actually in use so it is not exported.

Can you attach the file or make it available for download?

LibreTraining gravatar imageLibreTraining ( 2016-12-13 22:25:38 +0200 )edit

Hmmmm ... font files have a property in the metadata which controls Embedding.

I just downloaded Code 128 form Dafont.com and that TTF file has no metadata at all.

I wonder if LibreOffice interprets this as Not-Embed-able?

We can test this by adding the proper metadata.

LibreTraining gravatar imageLibreTraining ( 2016-12-13 22:37:15 +0200 )edit

No, code128 does not display on the document, it is only used by the fill-in. As such all the font (not a subset of it) should be embedded in the exported pdf file. I join a sample and the pdf. I tried with other fonts for fill-ins and they never get embedded in the pdf file. Of course if I display some characters from that font in the pdf, then a subset of the font is embedded. There are 2 pdf objects created: on for the font subset, one for the fill-in (but without the font file itself).

jice gravatar imagejice ( 2016-12-15 14:14:01 +0200 )edit

See: http://jice.free.fr/asklo/code128.odt and http://jice.free.fr/asklo/code128.pdf (only the fill-in), or http://jice.free.fr/asklo/test128.odt & http://jice.free.fr/asklo/test128.pdf (fill-in plus some characters displayed using the same font).

jice gravatar imagejice ( 2016-12-15 14:29:26 +0200 )edit
jice gravatar imagejice ( 2016-12-15 14:33:50 +0200 )edit

I finally got the source code and can see that the font is exported without the font stream (i.e. the font file). Which is not correct, as the font is not among the base14 fonts and as such must be embedded. (By the way, not embedding the base14 fonts is not recommended anymore as per the pdf specification.) Will investigate more.

jice gravatar imagejice ( 2016-12-20 11:35:28 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-12-13 19:07:23 +0200

Seen: 410 times

Last updated: Dec 13 '16