I have some PDF files which I want to display (in landscape mode) fitted to the full width of the device (Kindle 3). Just from bezel to bezel, with no whitespace margins on left and right. Kindle adds unnecessary margins to PDFs, so here is what I tried to do:
[NOTE: I mostly have PDFs that are all-image-based, or have complex formatting so converting them to MOBI (without firstly rasterizing them - i.e. converting pages as images) is not an option.]
1) I applied the zero-margins trick (
https://wiki.mobileread.com/wiki/Kind..._Change_Margin) for my Kindle, set HORIZONTAL_MARGIN=0. But I know it does not work for PDFs so I have to convert it to MOBI/PRC.
2) I cropped all the margins from PDF.
3) Then I rasterized the PDF - converted it to images (each page as a separate PNG image). Used PDFill for that.
4) Then I generated the HTML (wrote little tool for that myself) based on that images, like that:
<!DOCTYPE html>
<HTML>
<BODY>
<img src="Page001.png" width="100%" alt="" /><br>
<img src="Page002.png" width="100%" alt="" /><br>
<img src="Page003.png" width="100%" alt="" /><br>
<img src="Page004.png" width="100%" alt="" /><br>
<img src="Page005.png" width="100%" alt="" /><br>
</BODY>
</HTML>
As you see, I specified the
width="100%" parameter which means
each image should be fit-to-width!
5) I imported the generated HTML file (along with it's images) both in Calibre and Mobipocket, and there I converted it to *.mobi and *.prc.
And guess what... In landscape mode...
the pages (which are actually images) are not fit-to-width! Each page is displayed as fit-to-screen, so the whole page is shown (which makes no sense in landscape mode)!
The exact same behavior for Calibre (*.mobi) and Mobipocket (*.prc) generated files. It looks like Kindle always displays the images as a whole (fit-to-screen), instead of displaying only the part of the image (fit-to-width in this case) and then scrolling it vertically. It just ignores the width="100%" parameter in HTML file. Don't know whether this parameter is lost during conversion (Calibre/Mobipocket issue), or just ignored by Kindle (Kindle issue).
Is there ANY way of forcing Kindle to display images as fit-to-width? So the page could just span from bezel to bezel. Any special HTML tag or anything?..
Tried so many ways in last couple of days, ran out of ideas...
Any kind of input would be much appreciated!
Thanks in advance!