Comment 3 for bug 1559855

Revision history for this message
Gunaddho Bhikkhu (taanpeter) wrote : Re: [Bug 1559855] Re: epub to pdf conversion results in random blank pages

Thank you for your attention and response. While I get the same result as
you with the same parameters, getting a good result seems to depend on
arbitrary margin sizes and a degree of luck with the output. As you can
imagine with longer books with more chapters it can be quite difficult to
render anything without blank pages.

For example, with these parameters, I still get at least one blank page in
the middle of the book:

ebook-convert ./*.epub test.pdf --override-profile-size --paper-size letter
--pdf-add-toc --pdf-page-numbers --disable-font-rescaling --embed-all-fonts
--preserve-cover-aspect-ratio --page-breaks-before=/ --toc-title=Contents
--subset-embedded-fonts --margin-left 66 --margin-right 66 --margin-top 66
--margin-bottom 66 --pdf-default-font-size 18 -vv

Interestingly, the old pdf engine seems to always get it right, but many
users really like the page numbers and table of contents so that they can
print the pdf out in hard copy.

I'm wondering if maybe there's some css, like line-height or top/bottom
margins at .2em for <p> that could be throwing off the conversion.

Thanks again for your efforts.

With metta,

Taan Peter

On Fri, Mar 25, 2016 at 8:23 PM, Kovid Goyal <email address hidden>
wrote:

> I get no blank pages when converting the attached file on my linux
> system, apart from one after the cover,w hich you can fix by using the
> proper svg markupfor full page covers in your epub file. See attached
> pdf. This was converted with:
>
> ebook-convert ./EstrategiaNoble_160320.epub t.pdf --override-profile-
> size --paper-size letter --margin-left 50 --margin-right 50 --margin-top
> 50 --margin-bottom 50 --pdf-default-font-size 18 --pdf-page-numbers -vv
>
> ** Attachment added: "t.pdf"
>
> https://bugs.launchpad.net/calibre/+bug/1559855/+attachment/4612090/+files/t.pdf
>
> ** Changed in: calibre
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1559855
>
> Title:
> epub to pdf conversion results in random blank pages
>
> Status in calibre:
> Incomplete
>
> Bug description:
> For the last number of versions, maybe since 2.40 but I'm using 2.52
> now, when I convert epub to pdf, I usually get at least a few blank
> pages in the pdf output. It seems to occur before a new chapter, but
> not always. Usually I have the ebook split with each chapter a
> separate <div> and the chapters split into their own html/xml files.
>
> It never used to do this, but now it's rare I can convert any epub to
> pdf without this happening. I'm running Arch Linux and I my calibre is
> updated directly from the calibre-ebook site, not from the repos.
>
> I am attaching the epub input and pdf output of a recent book I
> produced (it's in Spanish, but it's a fairly short and simple
> example). The serif font size set for pdf output is 18px, but I try at
> different pixel sizes and different margin sizes to try to get an
> output without blank pages, but usually with no success.
>
> I also don't think it has anything to do with page numbering or the
> auto table of contents output, as I still get blank pages with those
> options unselected.
>
> Thanks very much for any attention you can give this.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/calibre/+bug/1559855/+subscriptions
>