Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CookieJar #44

Open
l-baszak opened this issue Sep 4, 2020 · 2 comments
Open

CookieJar #44

l-baszak opened this issue Sep 4, 2020 · 2 comments

Comments

@l-baszak
Copy link

l-baszak commented Sep 4, 2020

Hi,
I'm trying to pass cookies to my html conversion, but have no idea how. HtmlToPdf contains cookieJar method, but passing string like this ->"COOKIE_LABEL="COOKIE_VALUE"; expires=Thu, 03-Sep-2020 12:53:09 GMT; domain=mail.intalio.pl; path=/;") doesn't actually make any difference. I try to pass authentication cookie with session id, which will resolve my image href into actual image object.

@l-baszak
Copy link
Author

l-baszak commented Sep 4, 2020

I'm also adding my code snippet which using for converting

HtmlToPdf pdf_obj = HtmlToPdf.create()
                .object(HtmlToPdfObject.forHtml(<HTML_STRING>).useExternalLinks(true).enableJavascript(true).convertInternalLinksToPdfReferences(true).loadImages(true))
                .cookieJar("ZM_AUTH_TOKEN=\"<AUTH_TOKEN_STRING>\"; expires=Thu, 03-Sep-2020 12:53:09 GMT; domain=some-domain.pl; path=/;");

  boolean success = pdf_obj.convert("./test.pdf");

@sliqiao
Copy link

sliqiao commented May 23, 2023

I also have the problem,but i do not know how to solve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants