Cannot import custom stylesheet in rst2pdf

298 Views Asked by At

I try to run this command:

rst2pdf /home/desarrollador/Projects/HUAWEI-3G-PROJECT/documentor.py.rst -o /home/desarrollador/Projects/HUAWEI-3G-PROJECT/documentor.py.pdf --stylesheet-path=/home/desarrollador/Projects/HUAWEI-3G-PROJECT --stylesheets="huawei.json"

This file exists: /home/desarrollador/Projects/HUAWEI-3G-PROJECT/documentor.py.rst.
This file also exists: /home/desarrollador/Projects/HUAWEI-3G-PROJECT/huawei.json. Its contents:

{
    "pageSetup": {
        "size": "A4-landscape"
    }
}

However I get this error:

[WARNING] styles.py:624 Can't find stylesheet "huawei.json"

How can I solve it? (Version: 0.93.dev-r0)

1

There are 1 best solutions below

0
On

Found the highly unintuitive solution: remove quotes.

rst2pdf /home/desarrollador/Projects/HUAWEI-3G-PROJECT/documentor.py.rst -o /home/desarrollador/Projects/HUAWEI-3G-PROJECT/documentor.py.pdf --stylesheet-path=/home/desarrollador/Projects/HUAWEI-3G-PROJECT --stylesheets=huawei.json