![]() |
#1 |
Junior Member
![]() 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? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,163
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
![]() |
#3 |
Junior Member
![]() 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. |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,163
Karma: 27110894
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
|
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,163
Karma: 27110894
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
|
![]() |
![]() |
![]() |
#6 |
Junior Member
![]() 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 |
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() 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. |
![]() |
![]() |
![]() |
#8 |
Junior Member
![]() 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. |
![]() |
![]() |
![]() |
#9 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,163
Karma: 27110894
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.
|
![]() |
![]() |
![]() |
Tags |
azw3 conversion, font resize, pdf conversion |
|
![]() |
||||
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 |