Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

Problems after upgrading to Sierra or High Sierra? Try these steps
Problems after upgrading to NeoOffice 2017? Try these steps
Download or installation problems? Try these steps


Support
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


RSS Feeds
· Announcements Only
· All Posts


  
NeoOffice :: View topic - Problems with exported PDFs displayed with Adobe Reader
Problems with exported PDFs displayed with Adobe Reader
 
Post new topic   Reply to topic    NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
OmniMac
Red Pill


Joined: Jul 01, 2013
Posts: 6

PostPosted: Wed Jul 03, 2013 1:02 pm    Post subject: Problems with exported PDFs displayed with Adobe Reader Reply with quote

Summary:
I have some ODT files that NeoOffice cannot correctly export to PDF.
I noticed it about a week ago but I'm not really sure when it started.
The PDFs created by NeoOffice are correctly displayed by Preview but they show missed content when opened with Adobe Reader XI.
I'm attaching an example ODT file "Source file.odt" and the generated PDF file "Generated file.pdf" that exposes the issue.

Steps to reproduce:
1. Open the attached "Source file.odt" file.
2. Export to PDF by clicking on the toolbar button.
3. Open the generated PDF with Preview and Adobe Reader.

Software versions:
OS X Mountain Lion 10.8.4 (12E55)
NeoOffice 3.3 Patch 7
Adobe Reader 11.0.03

Regression:
The issue is not reproducible on OS X Lion 10.7.5 (that is, on Lion there are no problems with the generated PDF files).
Back to top
View user's profile Send private message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11805
Location: California, USA

PostPosted: Wed Jul 03, 2013 3:21 pm    Post subject: Re: Problems with exported PDFs displayed with Adobe Reader Reply with quote

OmniMac wrote:
The PDFs created by NeoOffice are correctly displayed by Preview but they show missed content when opened with Adobe Reader XI.


I suspect that the problem is that Adobe Acrobat cannot handle the some of the third-party fonts that you used in your document. You can see this by the fact what is missing when viewed in Adobe Acrobat is text that uses third-party fonts in your .odt document.

Since Apple's Preview application can render the text that uses your third-party fonts, it shows that NeoOffice is properly embedding your fonts in the PDF file. So, the problem is that Adobe Acrobat cannot load one or more of your third-party fonts.

To test my conclusion, can you open your .odt document in NeoOffice and select the File :: Print menu? In the native print dialog that appears, select the PDF :: Save as PDF option and then open the saved PDF in Adobe Acrobat. Does the same problem occur?

Patrick
Back to top
View user's profile Send private message Visit poster's website
OmniMac
Red Pill


Joined: Jul 01, 2013
Posts: 6

PostPosted: Wed Jul 03, 2013 5:07 pm    Post subject: Re: Problems with exported PDFs displayed with Adobe Reader Reply with quote

pluby wrote:
I suspect that the problem is that Adobe Acrobat cannot handle the some of the third-party fonts that you used in your document. You can see this by the fact what is missing when viewed in Adobe Acrobat is text that uses third-party fonts in your .odt document.

If this would be the case, I don't understand why if I copy the ODT file on a Mountain Lion system without the third party fonts installed and generate the PDF file with NeoOffice on that system, the resulting PDF still exposes the very same issue. The ODT file doesn't incorporate the third party fonts and thus I see them replaced by standard fonts, so why Adobe Reader still fails?

pluby wrote:
Since Apple's Preview application can render the text that uses your third-party fonts, it shows that NeoOffice is properly embedding your fonts in the PDF file. So, the problem is that Adobe Acrobat cannot load one or more of your third-party fonts.

It would seem so but it doesn't cope with the fact that if I generate the PDF on a Lion system and copy it on a Mountain Lion system, Adobe Reader on the ML system display the file without problems.
I made this test only starting from a Lion system without the third party fonts installed but I can repeat the test with the third party fonts installed, if needed.

pluby wrote:
To test my conclusion, can you open your .odt document in NeoOffice and select the File :: Print menu? In the native print dialog that appears, select the PDF :: Save as PDF option and then open the saved PDF in Adobe Acrobat. Does the same problem occur?

No, it doesn't, if the PDF is generated from the print menu Adobe Reader displays it without issues.
Back to top
View user's profile Send private message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11805
Location: California, USA

PostPosted: Wed Jul 03, 2013 5:22 pm    Post subject: Re: Problems with exported PDFs displayed with Adobe Reader Reply with quote

OmniMac wrote:
If this would be the case, I don't understand why if I copy the ODT file on a Mountain Lion system without the third party fonts installed and generate the PDF file with NeoOffice on that system, the resulting PDF still exposes the very same issue. The ODT file doesn't incorporate the third party fonts and thus I see them replaced by standard fonts, so why Adobe Reader still fails?


I cannot give you an answer as I cannot reproduce the issue that you see when I export your .odt file from on my Mac OS X 10.8 machine. Since I only have the fonts that Apple bundles with Mac OS X, it seemed that investigating was fonts as that is the one thing that is most likely to be different on different machines.

OmniMac wrote:
No, it doesn't, if the PDF is generated from the print menu Adobe Reader displays it without issues.


That is actually good news as it means that we might be able to change our export to PDF code. Can you create 2 new PDF files (one using the export to PDF feature and the other using the File :: Print menu) and attach both?

I will then uncompress the contents of both PDF files to see if I can find differences in the data. Once I know what, if any, differences there are between the 2 PDF files, I should being able to narrow the focus of our troubleshooting.

Patrick
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11805
Location: California, USA

PostPosted: Wed Jul 03, 2013 6:03 pm    Post subject: Re: Problems with exported PDFs displayed with Adobe Reader Reply with quote

pluby wrote:
That is actually good news as it means that we might be able to change our export to PDF code. Can you create 2 new PDF files (one using the export to PDF feature and the other using the File :: Print menu) and attach both?


Please ignore my request for new PDF files. By resaving your original PDF in Apple's Preview application, my newly saved PDF opens fine in Adobe Acrobat. So, I will uncompress your original and my newly saved PDF and analyze the PDFs to see if there are any differences.

Once I finish my analysis (most likely over the next day or two), I will post any news that I have.

Patrick
Back to top
View user's profile Send private message Visit poster's website
OmniMac
Red Pill


Joined: Jul 01, 2013
Posts: 6

PostPosted: Wed Jul 03, 2013 6:27 pm    Post subject: Re: Problems with exported PDFs displayed with Adobe Reader Reply with quote

pluby wrote:
I cannot give you an answer as I cannot reproduce the issue that you see when I export your .odt file from on my Mac OS X 10.8 machine. Since I only have the fonts that Apple bundles with Mac OS X, it seemed that investigating was fonts as that is the one thing that is most likely to be different on different machines.

This is very strange because I can consistently reproduce the issue also on OS X 10.8 machines without the third party fonts installed.
I wonder what could be different between my test machines and yours.
I don't know if it matters but I can add that they are completely up-to-date with the latest Apple updates, Java SE 7 from Oracle is at Update 25 and Java SE 6 from Apple is at 1.6.0_51 (that's "Java for OS X 2013-004" for Apple). To be precise, Java SE 6 is the xM4509 patched version.

pluby wrote:
Please ignore my request for new PDF files. By resaving your original PDF in Apple's Preview application, my newly saved PDF opens fine in Adobe Acrobat. So, I will uncompress your original and my newly saved PDF and analyze the PDFs to see if there are any differences.

Once I finish my analysis (most likely over the next day or two), I will post any news that I have.

Oh, ok, thank you in advance!


Last edited by OmniMac on Wed Jul 03, 2013 7:02 pm; edited 1 time in total
Back to top
View user's profile Send private message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11805
Location: California, USA

PostPosted: Wed Jul 03, 2013 6:39 pm    Post subject: Re: Problems with exported PDFs displayed with Adobe Reader Reply with quote

OmniMac wrote:
[This is very strange because I can consistently reproduce the issue also on OS X 10.8 machines without the third party fonts installed.
I wonder what could be different between my test machines and yours.


I think I found the cause of this bug and I can reproduce the bug on my Mac OS 10.8 machine when I export to PDF the attached .odt file.

The bug appears to be triggered by Apple's bundled Bangla MN Bold font and only occurs when only spaces in your document use that font. For example, in my attached .odt, the first space has the Bangla MN Bold font and the text has the Arial font. In this particular case, creating an embedded font fails. But if you have actual text that uses that font, it succeeds.

I now have to investigate ways to fix this embedded font creation failure in our code. Once I have found a way to fix this, I will post a test patch.

In the meantime, I have a workaround: open the export to PDF file in Apple's Preview application and then select Preview's File :: Save As menu to resave the PDF. Preview will strip out this missing font and the file should then open OK in Adobe Acrobat.

Patrick
Back to top
View user's profile Send private message Visit poster's website
OmniMac
Red Pill


Joined: Jul 01, 2013
Posts: 6

PostPosted: Thu Jul 04, 2013 7:13 pm    Post subject: Re: Problems with exported PDFs displayed with Adobe Reader Reply with quote

pluby wrote:
The bug appears to be triggered by Apple's bundled Bangla MN Bold font and only occurs when only spaces in your document use that font. For example, in my attached .odt, the first space has the Bangla MN Bold font and the text has the Arial font. In this particular case, creating an embedded font fails. But if you have actual text that uses that font, it succeeds.


Same results here! Shocked

pluby wrote:
I now have to investigate ways to fix this embedded font creation failure in our code. Once I have found a way to fix this, I will post a test patch.

In the meantime, I have a workaround: open the export to PDF file in Apple's Preview application and then select Preview's File :: Save As menu to resave the PDF. Preview will strip out this missing font and the file should then open OK in Adobe Acrobat.


Thank you very much! Very Happy
Back to top
View user's profile Send private message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11805
Location: California, USA

PostPosted: Fri Jul 05, 2013 10:40 am    Post subject: Reply with quote

I think that I have fixed this export to PDF bug. Can you install the following test patch and tell us if the bug is fixed for you?:

Intel:
http://juliette.neooffice.org/test/NeoOffice-3.3-Patch-7-Test-7-Intel.dmg

Patrick
Back to top
View user's profile Send private message Visit poster's website
OmniMac
Red Pill


Joined: Jul 01, 2013
Posts: 6

PostPosted: Sun Jul 07, 2013 4:21 pm    Post subject: Reply with quote

Thanks Patrick, the patch seems to work and now the exported PDFs are displayed fine by Adobe Reader! Smile

That said, when I export to PDF I'm still noticing a small issue that's not reproducible with the PDF created by the print menu.
If I print the test file you provided to PDF and open it with Adobe Reader, the fonts list* is populated without issues, but if I export to PDF that list doesn't fill up and the progress indicator remains at 0%.
IIUC, I'm also seeing that the PDF generated by the print menu on Mountain Lion doesn't actually embed the Bangla MN Bold font while on Lion the font is embedded (regardless of the print or export method used, on Lion I see no problems whatsoever).
I'm attaching screenshot of all the relevant cases.

*File -> Properties… -> Fonts tab
Back to top
View user's profile Send private message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11805
Location: California, USA

PostPosted: Sun Jul 07, 2013 5:03 pm    Post subject: Reply with quote

OmniMac wrote:
If I print the test file you provided to PDF and open it with Adobe Reader, the fonts list* is populated without issues, but if I export to PDF that list doesn't fill up and the progress indicator remains at 0%.
IIUC, I'm also seeing that the PDF generated by the print menu on Mountain Lion doesn't actually embed the Bangla MN Bold font while on Lion the font is embedded (regardless of the print or export method used, on Lion I see no problems whatsoever).


I can also reproduce what you see.

I created PDFs with my sample document on Mac OS X 10.8 Mountain Lion using both export and print to PDF and then I looked inside both files. From what I can see, the print PDF has one less piece of Bangla Bold font data.

In the test patch that you tried, I have code that detects if Mac OS X won't provide us embedded font data (like Bangla Bold's spacing glyph on Mac OS X 10.8 Mountain Lion). So I should be able to fix the font listing problem by stripping out more PDF data for such fonts that have no embedded font data.

I will post another test patch when I have implemented code to strip out the applicable PDF font data.

Patrick
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11805
Location: California, USA

PostPosted: Sun Jul 07, 2013 10:54 pm    Post subject: Reply with quote

OmniMac wrote:
IIUC, I'm also seeing that the PDF generated by the print menu on Mountain Lion doesn't actually embed the Bangla MN Bold font while on Lion the font is embedded (regardless of the print or export method used, on Lion I see no problems whatsoever).


I forgot to mention that the reason Mac OS X 10.8 will not embed the Bangla MN Bold font in printed PDF when that font is used only for spaces. From my investigation, Apple's PDF generation functions changed in Mac OS X 10.8 Mountain Lion and, for some fonts including Bangla MN Bold, printing to PDF will not embed the font when all of that font's glyphs are whitespace glyphs.

This Apple change affects all applications running on Mac OS X 10.8 Mountain Lion. You can see this by opening the sample .odt file in my earlier post in Apple's TextEdit application and printing to PDF. Like when printing to PDF in NeoOffice, TextEdit's PDF will have no embedded Bangla MN Bold font since my document only uses that font for spaces.

Since this is an Apple change, all that I can do is make the export to PDF behave the same as the printed PDF and gracefully handle cases like these where Apple's PDF generation functions will not embed a font. The good news is this Apple change only appears to affect whitespace glyphs.

Patrick
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11805
Location: California, USA

PostPosted: Mon Jul 08, 2013 2:57 pm    Post subject: Reply with quote

I think that I have fixed display of the font list in Adobe Acrobat when viewing a PDF with the Bangla NM Bold font created with NeoOffice's export to PDF feature.

Can you install the following test patch and tell us if the behavior in Adobe Acrobat is the same as when viewing a PDF created via printing?:

Intel:
http://juliette.neooffice.org/test/NeoOffice-3.3-Patch-7-Test-8-Intel.dmg

Patrick
Back to top
View user's profile Send private message Visit poster's website
OmniMac
Red Pill


Joined: Jul 01, 2013
Posts: 6

PostPosted: Mon Jul 08, 2013 9:47 pm    Post subject: Reply with quote

pluby wrote:
Can you install the following test patch and tell us if the behavior in Adobe Acrobat is the same as when viewing a PDF created via printing?


They match! Very Happy
Thank you very much Patrick, I think we can consider the issue fixed.
Back to top
View user's profile Send private message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11805
Location: California, USA

PostPosted: Sat Aug 03, 2013 9:54 pm    Post subject: Reply with quote

FYI. I have included the fix for this bug in NeoOffice 3.3 Patch 8. The patch can be downloaded from the NeoOffice patch download page.

Patrick
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.03 Seconds