Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle

Notices

Reply
 
Thread Tools Search this Thread
Old 04-05-2011, 10:47 AM   #1
TX_
Junior Member
TX_ began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2011
Device: Kindle 3
Arrow Kindle margins problem! Once and for all!

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!
TX_ is offline   Reply With Quote
Old 04-05-2011, 11:59 AM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
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)!
That's exactly the behavior that you can expect with 'width="100%"'. The aspect ratio of the image will be retained.

You can't resize a pdf on the fly to fit bevel to bevel and not have any margins. Especially if it's an image... unless the pdf accidentally happens to fit perfectly bevel to bevel at its normal size.

I've had the best luck with the following tools when trying to get any of my pdf's into a state that I can only describe as; "not completely sucking when viewed on my Kindle."

Briss and/or PDFReflow
DiapDealer is offline   Reply With Quote
Advert
Old 04-05-2011, 07:27 PM   #3
kranu
I <3 my Kindle
kranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensions
 
Posts: 528
Karma: 51332
Join Date: Nov 2010
Location: United States
Device: Kindle 3G + WiFi
When it's really complicated, here's what I do:
  • Acrobat: Export each page in PDF to an image
  • Photoshop: Use Batch processor to crop margins off, adjust contrast, resize image, etc
  • Kindle: Copy images into Pictures folder and press Alt+Z to force reload

That does it for me.
kranu is offline   Reply With Quote
Old 04-06-2011, 04:33 AM   #4
Starko
Zealot
Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.
 
Posts: 123
Karma: 998177
Join Date: Aug 2010
Device: Kindle 3
For the books i really want to enjoy reading and want to share in the future I take a long route
1. Crop with Briss
2. OCR with ABBY Fine Reader and save as formatted text RTF
3. Do some editing with Word and save as Netscape 3 compatible HTML
4. Remove most Word-produced junk formatting from HTML with www.wordoff.org
5. Do some manual HTML clean up and tweaking
6. Import into Calibre, get metadata and cover
7. Convert to MOBI

The end-result is usually fantastic.
Starko is offline   Reply With Quote
Old 04-06-2011, 02:49 PM   #5
TX_
Junior Member
TX_ began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2011
Device: Kindle 3
Smile

Hi everybody,

Thanks for your answers This forum is awesome (while my Kindle apparently isn't). I think I need to get DX.

DiapDealer

As for Briss and PDFReflow, for cropping I use A-PDF Page Crop which has more options than Briss (buggy though), and I can't use PDFReflow as I want to preserve original PDF as is - i.e. import rasterized.

Starko

That's the helluva work to do (even though I don't have much books, technical books mainly which you can't read "in bulk"). And OCR and stuff does not work well for complex-formatted PDFs that I have.

kranu

The (hidden) image viewer is awesome finding! It looks exactly like PDFs should look - fully fit-to-width, no margins, and especially fullscreen mode is exactly what I was after. But... there is only one thing that makes it unusable - I wasn't able to find "Go to page (image)" feature... Is it possible at all? Jumping to desired image? Any hidden hotkey maybe? Because without this it is unusable as book reader.
TX_ is offline   Reply With Quote
Advert
Old 04-08-2011, 01:24 PM   #6
TX_
Junior Member
TX_ began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2011
Device: Kindle 3
Question How to go to specific image in Image Viewer?

Quote:
The (hidden) image viewer is awesome finding! It looks exactly like PDFs should look - fully fit-to-width, no margins, and especially fullscreen mode is exactly what I was after. But... there is only one thing that makes it unusable - I wasn't able to find "Go to page (image)" feature... Is it possible at all? Jumping to desired image? Any hidden hotkey maybe? Because without this it is unusable as book reader.
.....
TX_ is offline   Reply With Quote
Old 04-08-2011, 07:00 PM   #7
kranu
I <3 my Kindle
kranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensions
 
Posts: 528
Karma: 51332
Join Date: Nov 2010
Location: United States
Device: Kindle 3G + WiFi
Quote:
Originally Posted by TX_ View Post
.....
No, unfortunately, you can't. You can only go forwards/backwards. If you need the GoTo feature, you can merge all the images together into a mobi or pdf, but that'll leave the progress bar.
kranu is offline   Reply With Quote
Old 04-09-2011, 10:36 AM   #8
TX_
Junior Member
TX_ began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2011
Device: Kindle 3
Question

kranu

I tried that (merging images into mobi), but besides progress bar, in mobi/prc format the images are shown fully, i.e. fit-to-screen, not fit-to-width, even in landscape mode, so they are very tiny and unreadable. Maybe I did something wrong? Any way to force image-based *.mobi or *.prc files to display fit-to-width in landscape mode??
TX_ is offline   Reply With Quote
Old 04-09-2011, 10:42 PM   #9
kranu
I <3 my Kindle
kranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensions
 
Posts: 528
Karma: 51332
Join Date: Nov 2010
Location: United States
Device: Kindle 3G + WiFi
Quote:
Originally Posted by TX_ View Post
kranu

I tried that (merging images into mobi), but besides progress bar, in mobi/prc format the images are shown fully, i.e. fit-to-screen, not fit-to-width, even in landscape mode, so they are very tiny and unreadable. Maybe I did something wrong? Any way to force image-based *.mobi or *.prc files to display fit-to-width in landscape mode??
I don't get what you're saying. What's the difference between fit-to-width and fit-to-screen?
kranu is offline   Reply With Quote
Old 04-10-2011, 03:26 PM   #10
TX_
Junior Member
TX_ began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2011
Device: Kindle 3
kranu

With fit-to-screen the whole image is shown at once, so it is shown small. With fit-to-width the image is zoomed to the level at which it is spanned for the full width of the screen, so only part of the image is shown and you need to "scroll" it to see top/bottom parts of the image.
TX_ is offline   Reply With Quote
Old 04-11-2011, 01:58 AM   #11
kranu
I <3 my Kindle
kranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensions
 
Posts: 528
Karma: 51332
Join Date: Nov 2010
Location: United States
Device: Kindle 3G + WiFi
Quote:
Originally Posted by TX_ View Post
kranu

With fit-to-screen the whole image is shown at once, so it is shown small. With fit-to-width the image is zoomed to the level at which it is spanned for the full width of the screen, so only part of the image is shown and you need to "scroll" it to see top/bottom parts of the image.
Oh. For some reason when I read your post earlier, I did not think of that. When I load the images into Photoshop, I set it so that they are resized to fit the Kindle screen (span multiple pages if needed).
kranu is offline   Reply With Quote
Old 04-18-2011, 08:04 AM   #12
rastik
Connoisseur
rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.
 
Posts: 65
Karma: 4662
Join Date: Feb 2011
Location: CZ
Device: Kindle Touch 3G, Kindle Keyboard
Kindle will not break images to more pages. It works only for PDF. MOBI/PRC/AZW files are always processed to fit images on screen. They can be smaller, but not larger.
If you really need to read portait document in landscape I suggest to split images in 2 (or 3) pieces. This way you can control what is displayed.
rastik is offline   Reply With Quote
Old 04-18-2011, 08:07 AM   #13
rastik
Connoisseur
rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.
 
Posts: 65
Karma: 4662
Join Date: Feb 2011
Location: CZ
Device: Kindle Touch 3G, Kindle Keyboard
Quote:
Originally Posted by TX_ View Post
The (hidden) image viewer is awesome finding! It looks exactly like PDFs should look - fully fit-to-width, no margins, and especially fullscreen mode is exactly what I was after. But... there is only one thing that makes it unusable - I wasn't able to find "Go to page (image)" feature... Is it possible at all? Jumping to desired image? Any hidden hotkey maybe? Because without this it is unusable as book reader.
The only option for image viewer is to exit to home screen, edit file that was created in the directory next to images and open the directory again in kindle.
Name of the last image is stored in a text file next to images.
rastik is offline   Reply With Quote
Reply

Tags
bezel, kindle, landscape, margins, pdf


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle margins edit? 3bayjunkie Amazon Kindle 3 01-01-2011 11:38 PM
Troubleshooting The Obstinate Margins on PDFs and another big minor Problem ! baccilus Amazon Kindle 13 11-26-2010 04:49 PM
Problem With Margins Coverting Epub To Mobi rhk001 Calibre 2 11-21-2010 08:17 PM
Problem changing margins on an ePub AnemicOak ePub 3 11-02-2009 04:30 PM
A problem with Margins? What tool? bar0n1 LRF 3 04-25-2009 12:30 PM


All times are GMT -4. The time now is 05:26 PM.


MobileRead.com is a privately owned, operated and funded community.