From 1f06be78100d14127d35786ec73ddfd4744741fc Mon Sep 17 00:00:00 2001 From: Nemo Date: Fri, 29 May 2020 01:29:29 +0530 Subject: [PATCH] Large font PDF --- README.md | 11 ++++++++--- generate.sh | 19 +++++++++++++++++-- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9588e25..b393cbc 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,16 @@ Generates ebooks for The Ickabog by J.K Rowling. Original text from https://www. `./generate.sh` -You should have `ickabog.epub`, and `ickabog.pdf` in your directory after the script finishes. +You should have `ickabog.epub`, and `ickabog.pdf` in your directory after the script finishes. If you have [ConTeXt](https://wiki.contextgarden.net/Main_Page) installed, you will also get a `ickabog-large.pdf` file with large fonts to be kid-friendly. -## Cover +## Known Issues -Currently no cover is available. If you'd like to submit a cover for this book, please let me know. I think a kid-drawn illustration would be perfect, keeping with the theme of the contest. +1. Currently no cover is available. If you'd like to submit a cover for this book, please let me know. I think a kid-drawn illustration would be perfect, keeping with the theme of the contest. +2. The PDF is optimized for few pages of printing, so has a small font size by default. If you'd like a kid-friendly version, install context to get `ickabog-large.pdf` file. + +## Extra + +A list of my other EBook generation projects: https://captnemo.in/ebooks/, includes a link to other related projects as well ## License diff --git a/generate.sh b/generate.sh index 3a5e16e..3a42d13 100755 --- a/generate.sh +++ b/generate.sh @@ -27,8 +27,7 @@ pandoc --from=html --to=pdf \ --dpi=300 \ -V book \ -V lang=en-US \ - -V geometry=margin=3cm \ - --columns=60 \ + -V geometry=margin=1cm \ "$HTML_FILE" pandoc --from=html --to=epub \ @@ -36,3 +35,19 @@ pandoc --from=html --to=epub \ --epub-metadata=metadata.xml \ --metadata title="The Ickabog" \ "$HTML_FILE" + +pandoc --from=html --to=pdf \ + -V fontsize=18pt \ + --output=ickabog-large.pdf \ + --metadata title="The Ickabog" \ + --metadata author="J.K Rowling" \ + --pdf-engine=context \ + -V margin-left=0cm \ + -V margin-right=0cm \ + -V margin-top=0cm \ + -V margin-bottom=0cm \ + -V geometry=margin=0cm \ + -V lang=en-US \ + "$HTML_FILE" + +