View Single Post
Old 10-14-2010, 06:20 PM   #23
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,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
@kidblue,

In the absence of a solution to your copy/paste problem in OSX you could try the following:
  • Import the screenplay PDF into Calibre.

  • Convert PDF to MOBI with the Convert - Debug feature enabled (ignore the resulting MOBI).

  • Go to the Debug directory's Input subdir. There is an HTML file called index.html. Copy this file to a temporary working area (or it will get overwritten if you run another conversion with debug enabled).

  • Open index.html in a text editor.

  • Change the <BODY bgcolor=... ...> tag to a simple <BODY>

  • Enter an opening <pre> tag on the line after the <BODY> tag

    Enter a closing </pre> tag on the line before the closing </BODY> tag.

  • Then you need to do a number of find-and-replaces:
    Find: &nbsp; ReplaceAll: a single space
    Find: <br> ReplaceAll: nothing
    Find: <hr> ReplaceAll: nothing
    Find: &quot; ReplaceAll: " (a double quote)

    Remove a fixed number of leading spaces on each line which represents the wasteful left margin (looks like 8). Remove any other "waste" (excessive blank lines) if you want.

  • Completely remove the lines that begin <A name=... ...
    (You can do this in one hit if your text editor supports Regular Expressions.)

  • This HTML file should now look very much like the one I sent you earlier. Save it.

The above replaces steps 1-5 in the earlier instructions. Continue with step 6 onwards as before.

If this doesn't work I may start throwing things!

[Edit:] I'm joking - please report back with results.

Last edited by jackie_w; 10-14-2010 at 06:35 PM.
jackie_w is offline   Reply With Quote