Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > PDF

Notices

Reply
 
Thread Tools Search this Thread
Old 02-06-2019, 06:18 PM   #1
Lodan
Junior Member
Lodan began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2019
Device: none
Post Calibre PDF Output: Adding Background Rgb colors customization options and Font Color

Hi everyone!

New here.
I have a request for the following feature if possible with PDFs.
Adding Background Rgb colors customization options and
Font Color customization options to the PDF output in Calibre converter


Would be great to have the option to color the background of
the PDF page other than the default white, and if possible too the font color.
It would be of great help to make is easier on the eyes for on screen PDFs reading.

This feature is currently available in
Calibre> Epub viewer> Preferences> User Stylesheet tab.

I use the following background color code within the viewer to read
my epubs and would love to replicate them on my PDFs.

Many thanks for your help.


body {

color: rgb(0,0,0);


background-color:rgb(237,229,206);

text-align:justify;

line-spacing:1.8;

margin-top:10px;

margin-bottom:4px;

margin-right:20px;

margin-left:20px;

text-indent:2em;

}

h1, h2, h3, h4, h5, h6 {

color:black;

text-align:center;

font-style:italic;

font-weight:bold;}


Last edited by Lodan; 02-06-2019 at 06:26 PM.
Lodan is offline   Reply With Quote
Old 02-06-2019, 09:21 PM   #2
Lodan
Junior Member
Lodan began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2019
Device: none
Hi again,

It is possible with Adobe Reader, and PDFElement as below:

Why not in Calibre?

https://www.youtube.com/watch?v=IO6KTVsZQkg


https://youtu.be/G2JiejYzORk?t=37

Last edited by Lodan; 02-06-2019 at 09:23 PM.
Lodan is offline   Reply With Quote
Old 02-07-2019, 08:34 AM   #3
willus
Fuzzball, the purple cat
willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.
 
willus's Avatar
 
Posts: 1,273
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by Lodan View Post
Would be great to have the option to color the background of the PDF page other than the default white, and if possible too the font color.
It would be of great help to make is easier on the eyes for on screen PDFs reading.
This probably belongs in the calibre forum somewhere, but just so you know, you can post-process your PDF with k2pdfopt to do this. See the -colorbg and -colorfg options (see command-line usage).

E.g. k2pdfopt -mode copy -colorbg ffff00 -colorfg 0000ff mydoc.pdf

... would make the background yellow and the text blue. The drawback is that you would be required to convert the PDF to bitmapped form (but the text would still be searchable and selectable). See example attached.

k2pdfopt -colorfg 0000ff -colorbg ffffd0 -mode copy pooh.pdf

Also see my other recent post mentioning this.
Attached Files
File Type: pdf pooh.pdf (1.47 MB, 460 views)
File Type: pdf pooh_k2opt.pdf (496.9 KB, 409 views)

Last edited by willus; 02-07-2019 at 08:36 AM. Reason: Forgot attachments
willus is offline   Reply With Quote
Old 02-08-2019, 10:02 AM   #4
Lodan
Junior Member
Lodan began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2019
Device: none
Thanks willus for the idea and example.

I was looking for the feature in Calibre for the following application benefits:

when converting epubs to PDFs in Calibre simply
customizing the background color and fonts color.

Would be great also to be able to convert Epubs to PDFs
with custom background color and font color in Batch.

It would be also of great help for dyslexic people,
or people with reading disability wanting to convert their Epubs to PDF with Calibre.

Would save time and steps. The customization is already
available in Adobe Reader since 2013 at least as shown here:
https://www.youtube.com/watch?v=IO6KTVsZQkg

Here Kovid said (in 2016) it was difficult in Calibre:
https://www.mobileread.com/forums/sh...d.php?t=273117

Why since it is possible in Adobe Reader since 2013?

Thanks for any further help you can all provide.

Cheers

Last edited by Lodan; 02-08-2019 at 10:11 AM.
Lodan is offline   Reply With Quote
Old 02-09-2019, 06:34 AM   #5
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Calibre is open source. If you disagree with Kovid's view that it would be difficult, my suggestion would be to make the change yourself, and then submit the code changes to Calibre.
HarryT is offline   Reply With Quote
Old 02-09-2019, 02:25 PM   #6
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Lodan View Post
Would be great also to be able to convert Epubs to PDFs with custom background color and font color in Batch.
You can also install Prince and generate .pdf files with the Calibre Prince PDF plugin or the prince command line tool.
Doitsu is offline   Reply With Quote
Old 02-17-2019, 09:09 AM   #7
Lodan
Junior Member
Lodan began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2019
Device: none
Quote:
Originally Posted by HarryT View Post
Calibre is open source. If you disagree with Kovid's view that it would be difficult, my suggestion would be to make the change yourself, and then submit the code changes to Calibre.
Is it still difficult today in Calibre?

If yes, why/what needs to be done to make it feasible?

Thanks for specific suggestions.
Lodan is offline   Reply With Quote
Old 02-17-2019, 09:09 AM   #8
Lodan
Junior Member
Lodan began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2019
Device: none
Quote:
Originally Posted by Doitsu View Post
You can also install Prince and generate .pdf files with the Calibre Prince PDF plugin or the prince command line tool.
Thanks for your answer. I'll take a look at Prince.
Lodan is offline   Reply With Quote
Reply

Tags
pdf and calibre, pdf as ebook, pdf background color, pdf custom colors, pdf font color


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing font color OR background color for an entry dkperez Library Management 2 06-29-2015 11:50 PM
Problem with font & background colors on the Ebook Viewer darthktulu Calibre 3 10-27-2013 11:24 PM
iBooks Text background color that is limited to font height? FunkeXMix ePub 2 12-14-2012 12:27 PM
font color and background arslonga ePub 1 08-23-2011 04:23 AM
Does HS support customizing background and font color? Calvin998 Reading and Management 3 02-12-2004 04:36 PM


All times are GMT -4. The time now is 12:50 AM.


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