option --POST-FILE

92 views
Skip to first unread message

patrick moire

unread,
Aug 24, 2022, 3:49:51 AM8/24/22
to wkhtmltopdf General
hello, I would like to do conversion tests with wkhtmltopdf and I need to send data in POST. In the notice, I saw an  command line  option --POST-FILE , but I couldn't find an example showing the structure of such a file. Thanks

patrick moire

unread,
Aug 24, 2022, 8:27:44 AM8/24/22
to wkhtmltopdf General
I just understood that the --post-file option is not a file containing a list of POST fields but the post of a file...

Jonathan Rynd

unread,
Aug 26, 2022, 12:22:57 AM8/26/22
to wkhtmltop...@googlegroups.com
One way to handle this is to use a program like curl or httpie that will submit the POST and save the resulting html , and then feed that into wkhtmltopdf with the appropriate base url. Or create a proxy that will translate wkhtmltopdf's GET into a POST with the appropriate fields.

On Wed, Aug 24, 2022 at 3:49 AM patrick moire <infoc...@bigard.fr> wrote:
hello, I would like to do conversion tests with wkhtmltopdf and I need to send data in POST. In the notice, I saw an  command line  option --POST-FILE , but I couldn't find an example showing the structure of such a file. Thanks

--
===================================================
You received this message because you are subscribed to the "wkhtmltopdf General" group.
To post to this group, send email to wkhtmltop...@googlegroups.com
To unsubscribe from this group, send email to wkhtmltopdf-gen...@googlegroups.com
 
For more options, visit this group at
http://groups.google.com/group/wkhtmltopdf-general?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups "wkhtmltopdf General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wkhtmltopdf-gen...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wkhtmltopdf-general/3bf3a060-1225-4065-a7fa-b69971a347adn%40googlegroups.com.


--

Jonathan Rynd

Senior Software Engineer

Wunderkind

wunderkind.co


Jonathan Rynd

unread,
Aug 26, 2022, 12:36:58 AM8/26/22
to wkhtmltop...@googlegroups.com
You don't need to use --post-file. You need to use --post field value, possibly multiple times. For instance, if you need to post the fields "username" and "password", your command line might include:

wkhtmltopdf --post username infocentre --post password swordfish http://secret.website.example.com/login/

As usual, use quote/escape if it includes spaces or special characters.

On Wed, Aug 24, 2022 at 3:49 AM patrick moire <infoc...@bigard.fr> wrote:
hello, I would like to do conversion tests with wkhtmltopdf and I need to send data in POST. In the notice, I saw an  command line  option --POST-FILE , but I couldn't find an example showing the structure of such a file. Thanks

--
===================================================
You received this message because you are subscribed to the "wkhtmltopdf General" group.
To post to this group, send email to wkhtmltop...@googlegroups.com
To unsubscribe from this group, send email to wkhtmltopdf-gen...@googlegroups.com
 
For more options, visit this group at
http://groups.google.com/group/wkhtmltopdf-general?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups "wkhtmltopdf General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wkhtmltopdf-gen...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wkhtmltopdf-general/3bf3a060-1225-4065-a7fa-b69971a347adn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages