-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Description
Hi,
This isn't really an issue with the api2pdf java API, but, I think you guys might be able to help.
After successfully invoking the api and receiving a response I have the following:
Api2PdfResponse pdfResponse =
a2pClient.headlessChromeFromHtml(baos.toString("UTF-8"), false, "wps.pdf", options);
String pdfUrl = pdfResponse.getPdf();I want to download the file in pdfUrl but I keep getting a 403 forbidden.
I've tried, URLDecoding the value (and not decoding) the URL. I've tried using apache.commons.FileUtils.copyInputStreamToFile(); and i've tried making my own download (using URLConnection) but I always get the 403 return code.
I've printout the pdfUrl and copy it to the address bar of my browser, it works perfectly. What header/cookie am I missing in the java side to be able to download the file?
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels