[Solved] Exported PDF / Typographic Ligatures / "fi", "fl"

Discuss the word processor
Post Reply
d3fin3d
Posts: 2
Joined: Tue Sep 19, 2017 6:00 pm

[Solved] Exported PDF / Typographic Ligatures / "fi", "fl"

Post by d3fin3d »

Hey all,

I'm currently type setting a book and I've been experiencing an issue with the way ligatures - "fi"'s, "fl"'s - within spacious justified lines are rendered with OpenOffice's PDF export function.

Here's an example of what's happening:
  • Within OpenOffice's Writer, ligatures look fine and are rendered correctly:
    24pNXKT.png
  • However, within a PDF export, ligatures are rendered very close together and look really bad - unprintable:
    d1ICzMf.png
From what I've been able to understand through various searches, this issue appears to be directly related to the way OpnOffice's native PDF export function behaves/renders ligatures.

The problem is only apparent within spacious justified lines and only with certain ligatures, but particularly "fi" and "fl" as screenshotted above.

Instead of exporting as PDF, I have tried going to File/Print/Save as PDF and this solves the poor ligature formatting issue, however is seems to be almost impossible to save the document with the correct book dimensions and margins using this method!

So, considering all of this, I have a few questions:

1. Does OpenOffice have a function to completely disable the use of ligatures within a document or PDF export?
2. If not, perhaps this sort of feature could be considered?
3. Do you guys know of a way to export a PDF with the correct dimensions/margins as handled by OO, but without ligature formatting and/or with correct ligature formatting?

I am aware of people using Adobe Acrobat to export documents, but I'm unsure of the steps involved here and I'd really like to avoid moving away from my already formatting OO document!

Any help would be great here!

Thanks!
Last edited by d3fin3d on Wed Sep 20, 2017 2:35 am, edited 3 times in total.
OpenOffice 4.1.3 / Mac OS 10.11.1
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Issue] Exported PDF / Typographic Ligatures / "fi", "fl

Post by RoryOF »

How are you getting the ligatures in OpenOffice? I advise using Find and Replace to find the ligatures - there are not that many - and replacing them with separate letters. Then OpenOffice Export as PDF will not substitute them.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Issue] Exported PDF / Typographic Ligatures / "fi", "fl

Post by John_Ha »

See PDF export bug(s)? (on Mac) and especially this post. Mac seems to create different PDF files with the icon and with File > Export - one has ligatures, the other doesn't.

Search the forum with ligature mac.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Issue] Exported PDF / Typographic Ligatures / "fi", "fl

Post by acknak »

Are you still using OO 4.0.1? That version is getting rather stale. There have been some important changes since that version was released, although I can't say that any will impact on this issue.
Instead of exporting as PDF, I have tried going to File/Print/Save as PDF and this solves the poor ligature formatting issue
I don't know how this would be any different—in fact, I don't even see this option with OO on Linux. The File > Export as PDF pathway has always been best/most reliable for me.

I've settled on using a font that supports ligatures. I never have to give it a second thought; it seems to just work. I enter only normal characters, which OO Writer stores in the file, but it displays the ligature forms on screen and in the exported PDF.

I'll try to play with your test text a bit and see if I encounter any problems.
AOO4/LO5 • Linux • Fedora 23
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Issue] Exported PDF / Typographic Ligatures / "fi", "fl

Post by John_Ha »

Instead of exporting as PDF, I have tried going to File/Print/Save as PDF and this solves the poor ligature formatting issue
Check the versions of the created PDFs and you will see they are different. See PDF export bug(s)? (on Mac) and especially this post quoted below. Mac seems to create different PDF files with the icon and with File > Export - one has ligatures, the other doesn't.
it appears that Apple Mac AOO Export to PDF creates a PDF v1.4, whereas print to PDF creates a PDF v1.3 ... AOO 4.1.0 for Windows uses PDF 1.4 for all PDFs (ie those created by File > Export; File > Export as PDF; and the Export directly as PDF icon on the toolbar.
If this solves the problem, please view your first post in this thread and click the Edit button (top right in the post) and add [Solved] in front of the subject.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
d3fin3d
Posts: 2
Joined: Tue Sep 19, 2017 6:00 pm

Re: Exported PDF / Typographic Ligatures / "fi", "fl"

Post by d3fin3d »

Thanks so much for all of your replies.

I can confirm that updating from 4.0.1 to 4.1.3 solved the PDF export ligature render issue!

Marked as solved.

Many thanks for your replies!
OpenOffice 4.1.3 / Mac OS 10.11.1
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: [Solved] Exported PDF / Typographic Ligatures / "fi", "f

Post by Zizi64 »

I can confirm that updating from 4.0.1 to 4.1.3 solved the PDF export ligature render issue!

...
OpenOffice 4.0.1 / Mac OS 10.11.1
Please update your signature in this Forum.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Solved] Exported PDF / Typographic Ligatures / "fi", "f

Post by acknak »

AOO4/LO5 • Linux • Fedora 23
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] Exported PDF / Typographic Ligatures / "fi", "f

Post by John_Ha »

Be aware that if you use ligatures in a PDF, readers such as Adobe Reader will not search properly. For example, the word "stiff" is spelt as "s - t - i - f - f" without ligatures, and is found by "stiff". It is spelt as "s - t - %" with ligatures, where % represents the " iff " ligature and searching for "stiff" will not find it. I think this may be the reason that Mac AOO offers the user the option of choosing between ligatures or no ligatures.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Solved] Exported PDF / Typographic Ligatures / "fi", "f

Post by acknak »

John_Ha wrote:Be aware that if you use ligatures in a PDF, readers such as Adobe Reader will not search properly. ...
Searching in this pdf works for me. Does it not work in Reader?

Adobe Reader (v9 something) running under linux finds the ligatures if one types the separate characters.
Attachments
ligature_test_llg.pdf
(19.88 KiB) Downloaded 164 times
AOO4/LO5 • Linux • Fedora 23
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] Exported PDF / Typographic Ligatures / "fi", "f

Post by John_Ha »

acknak

That is interesting as Adobe Reader now finds the ligatures.

I tested it a few years ago in the post I pointed to and they weren't found. I can only think that Adobe Reader has been upgraded as it wasn't just me - for example, see Acrobat can't find some ligatures in pdf output.

Re: PDF export bug(s)? says
There are a number of reasons why creating PDF via distillation of PostScript from InDesign is a very bad idea.

You've just stumbled upon one such reason! The PostScipt generated from InDesign is optimized for printing and not for generation of PDF. When you use ligatures, you lose the ability to search for most content using ligatures in Acrobat or Reader. When creating PDF via direct export, PDFalternate text information is inserted in the PDF such that ligatures, small caps, alternate characters, etc. that you typically find in fine typography don't interfere with the ability to search PDF files.

Quite frankly, the only rational reason that we know of for creating PDF from distillation of PostScript from InDesign is to create smaller PDF files in some instances. However, improvements in direct creation of PDF from InDesign have been narrowing that sometimes-advantage over the releases and some fixes in the next full version of InDesign should eliminate much of the remaining bloat (which is primarily metadata).

CS3 is also quite frankly a fairly old version of the software.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Solved] Exported PDF / Typographic Ligatures / "fi", "f

Post by acknak »

I'm afraid I can't explain it except that, as I understand, the ligatures are a feature of the font, not of characters in the text. Somehow the font knows how to display the ligature glyphs in place of the character sequences. So the actual text in the document is just regular characters. The font is Linux LIbertine G (for "Graphite").
AOO4/LO5 • Linux • Fedora 23
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] Exported PDF / Typographic Ligatures / "fi", "f

Post by John_Ha »

acknak wrote:I'm afraid I can't explain it except that, as I understand, the ligatures are a feature of the font, not of characters in the text. Somehow the font knows how to display the ligature glyphs in place of the character sequences. So the actual text in the document is just regular characters. The font is Linux LIbertine G (for "Graphite").
acknak

I think you are correct and my comments above, and the quoted comment above, about spell checking must be wrong (even though I am 99% certain that I did the test in 2014!!).

See font-variant-ligatures where Mozilla seems to be saying that Firefox can be configured to use, or not to use, ligatures to display the text it is showing. I read that as what you are saying - the base text is "not ligatured" but, if Firefox is set to use ligatures, then Firefox will display appropriate characters as ligatures.

I too am confused, especially as I am (99%) certain that, in 2014, the Mac created a PDF with ligatures by one method, and without ligatures the other way. But when I now (2017) view the PDF's which were posted here in 2014, both now show ligatures. :crazy:
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] Exported PDF / Typographic Ligatures / "fi", "f

Post by John_Ha »

John_Ha wrote:I think you are correct and my comments above, and the quoted comment above, about spell checking must be wrong (even though I am 99% certain that I did the test in 2014!!).
My 99% certain that I did a test was correct.

See the attached files from the post, where the user was on a Mac and one was created by File > Export as PDF; and one was created by clicking the Save as PDF icon.

Open the files in Adobe Reader. Go Edit > Advanced search ..., and search with floating which can be found in paragraph 4 in Introduction with " fl " as a ligature. Note that when I select " fl ", I can only select "both characters as a single unit", strongly suggesting that the ligature itself is saved in the PDF. When I copy " fl " and paste it into Writer, it appears as two separate characters. Note the PDFs were created on a Mac in 2014 and creating different PDF files seems to be a "Mac feature" - Windows does not create different PDF files.

"floating" is found in YAH sample save_as_pdf.pdf but "floating" is not found in YAH sample export_as_pdf.pdf.

I am now more confused than before ... :knock:
Attachments
YAH sample export_as_pdf.pdf
PDF created on a Mac with File > Export as PDF
(98.5 KiB) Downloaded 142 times
YAH sample save_as_pdf.pdf
PDF created on a Mac with save as PDF icon
(85.02 KiB) Downloaded 140 times
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] Exported PDF / Typographic Ligatures / "fi", "f

Post by John_Ha »

The PDF properties are as below:
PDF created by File &gt; Export as PDF ... on Mac<br />Note it is PDF v1.4 and is created by OO 3.4
PDF created by File > Export as PDF ... on Mac
Note it is PDF v1.4 and is created by OO 3.4
PDF created by Save as PDF icon on Mac - or was a Virtual PDF printer used????<br />Note it is PDF v1.3 and is produced by Mac OS Quartz PDFContext
PDF created by Save as PDF icon on Mac - or was a Virtual PDF printer used????
Note it is PDF v1.3 and is produced by Mac OS Quartz PDFContext
Apple's Overview of Quartz 2D says Quartz 2D is a feature of Mac OS which can be called by any application and can be used to create a PDF file. Perhaps AOO on Mac uses its own PDF creator for File > Export as PDF ...; but uses Quartz 2D for the Save as PDF ..., icon.
Quartz 2D is a two-dimensional drawing engine accessible in the iOS environment and from all Mac OS X application environments outside of the kernel.

You can use the Quartz 2D application programming interface (API) to gain access to features such as path-based drawing, painting with transparency, shading, drawing shadows, transparency layers, color management, anti-aliased rendering, PDF document generation, and PDF metadata access.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Post Reply