-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
We have the ability to set whtmltopdf options via HTTP Header,
but that only works for argument with a value I'm afraid.
HTTP headers are read here:
Lines 39 to 41 in 8f9ce76
for k, v in request.headers.items(): | |
if k.startswith('Pdf-') or k.startswith('Pdf_'): | |
config[k[4:].lower()] = v.lower() |
Then in:
Lines 33 to 42 in 8f9ce76
def _convert_args(**py_args): | |
cmd_args = [] | |
for name, value in py_args.items(): | |
if value in {None, False}: | |
continue | |
arg_name = '--' + name.replace('_', '-') | |
if value is True: | |
cmd_args.append(arg_name) | |
else: | |
cmd_args.extend([arg_name, str(value)]) |
The only way to get the argument on the command line is to have a real True
.
So via the API we can't get options like --disable-javascript
or even --lowquality
.
Metadata
Metadata
Assignees
Labels
No labels