We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question

Why different fonts are embedded when exporting to pdf?

asked 2019-09-13 18:46:56 +0200

davidem gravatar image

updated 2021-05-31 09:44:55 +0200

Alex Kemp gravatar image

Hi, I'm using a compiled version of LibreOffice to convert .docx files into PDFs. The problem I'm facing is that PDF files generated from the same document on different machines show different embedded fonts. The specific file contains only "Times New Roman" text, but the PDF generated on one machine has fonts from the Liberation font family embedded, while the one generated on the other machine has DejaVu fonts embedded. The original file looks identical when opened on the two machines, but the converted PDFs look different. I tried playing with the "EmbedFonts" and "Export Standard Fonts" flags without success. Am I missing something?

edit retag flag offensive close merge delete


It's just a hint, no question: How to open files from MS-Office 2007 or 2010 (.DOCX, .XLSX,...)? - last heading.

  • How was the font "Times New Roman" set, via hard formatting or with style sheet?
  • If you used a style sheet, all the text was previously marked and removed using the Format>Delete Direct Formatting menu bevor?
ebot gravatar imageebot ( 2019-09-14 08:11:57 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2019-09-24 10:16:56 +0200

davidem gravatar image

I finally solved my own issues: basically the problem was related to the fact that fonts were not part of the deploy, so LibreOffice ended up silently replacing the ones referenced in the document with whichever font was installed in the system. The solution was to embed the fonts coming with the LibreOffice installation in the deploy package and to replace the HOME environment variable so to point to them. Though, it's still a mystery to me why the original document looked the same on the two machines while the output PDFs were different. My guess is that LibreOffice uses different criteria to pick up the font in the two cases.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools



Asked: 2019-09-13 18:46:56 +0200

Seen: 1,381 times

Last updated: Sep 24 '19