HTML2PDF Send Cookies to URL

We are trying to convert an html page to pdf, but the URL we are posting to wants a cookie to be passed. Can this be done in HTML2PDF?

The HTML2PDF.SetCookieJar method is what you are looking for.

http://www.pdftron.com/pdfnet/docs/PDFNet/?topic=html/M_pdftron_PDF_HTML2PDF_SetCookieJar.htm

The parameter is a file path.

Do you have an example of how to use this?

Add the following line before converting.

html2pdf.SetCookieJar("cookies.txt")

After converting, there will be a file in the current working directory called cookies.txt. You can see the format, and if you like, you can fill it with your own cookies.