I am attempting to convert HTML documents to PDF format using a bash script. I've found that the Sejda converter does a good job of fully rendering the charts I need, but am having some trouble using it in the console rather than the web interface. Although the documentation at https://www.sejda.com/developers gives an example of how to convert a URL, does anyone know of a similar way to convert a local file in the console?
Asked
Active
Viewed 451 times
1 Answers
1
The HTML to PDF conversion is not available via the sejda-console.
However, you can convert a local file through the sejda.com API, not only URLs, by posting the file's HTML contents.
Here's an example converting HTML code from the command line:
curl -i https://api.sejda.com/v1/tasks\
--fail --silent --show-error \
--header "Content-Type: application/json" \
--data '{"htmlCode": "<strong>HTML<\/strong> code here",
"type": "htmlToPdf" }' > converted.pdf
Disclaimer: I'm one of the developers.

Edi
- 621
- 6
- 17
-
Does this mean that I can't use Sejda using the windows command console currently? – Pedro Jose Jul 09 '21 at 08:48