<?php
error_reporting(E_ALL);
ini_set("display_errors", 1); 
set_time_limit(90);
//ini_set('memory_limit', '128M');




$titulo="5_-_31_de_janeiro_de_2013";

$mydir=dirname(__FILE__);
$wpath="\"C:\Program Files (x86)/wkhtmltopdf/wkhtmltopdf.exe\"";
//$wpath=$mydir . "/inc/wkhtmltopdf";
//$wpath="wkhtmltopdf";
$woptions="--page-size A4 --orientation Landscape  --zoom 1.2 --disable-smart-shrinking";
//$html_file=$mydir ."/netimages/html/ecclesia_" . $titulo . ".html";
$html_file="http://agencia.ecclesia.pt/semanario/netimages/html/caritas_" . $titulo . ".html";
$pdf_file=$mydir ."/netimages/pdf/ecclesia_" . $titulo . ".pdf";


print "Gerou $titulo <br>";

print "$wpath $woptions $html_file $pdf_file";

$ret = shell_exec("$wpath $woptions $html_file $pdf_file");
print $ret;


?>