09-14-2021, 11:01 AM | #1 |
Addict
Posts: 288
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
|
printer offset in PDF conversion (revisited)
When converting EPUB to PDF using caliber while specifying (1) a one-inch printer margin and (1) half-inch printer offset, it is necessary to add one-half-inch to the width. If you want 6 x 9 you must specify 6.5 x 9. Otherwise the output will subtract the printer offset amount from the width. To state it again: if you put in 6 x 9 and if you put in half-inch offset, the output will end up one-inch inner, half-inch outer, but overall width is 5.5 x 9.
However, Okular reports correctly and Document Viewer does not. The example shown has 1 inch inner and half-inch outer and input is 6.5 x 9 I cannot find calibre documentation saying to add the offset to the desired width. Commercial printers prefer having the offset for inner margins so that the reader does not overly flatten the book in order to read the inner margin. The example used is in public domain without any unusual stylesheet CSS to confuse the converter. Best Regards, Pop |
09-14-2021, 11:47 AM | #2 |
creator of calibre
Posts: 43,914
Karma: 22669818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That looks like a bug in document viewer, given okular is reporting it correctly. Use the pdfinfo -box file.pdf tool to get more detailed info. Most likely document viewer is reporting one of the other boxes like the cropbox.
|
Advert | |
|
09-14-2021, 12:56 PM | #3 |
Addict
Posts: 288
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
|
Thank you for that. May I suggest a sentence in calibre's user docs regarding offset explaining the usage, that if you want offset, then add that amount to width. It shifts left and right, but also subtracts width by that amount. That was not clear to me. I wrestled with it, further confused by incorrect Document Viewer width reporting. It works great, though, now that I understand.
Best Regard, Pop |
09-14-2021, 10:56 PM | #4 |
creator of calibre
Posts: 43,914
Karma: 22669818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
PDF page sizing in complex, there is nothing that is an actual page size in pdf. Every page can define its own size via several "boxes", see for example:
https://www.prepressure.com/pdf/basics/page-boxes To understand what --pdf-odd-even-offset does, run: ebook-convert demo.epub .pdf --paper-size=a4 --pdf-odd-even-offset=36 pdfinfo -f 2 -l 4 -box demo.pdf (starting from 2 as the first page is a cover) This will show you the boxes for the first three pages. You will see that the mediabox, which is the largest box is the same for all three pages and is A4 size as expected. The rest fo the boxes are adjusted to give you the offset effect. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ebook-convert changes width of pdf pdf-odd-even-offset and pdf-add-toc used both | Lafisrap | Conversion | 4 | 09-04-2020 06:43 AM |
calibre's new "printer's offset" for PDF | rjwse@aol.com | Calibre | 0 | 12-05-2019 01:00 PM |
print pdf with "inside" margin offset | rjwse@aol.com | Conversion | 3 | 03-09-2017 08:17 AM |
PDF printer driver | mr ploppy | 10 | 07-21-2011 01:06 PM | |
try the Hanlin Conversion Software and Printer | CommanderROR | HanLin eBook | 9 | 08-06-2008 06:42 AM |