Issue 127849 - OpenOffice Writer starting from 4.1.2 fails to export to PDF some characters written with URW Palladio L font
Summary: OpenOffice Writer starting from 4.1.2 fails to export to PDF some characters ...
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: save-export (show other issues)
Version: 4.1.2
Hardware: PC Linux, all
: P5 (lowest) Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2018-08-13 17:43 UTC by c.kruk
Modified: 2018-08-23 11:43 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.1.5
Developer Difficulty: ---


Attachments
Invalid PDF file exported from OpenOffice Writer 4.1.2 (519.73 KB, application/pdf)
2018-08-13 17:43 UTC, c.kruk
no flags Details
Valid PDF file exported from OpenOffice Writer 4.1.1 (519.63 KB, application/pdf)
2018-08-13 20:26 UTC, c.kruk
no flags Details
Source ODT file using URW Paladio L font (15.58 KB, application/vnd.oasis.opendocument.text)
2018-08-13 20:26 UTC, c.kruk
no flags Details
Invalid PDF file exported from OpenOffice Writer 4.1.5 (519.73 KB, application/pdf)
2018-08-20 10:51 UTC, c.kruk
no flags Details
Animated GIF (289.37 KB, image/gif)
2018-08-20 14:25 UTC, oooforum (fr)
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description c.kruk 2018-08-13 17:43:42 UTC
Created attachment 86483 [details]
Invalid PDF file exported from OpenOffice Writer 4.1.2

At least OpenOffice Writer 4.1.2 and 4.1.5 fail to export to PDF some characters written with Type1 URW Palladio L font provided with ghostscript-fonts-std package. This problem does not appear in OpenOffice Writer 4.1.1. 

The affected characters are at least: Polish L and l stroke (Ł and ł), French AE and ae ligatures (Æ and æ), English opening quotation mark (“), Polish opening quotation mark („), English and Polish closing quotation mark (”), n-dash (–), and apostrophe (').

Since Bugzilla allows to attach just one file I am attaching invalid PDF file exported from OpenOffice Writer 4.1.2.
Comment 1 c.kruk 2018-08-13 17:46:19 UTC
Valid text in PDF file should look like:

oŁołoÆoæo“o„o”o–o'o
Comment 2 Keith N. McKenna 2018-08-13 19:52:47 UTC
(In reply to c.kruk from comment #0)
> Created attachment 86483 [details]
> Invalid PDF file exported from OpenOffice Writer 4.1.2
> 
> At least OpenOffice Writer 4.1.2 and 4.1.5 fail to export to PDF some
> characters written with Type1 URW Palladio L font provided with
> ghostscript-fonts-std package. This problem does not appear in OpenOffice
> Writer 4.1.1. 
> 
> The affected characters are at least: Polish L and l stroke (Ł and ł),
> French AE and ae ligatures (Æ and æ), English opening quotation mark (“),
> Polish opening quotation mark („), English and Polish closing quotation mark
> (”), n-dash (–), and apostrophe (').
> 
> Since Bugzilla allows to attach just one file I am attaching invalid PDF
> file exported from OpenOffice Writer 4.1.2.

You can attach more than one document to an issue, you just have to do each with a separate command. If you could attach the odt file that was used to generate export of the PDF you attached it would be appreciated.
Comment 3 c.kruk 2018-08-13 20:26:02 UTC
Created attachment 86484 [details]
Valid PDF file exported from OpenOffice Writer 4.1.1
Comment 4 c.kruk 2018-08-13 20:26:50 UTC
Created attachment 86485 [details]
Source ODT file using URW Paladio L font
Comment 5 c.kruk 2018-08-13 20:30:13 UTC
I can also attach ZIP file including URW Palladio L font if it will be useful:

p052003l.afm
p052003l.pfb
p052004l.afm
p052004l.pfb
p052023l.afm
p052023l.pfb
p052024l.afm
p052024l.pfb
s050000l.afm
s050000l.pfb
Comment 6 oooforum (fr) 2018-08-20 09:57:17 UTC
Please add PDF file exported from OpenOffice 4.1.5 too
Comment 7 c.kruk 2018-08-20 10:51:28 UTC
Created attachment 86489 [details]
Invalid PDF file exported from OpenOffice Writer 4.1.5

PDF file exported from version 4.1.5 is exactly the same as exported from version 4.1.2. I attached both PDFs.
Comment 8 oooforum (fr) 2018-08-20 14:25:21 UTC
Created attachment 86490 [details]
Animated GIF

I was not able to reproduce with AOO 4.1.5 and Win7
PDF displays URW Palladio L font as expected
Comment 9 c.kruk 2018-08-20 17:04:26 UTC
I use Slackware Linux 14.2 with OpenOffice converted to Slackware format from the following packages:

Apache_OpenOffice_4.1.1_Linux_x86_install-rpm_en-US.tar.gz
Apache_OpenOffice_4.1.2_Linux_x86_install-rpm_en-US.tar.gz
Apache_OpenOffice_4.1.5_Linux_x86_install-rpm_en-US.tar.gz

I believe someone here uses some Linux and could try to reproduce this using OpenOffice installed from the mentioned packages.
Comment 10 c.kruk 2018-08-21 09:27:48 UTC
oooforum (fr),

you attached a screenshot of OpenOffice Writer with opened my attachment. OpenOffice Writer displays URW Palladio L font well. The problem appears in exported PDF files. So you have to export this document to PDF using OpenOffice 4.1.2 or later and then inspect this PDF file.
Comment 11 c.kruk 2018-08-21 10:19:57 UTC
oooforum (fr),

I overlooked that you attached an animated GIF and inspected just the first frame. Now I see that OpenOffice for Windows exports Writer files using URW Palladio L font to PDF files well. So the problem concerning exporting to PDF files occurs in Linux version of OpenOffice but it does not affect Windows version.
Comment 12 Matthias Seidel 2018-08-21 10:41:51 UTC
Confirmed on Ubuntu 16.04.5 64-bit.

"URW Palladio L" is a Postscript Type 1 font (at least on Linux), using a Truetype font results in correct export.
Comment 13 c.kruk 2018-08-21 11:38:37 UTC
Matthias Seidel,

well, I mentioned that this problem concerns Type1 version of URW Palladio L font in the very first post. 

Now I followed your tip:

1. I converted Type1 version of URW Palladio L font to TrueType one using FontForge.

2. I removed from the system Type1 version and installed TrueType one.

3. I tested custom TrueType URW Palladio L font with all mentioned OpenOffice versions.

Result: In each case OpenOffice Writer exported URW Palladio L font to PFD files well.

So Linux users should use TrueType version of this font instead of Type1 one.

Thank you very much for this tip.

Problem solved.
Comment 14 Matthias Seidel 2018-08-21 11:50:25 UTC
You may have found a workaround, but the problem isn't solved... ;-)
Comment 15 Matthias Seidel 2018-08-21 11:55:58 UTC
Further tests with AOO 4.1.1 on Ubuntu 16.04 32-bit shows correct export as PDF.

So this is a regression with Postscript fonts.
Comment 16 c.kruk 2018-08-21 12:46:52 UTC
Matthias Seidel,

you are right: my problem is solved -- OpenOffice problem is not. OpenOffice Writer supported Type1 URW Paladio L font well up to version 4.1.1 but starting from version 4.1.2 it started to produce bad results in PDF files. The font did not change. The ghostscript-fonts-std package provides the same font since 2002. So something changed in OpenOffice.

Anyway, thank you very much once again for your tip.
Comment 17 Matthias Seidel 2018-08-21 12:51:51 UTC
You're welcome.
Great that we found a way for you.

There was a code change between 4.1.1 and 4.1.2:
https://bz.apache.org/ooo/show_bug.cgi?id=126883#c13

Hopefully a programmer can take over!?
Comment 18 c.kruk 2018-08-23 11:33:04 UTC
I checked valid and invalid PDFs using pdffonts program. They differ in encoding. Valid ones use Builtin encoding while invalid ones use WinAnsi one. It seems I found the culprit.

$ pdffonts URW_Palladio_L-OpenOffice_4.1.1.pdf 
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
URWPalladioL-Bold                    Type 1            Builtin          yes no  yes     19  0
URWPalladioL-Roma                    Type 1            Builtin          yes no  yes     24  0
URWPalladioL-Ital                    Type 1            Builtin          yes no  yes      9  0
URWPalladioL-BoldItal                Type 1            Builtin          yes no  yes     14  0

$ pdffonts URW_Palladio_L-OpenOffice_4.1.2.pdf 
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
URWPalladioL-Bold                    Type 1            WinAnsi          yes no  yes     19  0
URWPalladioL-Roma                    Type 1            WinAnsi          yes no  yes     24  0
URWPalladioL-Ital                    Type 1            WinAnsi          yes no  yes      9  0
URWPalladioL-BoldItal                Type 1            WinAnsi          yes no  yes     14  0

$ pdffonts URW_Palladio_L-OpenOffice_4.1.5.pdf 
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
URWPalladioL-Bold                    Type 1            WinAnsi          yes no  yes     19  0
URWPalladioL-Roma                    Type 1            WinAnsi          yes no  yes     24  0
URWPalladioL-Ital                    Type 1            WinAnsi          yes no  yes      9  0
URWPalladioL-BoldItal                Type 1            WinAnsi          yes no  yes     14  0
Comment 19 c.kruk 2018-08-23 11:43:41 UTC
Here is the output of pdffonts program for PDF file exported from OpenOffice Writer 4.1.5 using URW Palladio L font which I converted from Type1 to TrueType. It uses WinAnsi encoding, has set `yes' flag for subset, and differs in the number of included objects. 

$ pdffonts URW_Palladio_L-Type1-to-TrueType.pdf 
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
BAAAAA+URWPalladioL-Bold             TrueType          WinAnsi          yes yes yes     14  0
CAAAAA+URWPalladioL-Roma             TrueType          WinAnsi          yes yes yes      9  0
DAAAAA+URWPalladioL-Ital             TrueType          WinAnsi          yes yes yes     19  0
EAAAAA+URWPalladioL-BoldItal         TrueType          WinAnsi          yes yes yes     24  0