I have a working web-to-pdf button using v2 of convert api.
<form action="https://v2.convertapi.com/web/to/pdf?Secret=XXX&download=attachment" method="post" enctype="multipart/form-data">
<input type="hidden" name="Url" value="https://www.zg.ch/behoerden/baudirektion/statistikfachstelle/daten/gemeindeportraits.html" />
<input type="hidden" name="FileName" value="Portrait" />
<input type="hidden" name="ConversionDelay" value="5" />
<input type="hidden" name="ViewportWidth" value="1200" />
<input type="hidden" name="ViewportHeight" value="1887" />
<input type="hidden" name="PageSize" value="a4" />
<input type="submit" value="Portrait als PDF ausgeben"/>
</form>
The url is changed using jquery depending on the selection on the page. That part works too.
The problem is that often people need to submit twice or even more to get all the pdf's they want and get a browser message warning them that they are about to submit the form a second time. Is there any way to avoid this message?
One way would be to create a button for every single possible file and hiding an showing the entire buttons depending on the selection using javascript/jquery, but that seems inefficient.
Since I'm working in a CMS I'm limited to html and javascript.
Thanks for any help.
I'm not sure, but once I faced a similar issue. I solved it by passing a random variable or timestamp along with the URL ie,
https://v2.convertapi.com/web/to/pdf?Secret=XXX&download=attachment&ignorethisparam=currenttimestamp