docker-weasyprint icon indicating copy to clipboard operation
docker-weasyprint copied to clipboard

Using curl in your example

Open mmynsted opened this issue 8 years ago • 2 comments

I am using curl 7.52.1. I find that what you have in the README.md file does not work for me, but the following does.

curl -X POST \
-H Content-Type:text/html \
-T ./test.html http://127.0.0.1:5001/pdf?filename=test.pdf \
-o test.pdf

This uses -H to set the Content-Type, and -T to upload the file. Because this is an example, I added -o to store the response in a file that can be examined with a PDF reader.

mmynsted avatar Dec 09 '17 05:12 mmynsted

For me, it was just sufficient to add the -H Content-Type...

vojkny avatar Apr 06 '18 04:04 vojkny

This was useful to me!

I was using this docker image: aquavitae/weasyprint.

oupala avatar Dec 14 '18 15:12 oupala