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.
Created attachment 83577 [details] Screenshot of an image overflowing the page.
can you please attach a file that shows the problem?
Try this one: http://www.gutenberg.org/ebooks/44228 http://www.gutenberg.org/ebooks/44228.epub.images
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?
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. :)
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.
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.
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.
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.
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.
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.
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?
OK, I am using Kubuntu, so I am not exactly sure how to install the latest version of KDE apps.
You'll have to install it from source. Instructions can be found on http://okular.kde.org/download.php
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.
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!
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!