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-15-2020, 03:45 AM   #1
jee7no
Junior Member
jee7no began at the beginning.
 
Posts: 5
Karma: 10
Join Date: May 2020
Device: reMarkable
AZW3 to PDF: font size key doesn't work on all pages

Hello, I'm converting a book from AZW3 to PDF. I went to Look & Feel, then I set these values:

Base font size: 12.0pt
Font size key: 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0

Then I hit convert. I expected the output PDF to only use 12pt font.

Most pages are in 12pt font. However, random scattered pages are in a much smaller font, maybe 8pt.

Is this expected or is there a possible workaround to ensure the PDF only uses 1 font size?
jee7no is offline   Reply With Quote
Old 05-15-2020, 05:42 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,881
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://www.mobileread.com/forums/sh...d.php?t=186697
kovidgoyal is offline   Reply With Quote
Old 05-15-2020, 12:55 PM   #3
jee7no
Junior Member
jee7no began at the beginning.
 
Posts: 5
Karma: 10
Join Date: May 2020
Device: reMarkable
Ah, whoops. Sorry, thanks for letting me know how to improve my question.

I've uploaded some files here: https://filebin.net/jj2hivx1lj7cxccc
It has:
1. A 3-page sample of the input azw3, input.azw3.
2. The resulting output pdf, output.pdf. For some reason this converts to more than 3 pages, but that's a separate issue.
3. The job details, job_details.log.

The only setting I tweaked was the font settings from above. There were no errors during conversion.

I also did a debug conversion and saw that the HTML files in the `processed` folder seemed to have the correct font size.
jee7no is offline   Reply With Quote
Old 05-16-2020, 12:17 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,881
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That's rather weird. I could workaround the issue by converting to epub first and converting that to PDF, but that should be unnecessary
kovidgoyal is offline   Reply With Quote
Old 05-16-2020, 12:36 AM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,881
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It was caused by the large <pre> blocks that caused the browser tho shrink the font size to make it fit on the page. This should take care of it: https://github.com/kovidgoyal/calibr...6207afbed11933
kovidgoyal is offline   Reply With Quote
Old 05-16-2020, 03:45 PM   #6
jee7no
Junior Member
jee7no began at the beginning.
 
Posts: 5
Karma: 10
Join Date: May 2020
Device: reMarkable
Whoa, awesome! That fixed that page!

I cloned latest master and tested out the new changes on the whole book. Unfortunately, some pages later the small text returned. ^_^'

I uploaded new files: https://filebin.net/50a2d3t8nxtfsxot
* input_2.azw3 - starts at the same page as before, but added a few more pages
* job_details_2.log
* output_2.pdf - page 18, 20, 21 now have the small text

Also like before, the only settings I changed from the default are these:

Base font size: 12.0pt
Font size key: 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0
jee7no is offline   Reply With Quote
Old 05-16-2020, 05:12 PM   #7
jee7no
Junior Member
jee7no began at the beginning.
 
Posts: 5
Karma: 10
Join Date: May 2020
Device: reMarkable
Oh, interesting. I tried the work around you mentioned.

Going from AZW3 -> EPUB -> PDF seems to produce the best results.

AZW3 -> PDF seems to have more inconsistencies.
jee7no is offline   Reply With Quote
Old 05-16-2020, 06:47 PM   #8
jee7no
Junior Member
jee7no began at the beginning.
 
Posts: 5
Karma: 10
Join Date: May 2020
Device: reMarkable
Oh, and just in case anyone else is watching. I did figure out how to get rid of the blank pages in the final PDF.

When converting from EPUB to PDF, I cleared the values of these text fields:
Structure detection > Detect chapters
Structure detection > Insert page breaks before path

Output PDF looks great now. Even the TOC is working great.
jee7no is offline   Reply With Quote
Old 05-19-2020, 11:36 AM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,881
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That will be because there is unwrappabe content in the <pre> block that does not fit, like a URL.
kovidgoyal is offline   Reply With Quote
Reply

Tags
azw3 conversion, font resize, pdf conversion


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Azw3 to pdf: increase font size bcbob Conversion 2 08-01-2016 04:14 PM
Problem changing font size using font size key Waylander Conversion 0 10-02-2013 03:30 PM
K3.4 full font hack doesn't support AZW3/KF-8 lp1900 Kindle Developer's Corner 0 07-17-2013 11:07 AM


All times are GMT -4. The time now is 06:47 AM.


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