I'm integrating princexml into Deki Wiki
. I'd like to be able to authenticate using a cookie with a hashed authtoken. We're currently using html2ps | ps2pdf to do pdf conversion and html2ps has a -k option which accepts a Netscape-formatted cookie file. I'd love to see a feature like this in prince!
Sounds like a good idea! We'll take a look at this for the next maintenance release.
In the new Prince 6.0 rev 6 release we have added a --cookiejar command-line option, which points to a file containing authentication cookies.
There doesn't appear to be a way to specify cookies via the Java API. Any recommendations (or, an updated API) would be appreciated.
At the moment it is only possible to specify a "cookie jar" file that contains cookies, using the --cookiejar command-line option. We haven't added this to the Java API yet, but it would be easy to do. However, are you thinking of something that allows you to set cookies dynamically, eg. setCookie(String name, String value)?
Thanks for your reply. Yes, I was thinking about something that allows dynamic cookie setting, though I'd recommend a method that accepted more than a name/value pair, as cookies also allow specification of domain, path, isSecure, etc. I'd suggest:
public void setCookie( javax.servlet.http.Cookie cookie );
and a way to set all, with an array or collection:
public void setCookies(javax.servlet.http.Cookie cookies);
That API makes sense, although it is more work to implement. I'll add it to the roadmap
Prince 10 is now available, and includes a new --cookie command-line argument which can be used to specify individual cookies without needing to create a cookie jar file.
I am trying to using SetCookie method with other attributes of cookie like domain name and expires, but it only passes the cookie name, but domain and other attributes are not reflecting. Could you please help!!
Can you email me (firstname.lastname@example.org) an example of the syntax you are using?
Thanks for responding, I just sent the syntax to your email.