Hyphenation does not appear in PDF

I have a justified and hyphenated document that I am trying to export to PDF. When I do, the hyphens disappear. When I go to Print Preview, the hyphens are also not visible, even though the words have been broken up correctly. The hyphens appeared when I went through the Tools → Language → Hyphenation command. I need them to appear in the final document. How do I do this?

Thank you.

What happens if you change to a different font?
Try a few other fonts.

I have the same problem.
LibreOffice 24.8
OS: DEBIAN testing
Hyphenation in italian (working correctly, words are splitted in the right way), with text justified, but some hyphens are shown, some others are not shown…
I tried with different fonts, free/os and not free (for example: freeserif, times new roman, lora, free sans, arial…) .
I noticed that the hyphens not shown seem to be a liitle bit outside the right page margin…

Please don’t use Suggest a Solution unless it is answer; use a comment bubble instead.

If you place your cursor directly after one of the non-exporting hyphens and press Alt+X to convert it to Unicode, can you copy and paste the Unicode number here for inspection?

Otherwise, please create a small sample.odt with random text but with a non-exporting hyphens. Cheers, Al

I apologize, I didn’t see the correct button for answer… :pray:

However, I create an example .odt file, and exported it in pdf.

This is the result (file and pdf):
aaa2.odt (14.4 KB)
aaa2.pdf (18.4 KB)

If i place the cursor after the non exporting hyphen, the unicode chars seems to be the letter “s” lowercase ( U+0073 )

Thanks in advance!

I put here screenhots ( I can’t in the previous post…)
Thanks

odt:

and
pdf:

It seems to me that your file is corrupt in some way.
I copied the text, inserted in a new Writer file (unformatted), applied Italian language and justified. The hyphen remained within the text area. - See screenshot:





Exported as PDF file (aaa3.pdf) the hyphen displayed the same way as in the Writer file.


aaa3.pdf (11.9 KB)

Maybe the file is corrupt, but I created it just for uploading here… same results in all my files, old or new.
Some hyphens are shown into margins and appear in pdf, some less other wre shown outside margins and not in pdf (this occurs also in the same paragraph sometimes).
No matter the file extension (odt, docx, doc…)

I wanna try to test different hyphenation and page settings, for example 1cm of hyphen area and set the text distance 2 - 3 mm from border (internal…), in a bunch of old and new file, and than I can tell you more.

Thanks a lot!

Your file is probably no longer completely healthy due to the constant converting (.docx → .odt → .doc etc.).

I generally dislike the idea of “unhealthy documents”, including those created by file format conversion. There is nothing in the ODF standard, nor in the program design, that would tell “if it’s converted, or something, then we are OK to do some mysterious things”. Of course, the conversion may make some things more difficult: they may create thousands styles, apply all sorts of direct formatting, use not-widely-known features - but all that, while may make user’s life more difficult, and makes advises to avoid such conversions as much as possible useful, is not a license to make screen output different from PDF output in a confusing way. Everything used in a conversion, must still work in a predictable and well-defined way.

Things like this are simply bugs.

By the way, every case where we have to ask user to reset the profile, is also in that bug category; it’s true that often, it’s almost impossible to debug and fix, but it is a bug nevertheless, and as soon as there will appear a reproducible scenario, it becomes actionable.

2 Likes

So of course, this wasn’t “the same problem”, in a question asked initially in 2019; it was tdf#163720 (which I filed now), and is about the feature newly introduced in version 24.4.

As expected, it is not an “unhealthy” document - it’s a document using the new feature, that is “planned to be the default justification algorithm of the next major versions of LibreOffice”. Of course, since it’s not default yet, without explicitly enabling it, it’s impossible to reproduce the problem from scratch at the moment.

@RobotRabbitMan, @mrciccio84, Mikekaganski and all: Thanks for your bug reports, test documents and other feedback, now this has been fixed in LibreOffice, too: https://gerrit.libreoffice.org/c/core/+/176207

LibreOffice master will get this fix soon, and 24.8.4 (maybe 24.8.3) will get this fix, too.

More information: The problem resulted only with the transitional OOXML (now called as Word 2010–365 .docx) format, because this is the format, where MS Office uses its new space shrinking justification algorithm.

A possible workaround for LO 24.2 and later to save the document in Word 2007 format, but this means complete loss of the space shrinking interoperability, resulting different paragraph line count, page count etc., than in MSO 2010 and later (not mentioning the other possible differences in the layout).

Because the problem is related only to the single portion lines, it’s easy to fix the problem by adding an extra line portion to the line. Likely because of storing the hidden editing metadata RFIDs in hidden text portions, you don’t need to modify the format of the words (italic, underline, etc. or adding a text and format it as hidden text). It’s enough to insert a soft hyphen in a neutral position, e.g. in the end of a word inside the line by pressing Ctrl± or Insert->Formatting Mark->Soft Hyphen. Definitely this is not comfortable for longer text, so the suggested solution is updating for the next bug fix release.