View Single Post
Old 07-06-2021, 05:43 PM   #31
lxs602
Junior Member
lxs602 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2021
Device: none
PrincePDF and styles.css on Linux

Hi,

I am trying to use the PrincePDF plugin on Sigil 1.6.0 on Linux.

I added
Code:
 "style": true,
to /home/user/.local/share/sigil-book/sigil/plugins_prefs/PrincePDF/PrincePDF.json to enable a custom stylesheet, style.css.

I put a custom style.css in the following directories, but the plugin does not find it (The epub file is in /home/user):

Quote:
/home/user/.local/share/sigil-book/sigil/plugins_prefs/PrincePDF/PrincePDF.json
/home/user/.local/share/sigil-book/sigil/plugins/PrincePDF
/home/user/.local/share/sigil-book/sigil/
/home/user
I get the error:
Code:
prince: Applying style sheets...
prince: loading style sheet: ../style.css
prince: ../style.css: warning: can't open input file: No such file or directory

The below is just a guess as I cannot code (it did not work), but I also tried temporarily changing the line in plugin.py , from:
Code:
stylesheet_path = os.path.join(bk._w.plugin_dir, bk._w.plugin_name, 'style.css')
to:
Code:
stylesheet_path = os.path.join('/home/user', 'style.css')
Where should I put the styles.css file?

Thanks,

L

Last edited by lxs602; 07-06-2021 at 05:47 PM.
lxs602 is offline   Reply With Quote