![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: May 2018
Device: iBook
|
How to add image logo to the header when converting to pdf
Calibre does a very good job of converting ePUB to pdf. One thing I am still not able to achieve is to add an image (like a logo) to the header.
Is it supported? I tried something like: --pdf-header-template "<table><tr><td width='30%'><img src='EPUB/img/logo.png'/></td><td width='40%' align='center'>Some Title</td><td width='30%' align='right'>Jan 21, 2018</td></tr></table>" Tried various path in src attribute if img tag but to no avail. Is there any plan to add this in case it is not supported yet? Thanks |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,324
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can use any arbitrary HTML you like, however you cannot use paths, instead use a data URL (google how to create and use them).
|
![]() |
![]() |
![]() |
#3 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: May 2018
Device: iBook
|
Thanks for your reply Kovid.
But it did not work with dataURL as well. I used following img tag <img src='data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOy DZu6QdvCchPGolfO0o/XBs/fNwfjZ0frl3/zy7////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAACH5BAkAABAALAAAAAAQABAAAAVVICSOZGlCQ AosJ6mu7fiyZeKqNKToQGDsM8hBADgUXoGAiqhSvp5QAnQKGIg UhwFUYLCVDFCrKUE1lBavAViFIDlTImbKC5Gm2hB0SlBCBMQiB 0UjIQA7'/> Please let me know if I am missing anything. |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,324
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Post the full command line you are using.
|
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: May 2018
Device: iBook
|
"C:\Program Files\Calibre2\ebook-convert.exe" test.epub .pdf --pdf-footer-template "<p style='text-align:center; text-indent: 0;'>_PAGENUM_</p>" --pdf-header-template "<table width='100%'><tr><td width='40%' align='center'>Name Here</td><td width='30%' align='center'><img src='data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOy DZu6QdvCchPGolfO0o/XBs/fNwfjZ0frl3/zy7////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAACH5BAkAABAALAAAAAAQABAAAAVVICSOZGlCQ AosJ6mu7fiyZeKqNKToQGDsM8hBADgUXoGAiqhSvp5QAnQKGIg UhwFUYLCVDFCrKUE1lBavAViFIDlTImbKC5Gm2hB0SlBCBMQiB 0UjIQA7'/></td><td width='30%' align='center'>Jan 18, 2018</td></tr></table>"
|
![]() |
![]() |
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,324
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: May 2018
Device: iBook
|
Great. Thanks. I will check in next release. Any tentative date?
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to just add a cover page in a pdf file without converting it? | bob_bookworm | Conversion | 10 | 01-10-2025 04:03 AM |
In a tough spot, need to add gutter (inner margin) while converting epub->pdf | Terikan | 1 | 08-11-2016 04:53 AM | |
Did you encounter a same problem about converting PDF to text/word/image | Ivymin | 3 | 11-29-2011 08:45 PM | |
add image to pdf | moomintroll | Library Management | 1 | 07-25-2011 08:39 PM |
converting epub to pdf: can't get the front page image in | Nicoo | Calibre | 3 | 12-05-2009 08:18 AM |