View Single Post
Old 10-14-2010, 02:21 PM   #13
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
@kidblue,

I have given your 'read-a-PDF-screenplay-on-my-Kindle' problem a bit more thought - I like a little challenge now and again.

I used the following simple process to create an HTML file which converts to an EPUB which reads quite nicely in portrait mode on my 6" PRS-505. I'm hoping the same HTML will convert to a MOBI which reads nicely on your Kindle, but as I don't have a Kindle I can't guarantee it... I hope nothing here is Op System dependent.
  1. Open the attached screenplay template file in a plain text editor (I use Notepad++). It's just a simple HTML file containing
    Code:
    <html>
    <head>
    <title>Screenplay</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    </head>
    <body>
    <pre>
    
    </pre>
    </body>
    </html>
  2. Open the original PDF, select the whole text and copy to clipboard using the standard features of your PDF viewer.
  3. Paste the text into the template between the <pre> and </pre> tags.
  4. Use the text editor's find-and-replaceall to remove a fixed number of leading spaces on each line which represents the wasteful left margin. (This can be done in one hit on Notepad++.) You could also remove any other "waste" if you wanted.
  5. Save the template file and rename to screenplay.html (or any other name with a .html extension).
  6. Import the HTML file into Calibre in the normal way.
  7. Convert to MOBI in the normal way. (I converted to EPUB)
  8. (Optional) If you want a darker font just type
    Code:
    pre {font-weight: bold}
    in the Calibre Convert - Look&Feel - ExtraCSS box.

    I also had to experiment with the Look&Feel - 'Base font size' and 'Font size key' to get the reader display just right. However, this is mainly because of the PRS-505's limited zoom options, I believe the Kindle is much better in this respect.

In an EPUB on a Sony reader, by default, the <pre> tags will cause the text to display in the reader's EPUB default monospace font. I'm not sure whether the Kindle has a monospace font, but if not, I'm hoping that it's default serif font will still display the screenplay MOBI OK.

The first attached screenshot shows a page of the EPUB in my Sony monospace font.

The second shows an EPUB page in the Caecilia serif font which I believe is similar to (the same as?) the Kindle.

...and finally...I'm not sure the purist's would approve of using the <pre> tags because if you zoom too high on your reader the text will disappear off the right-hand edge of the screen. However, if your sample screenplay is typical, the lines seem short enough to get away with it.
Attached Thumbnails
Click image for larger version

Name:	scrnply_mono.jpg
Views:	664
Size:	41.7 KB
ID:	59789   Click image for larger version

Name:	scrnply_serif.jpg
Views:	611
Size:	48.8 KB
ID:	59790  
Attached Files
File Type: txt screenplay_tmplt.html.txt (162 Bytes, 498 views)
jackie_w is offline   Reply With Quote