Fonts problem with OpenOffice + jodconverter

829 Views Asked by At

I´m using staroffice9 as service in a Solaris. With a Java aplication, with jodconverter-2.2.2, trying to convert a doc into a PDF, the PDF generated shows with wrong chars, and seems Fonts are not included. Opening with Adobe Reader, it say "Fonts not found..."

Reading PDF with text editor:

% CreateFontSubset failed for font "Arial" weight=5
% CreateFontSubset failed for font "Arial" italic weight=5
% CreateFontSubset failed for font "Arial" weight=8
% CreateFontSubset failed for font "Times New Roman" weight=5
% CreateFontSubset failed for font "Times New Roman" italic weight=5
% CreateFontSubset failed for font "Times New Roman" weight=8
% CreateFontSubset failed for font "Arial Narrow MT" weight=5
% CreateFontSubset failed for font "Arial Narrow MT" weight=8
% CreateFontSubset failed for font "Arial" italic weight=8

In my machine, fonts seems installed:

[xxxxxxxxxx ~]$ fc-list | grep Arial
Arial:style=Regular
Arial Hebrew:style=Regular
Arial Hebrew:style=Bold Italic
Arial:style=Bold Italic
Arial Narrow MT:style=Italic
Arial Narrow MT:style=Bold
Arial Narrow MT:style=Bold Italic
Arial Hebrew:style=Bold
Arial:style=Italic
Arial Hebrew:style=Italic
Arial Narrow MT:style=Regular
Arial:style=Bold

The question is, where staroffice9 service search for the Fonts resources? I tought was from system.

2

There are 2 best solutions below

0
On BEST ANSWER

The problem was I had an old installation of OpenOffice and the temp files didn´t have deleted.

In my case, with user oracle, the temp files were in: /export/home/oracle/.staroffice

I deleted the old folder (.staroffice), restarted the service and itself created a new .staroffice folder.

Now, works properly.

0
On

I order to provide MS font support in JodConverter I installed ttf-mscorefonts-installer

RUN apt-get update && apt-get install -y wget
RUN wget http://ftp.us.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.6_all.deb
RUN apt-get install -y -f /ttf-mscorefonts-installer_3.6_all.deb

I build a production-ready example for JodConverter with docker support

for more info, you can check https://github.com/dupinder/document-pdf-converter