Bug 128642 - EPUB error: No images and directories after exporting to epub
Summary: EPUB error: No images and directories after exporting to epub
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.0.alpha0+
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: EPUB-Export
  Show dependency treegraph
 
Reported: 2019-11-07 03:21 UTC by yichuang驿窗
Modified: 2024-03-19 03:12 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
source ODT file (3.26 MB, application/vnd.oasis.opendocument.text)
2019-11-14 03:37 UTC, yichuang驿窗
Details
source ODT and png files (7z) (3.06 MB, application/x-7z-compressed)
2019-11-14 03:38 UTC, yichuang驿窗
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yichuang驿窗 2019-11-07 03:21:06 UTC
Description:
After editing the odt file with writer, I exported the odt file to epub3.0, and then, I opened the epub file with calibre, the images and directories disappeared.

If I exported the odt to pdf, the images and directories are in it.

Steps to Reproduce:
1.Editing a odt file, with images and directories; 
2.Export the odt file to epub3.0 or epub2.0; 
3.Open the epub file with calibre;

Actual Results:
In the epub file opened with calibre, the images and directories are gone.

Expected Results:
Display images and directories correctly.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
My os:
Debian Stretch 9.11 
Gnome 3.22.2
Calibre 2.75.1
*In the option settings of LibreOffice, the OpenGL is not used.
===============
Version: 6.4.0.0.alpha1
Build ID: cc57df8f942f239d29cb575ea5a7cb01405db787
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: gtk3; 
Locale: zh-CN (zh_CN.UTF-8); UI-Language: en-US
Calc: threaded
==================
Version: 6.2.8.2
Build ID: f82ddfca21ebc1e222a662a32b25c0c9d20169ee
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: gtk3; 
Locale: zh-CN (zh_CN.UTF-8); UI-Language: en-US
Calc: threaded
==================
OpenGL:
$ glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile 
OpenGL core profile version string: 3.3 (Core Profile) Mesa 13.0.6
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 13.0.6
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 13.0.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
Comment 1 Julien Nabet 2019-11-08 14:34:49 UTC
On Win10 with master sources updated today, I did several tests.
For each of these image format, I created a file with an image (in color) + text:
- bmp
- gif
- jpg
- png
- tiff
Then I exported to epub directly each of these files.

For gif, jpg and png, I got image + text, so seems ok to me.

For bmp and tif, I had only text -> KO

What image format do you use?

About directories, not sure to understand what you meant.

Miklos: thought you might be interested in this one.
Comment 2 Miklos Vajna 2019-11-08 15:28:40 UTC
Please provide a reproducer document that shows the problem.

Looking at the code, XMLTextImageContext::endElement() at writerperfect/source/writer/exp/XMLTextFrameContext.cxx:113 simply puts whatever image is in the ODT export output into the EPUB file; so if the EPUB spec forbids bmp or tif, then probably that would be the place to do a conversion (LO has code to do such a thing).

This is assuming that the root cause is that the EPUB spec forbids a format, not that we write a given format into EPUB and the reader is lame and can't read it. :-)
Comment 3 Julien Nabet 2019-11-08 15:32:51 UTC
Miklos: Indeed!
According to https://en.wikipedia.org/wiki/EPUB (at least for 2.0 format):
"EPUB also requires that PNG, JPEG, GIF, and SVG images be supported using the mimetypes image/png, image/jpeg, image/gif, image/svg+xml. Other media types are allowed, but creators must include alternative renditions using supported types.[15] For a table of all required mimetypes, see Section 1.3.7 of the specification. "

So bmp and tiff are not taken into account.
Comment 4 yichuang驿窗 2019-11-14 03:37:19 UTC
Created attachment 155795 [details]
source ODT file

odt file
Comment 5 yichuang驿窗 2019-11-14 03:38:36 UTC
Created attachment 155796 [details]
source ODT and png files (7z)

source odt and png files
Comment 6 yichuang驿窗 2019-11-14 03:50:44 UTC
I had uploaded files twice.

The first marked as " source ODT file ", you can ignore it, I did not found how to delete it.

The secnond marked as "source ODT and png files (7z)". The 7z file include the ODT file, and the png file captured and scaled with gimp 2.8 .

The "directories" means the content of table. Today I can not reprocuce the directories problem. It seems that the EPUB can display content of table correctly. So, maybe it's a mistake to report this "directories" problem here. We can close the "directories" bug I think.
Comment 7 yichuang驿窗 2019-11-20 09:51:25 UTC
Sorry, my mistake.
The "directories" problem means the the table of content. But now it works fine.

The only problem is that the images disappeared.
Comment 8 Julien Nabet 2019-11-20 10:10:19 UTC
On Win10 with LO 6.3.3, I could reproduce this.
I un7zipped the second attachment, opened it and saw images.
I exported in epub, no images.

I'm building from scratch master sources. Hope it'll give some info.
Comment 9 Julien Nabet 2019-11-20 15:44:35 UTC
On Win10 with master sources updated today, I could reproduce this.
Badfully, I don't see related logs, just things like:
warn:legacy.osl:20524:44836:xmloff/source/text/txtparae.cxx:3318: hyperlink without a URL --> no export to ODF
warn:writerperfect:20524:44836:writerperfect/source/writer/exp/txtparai.cxx:590: CreateParagraphOrSpanChildContext: unhandled text:soft-page-break
warn:legacy.osl:20524:44836:xmloff/source/text/txtparae.cxx:3318: hyperlink without a URL --> no export to ODF
warn:legacy.osl:20524:44836:xmloff/source/text/txtparae.cxx:3318: hyperlink without a URL --> no export to ODF
warn:writerperfect:20524:44836:writerperfect/source/writer/exp/txtparai.cxx:590: CreateParagraphOrSpanChildContext: unhandled draw:line
warn:writerperfect:20524:44836:writerperfect/source/writer/exp/txtparai.cxx:590: CreateParagraphOrSpanChildContext: unhandled draw:line
warn:writerperfect:20524:44836:writerperfect/source/writer/exp/txtparai.cxx:590: CreateParagraphOrSpanChildContext: unhandled text:soft-page-break
warn:legacy.osl:20524:44836:xmloff/source/text/txtparae.cxx:3318: hyperlink without a URL --> no export to ODF
warn:legacy.osl:20524:44836:xmloff/source/text/txtparae.cxx:3318: hyperlink without a URL --> no export to ODF
warn:writerperfect:20524:44836:writerperfect/source/writer/exp/txtparai.cxx:590: CreateParagraphOrSpanChildContext: unhandled draw:custom-shape
warn:writerperfect:20524:44836:writerperfect/source/writer/exp/txtparai.cxx:590: CreateParagraphOrSpanChildContext: unhandled text:soft-page-break
Comment 10 QA Administrators 2022-03-19 03:32:13 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2024-03-19 03:12:46 UTC
Dear yichuang驿窗,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug