Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-14-2011, 11:59 AM   #1
alanjay
Member
alanjay began at the beginning.
 
Posts: 16
Karma: 42
Join Date: Oct 2010
Device: kindle
Talking converting pdf screenplays / scripts for movies into ePUB format

Hi,

I get many scripts are PDFs - usually from Final Draft or Celtix - but in any case as PDFs and formatted in the highly stylized way that the film industry have created over the decades.

Obviously the format is very different from normal books and so using tools such as Calibre (which is fantastic by the way) are fraught as the formatting is munged as the expectations are of the format are wrong.

It would seem to be as an outsider that creating a tool to take a PDF and knowing the likely format create a much better EPUB version which more closely follows the conventional formatting:

Scene Heading

Scene description left justified

Name of Character
Dialog - with a 25% (?) margin each side

Film scripts are always in monospaced courier and characters are all upper case as are scene locations.

So does anyone have any ideas how to take this simple format and create a similarly simple conversion to EPUB with Calibre.

All thoughts gratefully received.

Alan
alanjay is offline   Reply With Quote
Old 01-14-2011, 12:28 PM   #2
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
This would not be a simple conversion, but if you're not happy with the direct conversion results Calibre offers you, try exporting to HTML (AFAIK, Acrobat Reader offers that option) and either importing and converting the resulting file to Calibre or using Sigil to create an ePub.
The 25% margin may be a problem requiring some CSS trickery, though- I would suspect that a formatting like that could be badly mangled when changing font sizes, which wouldn't be that uncommon on an ebook reader.
Manichean is offline   Reply With Quote
Advert
Old 01-14-2011, 01:45 PM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,777
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Manichean View Post

The 25% margin may be a problem requiring some CSS trickery, though- I would suspect that a formatting like that could be badly mangled when changing font sizes, which wouldn't be that uncommon on an ebook reader.
Why? 25% is 25% (of block area).
% margins are how I center a short HR in ADE
The wrap might look a little wierd for long phrases, but it should still be within the margins. (I goofed up my margins once (OK, more than once ) and had 2 chars wide, down the page)
theducks is online now   Reply With Quote
Old 01-15-2011, 03:56 AM   #4
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by theducks View Post
Why? 25% is 25% (of block area).
% margins are how I center a short HR in ADE
The wrap might look a little wierd for long phrases, but it should still be within the margins. (I goofed up my margins once (OK, more than once ) and had 2 chars wide, down the page)
My knowledge about CSS and the such is just a tiny bit above zero. I was guessing. I should perhaps have stated that more clearly.
Manichean is offline   Reply With Quote
Old 01-15-2011, 09:14 AM   #5
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
@alanjay,

I'm making an assumption here, which may be wrong, but if you're having difficulty reading the screenplay PDFs on your reader because of the excessive whitespace margins have you tried either of the following:
  1. Use Briss to visually crop unwanted margins from your PDF. The output is still a PDF but if the source had a TOC & metadata they should be retained in the output PDF. Briss is still under active development and the creator is very helpful.

  2. Use a PDF to TXT utility which can retain multiple spaces. Then read the TXT on the reader. The usual loss of italics/bold styling which happens with PDF to TXT doesn't really apply with a screenplay in plain Courier throughout.
jackie_w is offline   Reply With Quote
Advert
Old 01-15-2011, 09:49 AM   #6
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
I think he wanted to retain that formatting.
Manichean is offline   Reply With Quote
Old 01-15-2011, 10:23 AM   #7
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
I read it as meaning he wanted to make sure the dialog retained some leading blanks so that it was indented by a bigger margin than the Scene headings and descriptions.

Briss would allow cropping to the Scene hdgs/desc extremities leaving the dialog still in the middle.

Still, I may have misunderstood.
jackie_w is offline   Reply With Quote
Old 01-16-2011, 09:53 AM   #8
alanjay
Member
alanjay began at the beginning.
 
Posts: 16
Karma: 42
Join Date: Oct 2010
Device: kindle
Thanks for all the feedback

Quote:
Originally Posted by jackie_w View Post
@alanjay,

I'm making an assumption here, which may be wrong, but if you're having difficulty reading the screenplay PDFs on your reader because of the excessive whitespace margins have you tried either of the following:

  1. Use Briss to visually crop unwanted margins from your PDF. The output is still a PDF but if the source had a TOC & metadata they should be retained in the output PDF. Briss is still under active development and the creator is very helpful.
Reading PDFs on a standard kindle is a real pain - too much white space and the fonts are too small for my eyes And if you manipulate things to be better then the whole process is less than ideal

Quote:
Originally Posted by jackie_w View Post
  1. Use a PDF to TXT utility which can retain multiple spaces. Then read the TXT on the reader. The usual loss of italics/bold styling which happens with PDF to TXT doesn't really apply with a screenplay in plain Courier throughout.
I'm searching for a good mac solution to this most things remove the white spaces so everything is left justified which means reading is less that obvious where dialog starts.

So if you have any good tips for Max PDF to TXT solutions please post the details - thanks.

Last edited by alanjay; 01-16-2011 at 02:45 PM.
alanjay is offline   Reply With Quote
Old 01-16-2011, 10:20 AM   #9
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
Quote:
Originally Posted by alanjay View Post
So if you have any good tips for Max PDF to TXT solutions please post the details - thanks.
Somehow I just knew you were going to be a Mac user .

I have been through this very screenplay topic before with another forum member. I'm a Windows user with absolutely no Mac experience and didn't understand why a simple Open PDF, select All, Copy & Paste into TXT file didn't work as well for him as it did for me. I'm afraid I'm still none the wiser about how to retain leading multiple spaces on a Mac.

Just for your interest I have since seen him posting in the Briss thread on the PDF forum.

There is also this thread where he has enlisted the help of one of the PDF experts with another approach.
jackie_w is offline   Reply With Quote
Old 01-16-2011, 10:24 AM   #10
alanjay
Member
alanjay began at the beginning.
 
Posts: 16
Karma: 42
Join Date: Oct 2010
Device: kindle
Thanks for all the feedback - I think I might not have fully explained things screenplays have a curious format and having spent some of yesterday playing with Calibre I have learnt a bit more and have a reasonable set of instructions to get some - but not all the way to what I need.

I'm stuck creating a good set of CSS that fakes the style of a screenplay.

I have found a combination of Acrobat Reader / Celtx (http://www.celtx.com/) a free script editing tool and Calibre

So here is my workflow:

1) Open the PDF in Adobe Acrobat v10
2) Select All in PDF - COPY text in Adobe Acrobat 10 - Command + A then Command + C (Apple A / Apple C)
3) Paste all text into Celtx FILM format - Command + V ( Apple V) - Quit Adobe Acrobat Reader
4) Save as Celtx and then EXPORT as HTML (you will work on HTML) - need to change extension to HTML defaults to TXT. Quit Celtx.
5) Load HTML into Calibre - Edit Meta Data with title and author information
6) Convert to MOBI using suitable CSS additions!

Celtx very nicely formats its HTML output with the following CSS tags:
<p class="sceneheading">

Heading - full width left justified - all caps

Code:
1 EXT PEGASUS HOUSE - DAY 1
<p class="action">

paragraph left justified full width normal space between paragraphs:

Code:
Pilatis House is an impressive Georgian pile lapped by
extensive grounds. From the rear, nicely framed by
ancient oaks, we see peacocks on the lawn, hear the
trickle of water, sense the peace and the solitude.

Off-screen, over a further selection of exterior shots,
we hear a snatch of dialogue. Malcolm Parkinson, the
Director of Pilatis House, is a Yorkshireman. Bonnie, his
wife, comes from London. She has a mddle class accent.
<p class="character">

the name of the character in capitals - and centered on the page:

Code:
PARKINSON

There is a line space before a character name but no line space after the character name.

<p class="dialog">

The dialog fills just 50% of the line ie it is indented both left and right by 25% (?)

Code:
Have you got it, Bonnie?

There is a line space after dialog ONLY if it moves from dialog to another character or action (ie)

Code:
Its in the lumber yard!
Have you got it, Bonnie?


<p class="parenthetical">

This is an item in parenthesis followed by a line break / space ie

<p class="parenthetical">(even fainter) OK.</p>

is displayed as:

Code:
(even fainter)

OK.

<p class="transition">

right aligned all caps


Now I think if I can come up with the correct combination of CSS to fit each of the nice classes that celtx is kind enough to provide I should be able to retain something that looks like a script but is text based and easy to read.

My first attempts at doing the CSS sort of work but are not entirely correct so I suspect I need more knowledge of how to achieve my goals in the CSS code.

Thanks again for all the feedback it has been really useful to hear your thoughts.

ALan

So an example page from a PDF might look like:




Thanks again for your help.

Alan
alanjay is offline   Reply With Quote
Old 01-16-2011, 10:30 AM   #11
alanjay
Member
alanjay began at the beginning.
 
Posts: 16
Karma: 42
Join Date: Oct 2010
Device: kindle
Quote:
Originally Posted by jackie_w View Post
Somehow I just knew you were going to be a Mac user .
Don't hold it against me - after many years as a Windows person - I was lured to the dark side - after all Mac OS/X is the best desktop Unix by far

Quote:
Originally Posted by jackie_w View Post
I have been through this very screenplay topic before with another forum member. I'm a Windows user with absolutely no Mac experience and didn't understand why a simple Open PDF, select All, Copy & Paste into TXT file didn't work as well for him as it did for me. I'm afraid I'm still none the wiser about how to retain leading multiple spaces on a Mac.
Because for some reason (I suspect because Mac OS/X is Unix) when you do a cut a paste out of adobe acrobat reader you get all the text but NO leading spaces they all disappear - it is sometimes like this hugely frustrating

Quote:
Originally Posted by jackie_w View Post
Just for your interest I have since seen him posting in the Briss thread on the PDF forum.

There is also this thread where he has enlisted the help of one of the PDF experts with another approach.
Thanks for that - I'll take a look.

I'm sure there must be a way to do this to get this if only I could crack the CSS

Thanks for the pointes and tips.

Alan
alanjay is offline   Reply With Quote
Old 01-16-2011, 10:56 AM   #12
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
If you have an html file with all the correct <p class="xyz"> markup it may not be too difficult to create a first draft of some CSS.

I'd be happy to have a go if you could post the HTML file and the matching original PDF. If it's not possible to post here for copyright reasons, you could send a PM with links to the files or an email address.
jackie_w is offline   Reply With Quote
Old 01-16-2011, 11:26 AM   #13
alanjay
Member
alanjay began at the beginning.
 
Posts: 16
Karma: 42
Join Date: Oct 2010
Device: kindle
Jackie - thanks for the very kind offer - if it is OK I will PM the details to you as there are (as often the way copyright issues). I have been playing this afternoon and seem to have got some of the way to create something that I think almost does the job. Just about to read my results but the CSS so far is:

Code:
body { 
font-family: "Courier 
New", Monospace; 
} 
p.action { 
text-align: left;
margin-left: 0px; 
margin-right: 0px; 
} 
p.character { 
text-align: left;
margin-left: 50%; 
margin-right: 10px;
margin-bottom: 0px; 
margin-top: 8px; 
} 
p.dialog { 
text-align: left;
margin-left: 20%; 
margin-right: 30px; 
margin-top: 0px; 
margin-bottom: 0px; 
} 
p.sceneheading { 
text-align: left; 
text-transform: uppercase; 
} 
p.sceneheading:before { 
margin-bottom: -16px ! important; 
} 
p.sceneheading:after { 
margin-top: -16px ! important; 
} 
p.transition { 
text-align: right; 
text-transform: uppercase; 
margin-right: 15px; 
} 
p.parenthetical {
text-align: left; 
margin-left: 23%; 
margin-right: 20px; 
}
I have no idea if some of these have any effect on Calibre and the Kindle but I think things are moving in the right way. I suspect my issue was playing with other peoples CSS examples aimed at web browsers and the CSS that calibre converts and can use for Kindle and other epub readers is a limited subset

Anyway thanks for all the feedback and maybe this thread will help others in the future

Alan
alanjay is offline   Reply With Quote
Old 01-16-2011, 11:39 AM   #14
alanjay
Member
alanjay began at the beginning.
 
Posts: 16
Karma: 42
Join Date: Oct 2010
Device: kindle
As a final point - I would prefer just to be able to go from a PDF direct using Calibre to a MOBI but Calibre's excellent PDF conversion routine is designed for books and not screenplays which have this rather odd format and style.
alanjay is offline   Reply With Quote
Old 01-16-2011, 12:03 PM   #15
alanjay
Member
alanjay began at the beginning.
 
Posts: 16
Karma: 42
Join Date: Oct 2010
Device: kindle
Doing more playing in the CSS someone pointed me towards CSS play and view - try it

Which if you put this ( in the left hand side) and push the "click me" button you get to see the result and so is easy to play with it:

Code:
<html>
<head>
<style type="text/css">
body {
font-family: "Courier New", Monospace;
}
p.action {
text-align: left;
margin-left: 0px;
margin-right: 0px;
}
p.character {
text-align: left;
margin-left: 50%;
margin-right: 10px;
margin-bottom: 0px;
margin-top: 8px;
}
p.dialog {
text-align: left;
margin-left: 20%;
margin-right: 30px;
margin-top: 0px;
margin-bottom: 0px;
}
p.sceneheading {
text-align: left;
text-transform: uppercase;
}
p.sceneheading:before {
margin-bottom: -16px ! important;
}
p.sceneheading:after {
margin-top: -16px ! important;
}
p.transition {
text-align: right;
text-transform: uppercase;
margin-right: 15px;
}
p.parenthetical {
text-align: left;
margin-left: 23%;
margin-right: 20px;
}

</style>
</head>

<body>

<p id="FeCELmf0" scenestr="1" scenenumber="1" class="sceneheading">1 EXT
PEGASUS HOUSE - DAY 1</p>
<p class="action">Pegasus House is an impressive Georgian pile lapped by
extensive grounds. From the rear, nicely framed by ancient oaks, we see
peacocks on the lawn, hear the trickle of water, sense the peace and the
solitude. Off-screen, over a further selection of exterior shots, we hear a
snatch of dialogue. Malcolm Parkinson, the Director of Pegasus House, is a
Yorkshireman. Bonnie, his wife, comes from London. She has a mddle class accent.</p>
<p class="character">PARKINSON</p>
<p class="dialog">Have you got it, Bonnie?</p>
<p class="character">BONNIE</p>
<p class="dialog">Yes. It's here.</p>
<p class="character">PARKINSON</p>
<p class="dialog">Give it me then, I'll take it through We hear a door open and
close. Then more dialogue. Different male voice, older, softer. This is Martin
Prideaux, the CHAPLAIN.</p>
<p class="character">CHAPLAIN</p>
<p class="dialog">Unusual, don't you think?</p>
<p class="character">BONNIE</p>
<p class="dialog">Very.</p>
<p class="character">CHAPLAIN</p>
<p class="dialog">Are we comfortable with this?</p>
<p class="character">BONNIE</p>
<p class="dialog">No. If you want the truth, I think it's wierd. A period of
silence. Then the sound of a door opening.</p>
<p class="character">PARKINSON</p>
<p class="dialog">He's ready. But he wants me to stay.</p>
<p class="character">BONNIE</p>
<p class="dialog">Stay? You mean watch him?</p>
<p class="character">PARKINSON</p>
<p class="dialog">Yes.</p>
<p class="character">BONNIE</p>
<p class="dialog">Christ...sorry, Martin. We hear the door close again.</p>
<p id="HeCEErg0" scenestr="2" scenenumber="2" class="sceneheading">2 INT ANTE
ROOM - DAY 2</p>
<p class="action">Bonnie and the chaplain sit in the ante room. The room is
elegantly appointed: a scatter of period furniture, panelled walls, polished
oak floor. No windows. Bonnie is in her late thirties, conservatively dressed,
attractive, a hint of nerves beneath her businesslike poise. The chaplain, an
older man, wears his clerical garb.</p>
<p class="character">CHAPLAIN</p>
<p class="dialog">It's never easy, is it?</p>
<p class="character">BONNIE</p>
<p class="dialog">No. Especially doing it this way.</p>
</body>
</html>
Shows how a web browser views the code. Which is not a bad way to start understanding these things still not 100% certain how to undertand the differences But slowly getting there.
alanjay is offline   Reply With Quote
Reply

Tags
celtx, final draft, pdf, screenplay, script

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mac user needs help converting pdf's (TV Scripts) and keeping format!! mcforman Kindle Developer's Corner 12 06-20-2011 05:28 PM
Converting screenplays for a reader Sweeternity Calibre 1 03-04-2010 07:08 AM
Question about ePub for Screenplays sachinwalia ePub 2 12-18-2009 02:30 PM
Converting PDF to Sony format estral Sony Reader 22 04-29-2009 06:57 AM
Formatting Screenplays (non-PDF) mahler Workshop 1 03-20-2009 07:00 AM


All times are GMT -4. The time now is 04:31 PM.


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