Bug 327635 - Epub - images overflow page.
Summary: Epub - images overflow page.
Status: RESOLVED WORKSFORME
Alias: None
Product: okular
Classification: Applications
Component: EPub backend (show other bugs)
Version: 0.17.2
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-15 06:36 UTC by Brylie Christopher Oxley
Modified: 2020-12-29 04:34 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screenshot of an image overflowing the page. (218.57 KB, image/png)
2013-11-15 06:37 UTC, Brylie Christopher Oxley
Details
Okular screenshot - Learning QGIS 2.0 (Packt publishing) - image overflow (160.77 KB, image/png)
2013-11-22 01:26 UTC, Brylie Christopher Oxley
Details
Learning QGIS epub opened in Firefox, viewing source <div> with inspector. (294.23 KB, image/png)
2013-11-22 01:32 UTC, Brylie Christopher Oxley
Details
This is the same image in Learning QGIS with the page scaled to 320px wide. (205.32 KB, image/png)
2013-11-22 01:37 UTC, Brylie Christopher Oxley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brylie Christopher Oxley 2013-11-15 06:36:32 UTC
When I view epub format documents, images are displayed at a scale that overflows the page.

Reproducible: Always

Steps to Reproduce:
1. Download an epub from Packt, O'reilly, Manning, etc.
2. Open it using Okular
3. Scroll to an image
Actual Results:  
The image is displayed larger than the page can contain. The image will be clipped by the page boundaries.

Expected Results:  
The page should display images within its boundaries, in proportion to the text.
Comment 1 Brylie Christopher Oxley 2013-11-15 06:37:25 UTC
Created attachment 83577 [details]
Screenshot of an image overflowing the page.
Comment 2 Albert Astals Cid 2013-11-18 22:09:12 UTC
can you please attach a file that shows the problem?
Comment 3 Brylie Christopher Oxley 2013-11-19 02:41:42 UTC
Try this one:
http://www.gutenberg.org/ebooks/44228
http://www.gutenberg.org/ebooks/44228.epub.images
Comment 4 Albert Astals Cid 2013-11-20 18:28:12 UTC
Interesting file, the new code in 4.12 renders images from pages 3 and 6 correctly bounded to the page, but not the one from page 9.

Jaydeep can you have a look?
Comment 5 Brylie Christopher Oxley 2013-11-21 01:28:12 UTC
Thank you for your help with this. These image rendering issues are also very common with ebooks from Packt and other technical publishers. If there is a tech book on your wishlist, I will gladly buy it for you as a thank you. :)
Comment 6 jaydeep 2013-11-21 03:43:39 UTC
If we look at the html of the epub file, the image on page 9 is not actually **an** image, it's two images in a row inside a table.

To fix this, I guess we need to do some preprocessing that makes sure images inside tables don't end up consume too much space.

I'm not sure, but may be I can fix this, if you give me some time.
Comment 7 Brylie Christopher Oxley 2013-11-22 01:25:20 UTC
I have opened the epub Learning QGIS from Packt publishing. Images beyond a certain width overflow the page.

When I open the html file in Firefox, the images render and scale correctly. Inspecting the source indicates that the issue happens even with images wrapped in <div> tags.
Comment 8 Brylie Christopher Oxley 2013-11-22 01:26:57 UTC
Created attachment 83692 [details]
Okular screenshot - Learning QGIS 2.0 (Packt publishing) - image overflow

This screenshot shows an image overflowing the page of an epub file.
Comment 9 Brylie Christopher Oxley 2013-11-22 01:32:35 UTC
Created attachment 83693 [details]
Learning QGIS epub opened in Firefox, viewing source <div> with inspector.

This screenshot shows that the image is wrapped in a div tag.
Comment 10 Brylie Christopher Oxley 2013-11-22 01:37:13 UTC
Created attachment 83694 [details]
This is the same image in Learning QGIS with the page scaled to 320px wide.

This image demonstrates the <div> image scaling to 320px wide.
Comment 11 jaydeep 2013-11-22 01:53:26 UTC
I'm sure the images in Learning QGIS will render properly in latest version of Okular, because it has been fixed. But the previous one from the boat building book needs some work.

So I would recommend you to update Okular and try it once again.
Comment 12 Brylie Christopher Oxley 2013-11-22 02:07:52 UTC
I have tried setting the 'max-width' parameter to '100%' in an inline style tag, and re-saving the document. The issue still occurred. How are epub documents rendered? Is there a default stylesheet? Can we borrow the default stylesheet from Firefox?
Comment 13 Brylie Christopher Oxley 2013-11-22 02:08:23 UTC
OK, I am using Kubuntu, so I am not exactly sure how to install the latest version of KDE apps.
Comment 14 jaydeep 2013-11-22 02:54:06 UTC
You'll have to install it from source.

Instructions can be found on http://okular.kde.org/download.php
Comment 15 Justin Zobel 2020-11-29 21:33:51 UTC
Thanks for the report, Brylie. As this is quite an old issue can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved. I've set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved" when you respond, thanks.
Comment 16 Bug Janitor Service 2020-12-14 04:33:54 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 17 Bug Janitor Service 2020-12-29 04:34:27 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!