Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 05-05-2025, 02:33 PM   #1
Anonomaly
Junior Member
Anonomaly began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2025
Device: Kindle Paperwhite
Maintain screenplay formatting in epub

Hello,

In my work I need to read many screenplays every week. I've started to use an e-reader to reduce eye strain, and while it's technically possible to read PDFs on it, it would really help me a lot to be able to use the epub functions on KOReader.

As you may know, when converting screenplays from PDF to epub using Calibre results in losing the screenplay formatting, most notably aligning all text to one side, but sometimes also not keeping other parts like the scene headlines.

I searched the forums and it seems no one has brought up this issue in more than a decade, so I wanted to check if maybe since then there's been some option or plugin to retain the formatting that I couldn't find, or if anyone's figured out a way to do it using CSS. Alternatively, if anyone would be so kind to help me do it I'd really appreciate it because I don't know anything about CSS.

Thank you!
Anonomaly is offline   Reply With Quote
Old 05-05-2025, 02:56 PM   #2
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
I'm not familiar with the layout of a screenplay. Maybe you can post some screenshots or a sample pdf?

I am not aware of any screenplay specific converter, but I wouldn't imagine it too difficult to get the results using css.
Karellen is offline   Reply With Quote
Advert
Old 05-05-2025, 04:41 PM   #3
Anonomaly
Junior Member
Anonomaly began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2025
Device: Kindle Paperwhite
This is an in-depth article about screenplay formatting, but you can skim it or watch the short video embedded at the top.
And attached are two of the several sample files referenced in the article - a short general sample script and the full screenplay to Wes Anderson's The Royal Tenenbaums.

One thing which might not be immediately obvious concerning the formatting is that in screenplays the character name and parentheses are always centered, but the dialogue is indented and justified.

Let me know if I can give any additional information you might need.
Attached Files
File Type: pdf Short sample.pdf (109.6 KB, 52 views)

Last edited by issybird; 05-05-2025 at 05:00 PM. Reason: Remove pdf of copyrighted screenplay.
Anonomaly is offline   Reply With Quote
Old 05-05-2025, 05:55 PM   #4
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,677
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Which authoring software do you use, what are its output options.

E.G. Final Draft can save as HTML and RTF, which are better formats to convert to EPUB than PDF (which is the worst format to convert)

If all you have is PDF, convert that to DOCX by opening the PDF in Word, Save as DOCX and convert that to EPUB with calibre. Sample attached.

BR
Attached Files
File Type: zip Short sample - SC Lannom.zip (130.2 KB, 40 views)
BetterRed is offline   Reply With Quote
Old 05-05-2025, 06:32 PM   #5
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Your sample looks simple enough. I expect these screenplays will run into hundreds of pages with hundreds of conversation changes, so it will take a bit of work.

What @BetterRed states is the best way to go - converting from the original format, not the pdf.

But if you only have the pdf, it can still be done. Attached is a quick fix as proof of concept....
Only change is removal of page numbers as they don't mean anything in reflowable content. Instead I added a TOC.
Attached Files
File Type: epub Short sample - Unknown.epub (17.8 KB, 32 views)
Karellen is offline   Reply With Quote
Advert
Old 05-05-2025, 06:59 PM   #6
Bradles
Zealot
Bradles turned on, tuned in, and dropped out.Bradles turned on, tuned in, and dropped out.Bradles turned on, tuned in, and dropped out.Bradles turned on, tuned in, and dropped out.Bradles turned on, tuned in, and dropped out.Bradles turned on, tuned in, and dropped out.Bradles turned on, tuned in, and dropped out.Bradles turned on, tuned in, and dropped out.Bradles turned on, tuned in, and dropped out.Bradles turned on, tuned in, and dropped out.Bradles turned on, tuned in, and dropped out.
 
Bradles's Avatar
 
Posts: 105
Karma: 35586
Join Date: Nov 2020
Location: Perth, Western Australia
Device: Apple Books & Kobo Libra H20
Quote:
Originally Posted by Karellen View Post
...
Only change is removal of page numbers as they don't mean anything in reflowable content. Instead I added a TOC.
I would respectfully suggest that page numbers are important when reading a screenplay. You need to know where you are in the story to judge the flow.

Also, the OP would probably refer back to the original page number for notes.

Just my 2c.
Bradles is offline   Reply With Quote
Old 05-05-2025, 07:16 PM   #7
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by Bradles View Post
I would respectfully suggest that page numbers are important when reading a screenplay. You need to know where you are in the story to judge the flow.

Also, the OP would probably refer back to the original page number for notes.

Just my 2c.
Sure, understand. I don't know enough about screenplays, but it is easily added back.
I would have thought being able to jump directly to a scene via the TOC would be easier than trying to remember what page a scene is on, though.
Karellen is offline   Reply With Quote
Old 05-05-2025, 07:43 PM   #8
Anonomaly
Junior Member
Anonomaly began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2025
Device: Kindle Paperwhite
Thank you guys for your help.
I don't actually use any screenwriting software - I only receive PDFs from writers and they don't always agree or are technically savvy enough to export and send different formats.

But this is interesting! It hadn't occurred to me to open the PDF in Word and then converting the DOCX.
I actually tried that with a different screenplay and uploaded the epub, along with the two samples you both attached, to my device.
For some reason the file that Karellen made looked best on my Kindle, and reacted best to KOReader's styling options. It was also the only file of the three that could change fonts through KOReader, which is significant since I find specific fonts much easier and faster to read.
Could it be because of the removed page numbers and added TOC?
Which settings specifically did you use to do that?

Edit: Bradles is actually right that having page numbers would be more convenient when writing and giving notes, since most writers don't number their scenes until they're almost ready to shoot.
But readability is more important and if I'm right in my guess and the page numbers somehow make the files less compatible then I'd rather remove them and figure out some way to find the right page for a note.

Last edited by Anonomaly; 05-05-2025 at 07:46 PM.
Anonomaly is offline   Reply With Quote
Old 05-05-2025, 08:17 PM   #9
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by Anonomaly View Post
For some reason the file that Karellen made looked best on my Kindle, and reacted best to KOReader's styling options. It was also the only file of the three that could change fonts through KOReader, which is significant since I find specific fonts much easier and faster to read.
Could it be because of the removed page numbers and added TOC?
Which settings specifically did you use to do that?
No, nothing to do with page numbers and TOC.
The pdf conversion did not do a good job at maintaining the format, so I recoded the epub after conversion. This also meant I removed font references, so there is no forced reference to use Courier New / Monospace fonts in the epub. The conversion specifies this because that is what is used in the pdf.

If you open the stylesheet.css file in the conversion by @BetterRed, scroll to the bottom of the page, and you can see that Courier New and Calibri fonts are specified.


Quote:
Originally Posted by Anonomaly View Post
Edit: Bradles is actually right that having page numbers would be more convenient when writing and giving notes, since most writers don't number their scenes until they're almost ready to shoot.
But readability is more important and if I'm right in my guess and the page numbers somehow make the files less compatible then I'd rather remove them and figure out some way to find the right page for a note.
Fair enough. Though because of the reflow, and font size you choose on your ereader, page numbers won't really show where you expect them to show. A scene might be on page 2, but because of the above reasons, it may be another two or three page clicks further on before you find the scene. (for example).
Karellen is offline   Reply With Quote
Old 05-06-2025, 12:21 PM   #10
Anonomaly
Junior Member
Anonomaly began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2025
Device: Kindle Paperwhite
Quote:
Originally Posted by Karellen View Post
No, nothing to do with page numbers and TOC.
The pdf conversion did not do a good job at maintaining the format, so I recoded the epub after conversion. This also meant I removed font references, so there is no forced reference to use Courier New / Monospace fonts in the epub. The conversion specifies this because that is what is used in the pdf.

If you open the stylesheet.css file in the conversion by @BetterRed, scroll to the bottom of the page, and you can see that Courier New and Calibri fonts are specified.
Looking at the two files' stylesheet.css, I can see they're both quite different in more than just the font.
Is there by any chance a template I can use for all my future screenplay conversions, or specific parts of the code I should either delete or paste each time, to get the same effect as your conversion?
I assume the way the code works is much too complicated for me to simply copy/paste the entire code and expect the same result.
Anonomaly is offline   Reply With Quote
Old 05-06-2025, 08:34 PM   #11
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Mine wasn't really a conversion. It was a re-code of the epub. What I did is a manual process that can't be done with some check boxes in the Conversion dialogue screen.
As an aside, I never use the conversion dialogue, so I don't have a good understanding of what it is capable of and its limitations.

So your choice is...
1. The method by @BetterRed, which gets pretty close to what you are after and all you really need to do is delete those references to fonts in the stylesheet.css which will allow you to select the font used by your ereader
This method is quick and easy, but may not give you 100% what you want.

2. The re-code method. It will give you exactly what you want but is a very time-consuming process.

If you want to go with method 2, I can give you my stylesheet.css as a starting point. But you will also need to replace all the code in the files that contain the screenplay text to match the new tags in the css file.
Karellen is offline   Reply With Quote
Old 05-07-2025, 05:17 PM   #12
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 13,837
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Screenplays properly styled in Word or LO Writer (only edit ODT) and then imported to Calibre via docx need no extra work if there are no images. Images can sometimes need the CSS edited.
Quoth is offline   Reply With Quote
Old 05-07-2025, 08:48 PM   #13
Anonomaly
Junior Member
Anonomaly began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2025
Device: Kindle Paperwhite
Quote:
Originally Posted by Karellen View Post
So your choice is...
1. The method by @BetterRed, which gets pretty close to what you are after and all you really need to do is delete those references to fonts in the stylesheet.css which will allow you to select the font used by your ereader
This method is quick and easy, but may not give you 100% what you want.

2. The re-code method. It will give you exactly what you want but is a very time-consuming process.
Thank you for laying out my options clearly.
If it's not too much of a bother, I'd like to give the re-code method a crack using your stylesheet.css.
If I find it's too big of a task for me, I'll try the first method.

Quote:
Originally Posted by Quoth View Post
Screenplays properly styled in Word or LO Writer (only edit ODT) and then imported to Calibre via docx need no extra work if there are no images. Images can sometimes need the CSS edited.
Thanks for the tip. I'll try removing the cover pages with images before converting to docx and see if it improves the outcome.
Anonomaly is offline   Reply With Quote
Old 05-08-2025, 01:18 PM   #14
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 13,837
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
A cover for the whole thing is best never in Word/LO Writer, but added directly to Calibre to add to the ebook.

In fact for publishing all retailers ignore the included epub cover and require a twice as good separate image upload. This is clue

PDFs are only for printing, giant tablets, QHD or better screens, or publishing on paper. Abysmal for conversion or phones orr ereaders.
Quoth is offline   Reply With Quote
Old 05-08-2025, 09:45 PM   #15
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by Anonomaly View Post
Thank you for laying out my options clearly.
If it's not too much of a bother, I'd like to give the re-code method a crack using your stylesheet.css.
If I find it's too big of a task for me, I'll try the first method.
No problems. Just copy the text to your css file... https://paste.kodi.tv/tiwoxoluhu
Do you have some experience with this? It's not just as simple as pasting the new css into the ebook and you are done. The rest of the ebook - every paragraph, every blockquote, italic, bold etc - also needs to be updated accordingly.
If you have no previous exposure to this, it will be a steep learning curve. But most of us will be happy to answer questions.
Karellen is offline   Reply With Quote
Reply

Tags
calibre, conversion, epub, pdf, screenplay


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
EPUB views fine in Apple Books but formatting distorted in Calibre epub viewer kirk8677 Viewer 5 10-28-2020 01:46 PM
Help with Epub formatting - Smashwords Epub Checklist Galimah ePub 26 10-20-2019 04:05 PM
How to convert from epub to pdf and maintain original pagination format? zenorb Conversion 16 03-03-2013 12:46 PM
Screenplay e-books Scott Nicholson Self-Promotions by Authors and Publishers 0 01-01-2011 12:17 PM
How do I maintain formatting when converting to lrf? corroonb Calibre 2 03-11-2009 12:59 PM


All times are GMT -4. The time now is 07:42 AM.


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