How can I keep the image not distorted when converted to PDF? Thanks!
asked Oct 27, 2019 at 0:55 131 1 1 silver badge 3 3 bronze badgesThere's a much simpler way. The culprit is in the height tag, which needs to be removed. Once removed, with only the width tag, browser computes the proper aspect ratio.
To do this, add a rule in "Look & Feel/Transform HTML" section which reads:
Converting from mobi to pdf is almost always going to be a problem. Both are rendered formats. The problem could come from anywhere. Two ideas:
First, try to obtain an epub copy instead of a mobi file. It's easier to convert from epub to pdf than from mobi to pdf.
Try decompiling the mobi file (go to mobileread to find a tool that can do so).
Possibly there is a setting in Calibre to preserve the image ratios. But really, this is asking calibre to do the impossible.
answered Oct 29, 2019 at 22:41 idiotprogrammer idiotprogrammer 4,624 13 13 silver badges 27 27 bronze badgesThanks. Converting from EPUB to PDF give me the same result; and there is no exact settings in Calibre (I only find image cover ratio , but it can't handle images for every other images)
Commented Oct 30, 2019 at 2:16Rename the file extension of the epub file from .epub to .zip and then unzip the files. Find the image file and verify that it's dimensions are the correct ratios. Assuming that is so, then the problem is with the css. (I provide some mobi friendly CSS for images here: imaginaryplanet.net/weblogs/idiotprogrammer/2019/06/…
Commented Nov 1, 2019 at 12:22Formatting images for Kindle is REALLY HARD! It sounds as though the original mobi used css which was suitable for one display width, but not for another. One of the problems is that mobi css does not support the max-width property..
Commented Nov 1, 2019 at 12:24This seems to me to be a common problem - have the same exact problem when converting from EPUB to PDF via Calibre. All images are stretched vertically and their proportion is never maintained, even if two settings are set: 1) PDF Output -> Preserve cover ratio (useless; only intended to keep same aspect ratio in the output file); 2) Page setup -> Output profile : "Tablet" (whose description states "does no resizing of images". Nothing works; images are always resized.
Commented Jan 4, 2021 at 16:32I have achieved a workaround to make images have correct aspect ratio in the output pdf!! I did this on MacOS but I imagine it would work on other platforms. It also leaves extra blank space and sometimes whole blank pages where there used to be a stretched image. Here are my steps. YMMV
I have a file Book.epub I want to convert to pdf using Calibre, but no matter what I try in Calibre settings, some of the images in Book.pdf have super weird aspect ratios.
Note: The random file names are actually named along the lines of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.extension
- BookCopy/ - OEBPS/ - Styles/ - Style00.css - Style01.css - etc - Images/ - randomImageName1.png - randomImageName2.jpg - etc - content.opf - cover.xhtml - toc.ncx - toc.xhtml - randomHtmlName1.xhtml - randomHtmlName2.xhtml - etc - META-INF/ - container.xml - calibre_bookmarks.txt - mimetype (no extension)