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 07-03-2023, 09:09 AM   #1
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Obtaining transparent PDF backgrounds

Hi all!

By running Prince PDF plugin, today I was able to get a transparent background on a PDF converted doc, after adding this line in CSS:

PHP Code:
body  {background:transparent !important;} 
This was a really cool find I wish I'd known about before.

However, in Calibre versions post-v3.48, I can't seem to find a workaround to get non-white background below text, upon converting from EPUB, MOBI etc., unless I edit the docs/ebooks internal CSS, to set a custom background color - inserting just that line I mentioned doesn't seem to work.

Is there perhaps some Extra CSS styling I can enter in the Look and Feel section of Calibre conversion, to get a fully transparent background?

So far, i've tried:

PHP Code:
* {background-colortransparent !important;}
* {
background-colorinherit !important;}
* {
background-colorinitial !important;}
* {
background-colorrevert !important;}
* {
background-colorrevert-layer !important;}
* {
background-color: unset !important;} 
Maybe there's some general HTML element in EPUB styling I'm not aware of, to which the wildcard doesn't apply...?

Reason I prefer transparent PDF in converted documents is that it's possible to add a custom background color using tools like PDF Xchange Editor, in order to reduce eye strain.

In the attachments you may see the difference between a Prince converted doc - with the "body bg transparent" CSS line addition, and the other one converted using Calibre native conversion, which has the advantage of running batch jobs...
Attached Files
File Type: pdf a - prince bg.pdf (102.5 KB, 67 views)
File Type: pdf b - calibre bg.pdf (144.7 KB, 70 views)

Last edited by Comfy.n; 07-03-2023 at 09:14 AM.
Comfy.n is offline   Reply With Quote
Old 07-03-2023, 09:24 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: 45,335
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
IIRC There is a prince pdf calibre plugin with which you can run batch conversion in calibre.
kovidgoyal is offline   Reply With Quote
Advert
Old 07-03-2023, 09:32 AM   #3
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by kovidgoyal View Post
IIRC There is a prince pdf calibre plugin with which you can run batch conversion in calibre.
Well, I couldn't find a batch option in Prince plugin :\
Anyway, Prince is awesome, but it's easier to adjust margins, paper size, font-sizes etc. in Calibre Conversion UI
Comfy.n is offline   Reply With Quote
Old 07-03-2023, 07:06 PM   #4
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,715
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Comfy.n View Post
Well, I couldn't find a batch option in Prince plugin :\
It's a GUI PI, try selecting multiple books.

BR
BetterRed is offline   Reply With Quote
Old 07-03-2023, 07:37 PM   #5
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by BetterRed View Post
It's a GUI PI, try selecting multiple books.

BR
I did that, it returns a message "Many books selected", "Select a single book". Additionally, I found that it doesn't like titles with slashes and maybe other special characters... Anyway, I was hoping someone would tell me something like "Hey, just add epub@page-body-* {background:transparent !god-mode-override;} to Extra CSS and you'll get it"

edit: I think what Prince PI actually doesn't like has something to do with long titles

Last edited by Comfy.n; 07-04-2023 at 10:16 AM.
Comfy.n is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
iBooks backgrounds minnieminx Apple Devices 0 02-12-2015 10:48 AM
Transparent images Iznogood ePub 3 12-31-2012 08:38 PM
Transparent Lovers Scott Nicholson Self-Promotions by Authors and Publishers 0 08-08-2011 06:14 PM
Backgrounds / resolution of NC? coolbreeze Nook Color & Nook Tablet 3 11-30-2010 11:07 PM


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


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