All Collections
Author Help
I like Leanpub's EPUB files, but want to replace the Leanpub-generated PDF with one of my own.
I like Leanpub's EPUB files, but want to replace the Leanpub-generated PDF with one of my own.

If you use LaTeX or have a designer to make a custom PDF, but you want to use our book generation for EPUB, read this!

Leanpub Support avatar
Written by Leanpub Support
Updated over a week ago

If you have a designer or you are good with LaTeX, you may have already produced a PDF that you're happy with.  But if you have the ability to generate Leanpub Flavoured Markdown or Markua from your manuscript sources (via a script) or if you are already writing in Leanpub Flavoured Markdown or Markua, you may still want to use Leanpub's book generation to produce EPUB files.

If so, good news! We have a hidden feature which this article is the first to explain.

This feature works if you are using Dropbox or GitHub to sync with Leanpub.

Here's what you do:

  1. Make a folder called custom in your book folder. It should be a sibling of the manuscript  directory, NOT inside the manuscript  directory.

  2. To override the book, put a custom PDF file inside that folder. It MUST be named <your-book-slug>.pdf .  For example, for a book whose URL is https://leanpub.com/lean the file would be called lean.pdf .

  3. To override the book sample (optional), put a custom PDF file inside that folder. It MUST be named <your-book-slug>-sample.pdf . For example, for a book whose URL is https://leanpub.com/lean the file would be called lean-sample.pdf .

Then, publish a new version! Your PDF (and, if you provided one, your sample) will override the one we generate, but you'll still get our EPUB versions.

Note that this feature allows you to override any file format. So, if for some reason you like our PDFs but you really hate our EPUB files, you could override the EPUB file only.  We’ve never had anyone use it that way, but it works.

Finally, if you just want to upload a book, you don't need to use this approach.  Instead, just use our Upload writing mode to upload all your book files by drag and drop...


If you have any feedback or questions about this article, please email the Leanpub team about it at hello@leanpub.com!

If you have any questions or thoughts on writing and self-publishing with Leanpub, please join our global community of authors in our Authors Forum here!

Are you interested in self-publishing, and creating your first Leanpub book? Here are some quick tutorials for our most popular writing modes: http://help.leanpub.com/en/articles/3088382-quick-walkthroughs-for-getting-started-on-a-leanpub-book

Are you looking for great deals on Leanpub ebooks, ebook bundles, and courses? Sign up for our Weekly and Monthly newsletter sales here!

Subscribe to our YouTube channel here: https://www.youtube.com/leanpub

Please subscribe to our YouTube channel here: https://www.youtube.com/leanpub

You can also follow Leanpub in lots of other places!

Did this answer your question?