arachnys / athenapdf

Drop-in replacement for wkhtmltopdf built on Go, Electron and Docker
MIT License
2.26k stars 186 forks source link

Options not working in athenapdf-service v3 #129

Closed almini closed 7 years ago

almini commented 7 years ago

I tried to pass options to the athenapdf-service:3 but it seems that either my query is wrong or it doesn't work properly. My request looks like this:

curl -F file=@input.html -F process='{"conversion": {"mime_type": "text/html", "options": {"scale": {"double_value": 2}}}}' http://localhost:8080/process > output.pdf

The cmd version options work without issues.

MrSaints commented 7 years ago

Thanks for reporting this @almini. Looks like the service does not handle jsonpb. I have a fix which I will push up shortly. You should also alter your process JSON string to look like:

{
    "conversion": {
        "options": {
            "scale": {
                "doubleValue": 2
            }
        }
    }
}
MrSaints commented 7 years ago

If you pull the latest image, it should work as expected now (bearing in mind the example I gave):

docker pull arachnysdocker/athenapdf-service:3