I'd like to print a document with PDFreactor using PHP.
Unfortunately, the document generation fails when specifying cookies in the configuration. Leaving out the cookies line prints our login page - with is correct as the page displays a login screen if no session cookie could be identified.
$config = array(
"document"=> "http://localhost",
"logLevel"=> LogLevel::DEBUG,
"javaScriptMode" => JavaScriptMode::ENABLED_TIME_LAPSE,
"enableDebugMode" => true,
"cookies" => array("sid" => "abcdefghijklmno")//<-- problematic line
);
Could anybody verify that cookie passing fails with PHP or give advice about the correct syntax?
The issue is caused by a mistake in the syntax of your cookie configuration. The correct syntax would be:
For multiple cookies: