Bug 137128 - FILEOPEN PDF Differences in imported text
Summary: FILEOPEN PDF Differences in imported text
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: medium normal
Assignee: Kevin Suo
URL:
Whiteboard: target:7.4.0 target:7.3.1
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-29 14:20 UTC by solar020
Modified: 2022-04-03 15:06 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
original file with no bugs (4.72 MB, application/pdf)
2020-09-29 14:20 UTC, solar020
Details

Note You need to log in before you can comment on or make changes to this bug.
Description solar020 2020-09-29 14:20:26 UTC
Created attachment 165948 [details]
original file with no bugs

open file "LX2160AFS.pdf" on LibreOfficeDraw - is different from original and the best way to check that is to export it again as pdf. 

Now you only have to do File -> Export as PDF...

to check visible differences!

As attachments I put the original "LX2160AFS.pdf".

Thanks
Comment 1 Buovjaga 2021-07-26 16:43:49 UTC
Can you explain the differences you see?

All that I can see can be explained by differences caused by font substitution. The bullets for me are substituted by squares, while the original font is supposed to be Wingdings3. The text uses various styles of the free Avenir LT Std font. I tried installing Black and Heavy from https://github.com/probono/brand/tree/master/fonts/Avenir%20LT%20Std but somehow the font names are not matched properly.

Do you have these fonts installed? Are you seeing the font names in italics (substituted) in LibreOffice?
Comment 2 QA Administrators 2022-01-23 03:43:49 UTC Comment hidden (obsolete)
Comment 3 Timur 2022-01-26 09:00:26 UTC
Hi Kevin. Can you please see this bug, since you worked on bug 143959.
Here, title doesn't read AvenirLTStd-Heavy although it's embedded. 
If a duplicate of bug 82163 or some other, please mark.

Another issue is that text box "LAYERSCAPE LX2160A BLOCK DIAGRAM" is duplicated on page 2. Could be a bug 104770.
Comment 4 Kevin Suo 2022-01-29 13:47:23 UTC
Yes, I can try to fix the font name issue.

Yes, the duplicate of text box "LAYERSCAPE LX2160A BLOCK DIAGRAM" should be a duplicate of bug 104770.
Comment 5 Kevin Suo 2022-01-29 13:51:29 UTC
https://gerrit.libreoffice.org/c/core/+/129136
Comment 6 Commit Notification 2022-02-04 06:44:38 UTC
Kevin Suo committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/bcf10015c5d12d363d0be9f6da25092c83112692

sdext.pdfimport tdf#137128: Recognize more font name and weight...

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Timur 2022-02-04 13:37:28 UTC Comment hidden (obsolete)
Comment 8 Kevin Suo 2022-02-04 13:42:11 UTC
The font name issue us now fixed on master. Backport to 7.3 branch is in gerrit.
Comment 9 Timur 2022-02-04 13:52:22 UTC
(In reply to Timur from comment #7)
> Surpise, regression, no repro 4.0, repro 4.1, seen in 41max.
That was for reading font Avenir. But no regression, it's just source-hash-0376a4c13ccffa64c938c6361a337264ad8f2b67:
    if a font is not available, show its name in italic in the font combo

So font is an old bug from LO 3.3. In OO 3.3 PDF didn't open.
Comment 10 Commit Notification 2022-02-08 10:53:40 UTC
Kevin Suo committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/bb5a8696dc85723e324d1201acd3f68c32220e24

sdext.pdfimport tdf#137128: Recognize more font name and weight...

It will be available in 7.3.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Timur 2022-02-08 11:19:36 UTC
(In reply to Kevin Suo from comment #8)
> The font name issue us now fixed on master. 

I do not see this fixed, tested Win and Lin.  
Before, font was seen as italic AvenirLTStd-Heavy and now as italic AvenirLTStd.
Please explain.
Comment 12 Kevin Suo 2022-02-08 13:12:26 UTC
(In reply to Timur from comment #11)
Do you have the proper fonts installed when testing?

Heavy is a font style. It is handled by the font-weight. If you have the font intalled and see the rendering the same as in PDF Reader, then it is OK.
Comment 13 Timur 2022-02-08 13:31:52 UTC
I don't have fonts installed. But fonts are embedded in PDF and should be used.
Comment 14 Kevin Suo 2022-02-08 13:39:44 UTC
Draw currently (and will not in my opinion) use the embeded fonts in pdf, especially if the embeded font is just a subset of a full fuctioning font. See bug 85295. It uses the system font choosen by the font names as indicated in pdf pages.

"Draw is not a pdf reader".
Comment 15 Timur 2022-02-28 14:06:17 UTC
Thanks for explanation. I do not understand it really. But I see often reports, where submitters are surely not satisfied with any explanation that keeps wrong look. 
I understand that bug may remain open for decades but I don't understand why that is WontFix. 
As for this bug, you may close, I may continue discussion there.
Comment 16 Kevin Suo 2022-04-03 15:06:21 UTC
(In reply to Timur from comment #15)
I worked to resolved the issue in this bug report related to the difference of font when open the pdf with draw. This was done by choosing the right font name and style.

For the support of embeded font, please keep track of bug 85295. But in my opinion it is difficult as mentioned in bug 85295 in pdf if only a subset of font is embeded the lo is not possible to use that font for editing.