I'm trying to set up a PDF printing solution using a specific template created for this purpose, with no javascript. Just pure CSS and images.
Here's a link to one of these pages: http://87406-www.web.tornado-node.net/pdf/hus/odel
The resulting PDF has a black border on the right side, all through to the bottom, and a few characters doesn't render correctly. But they do on the first page! These are Norwegian characters that is. Any ideas? I tried typing these characters here, but that gave me a Phorum error. So your forum php doesn't support these characters either :p
My PHP file looks like this, shouldn't be anything extraordinary here I think
<?php
if (isset($_GET['url'])) {
$url = $_GET['url'];
require 'pdfcrowd.php';
try
{
// create an API client instance
$client = new Pdfcrowd(" ", " ");
// convert a web page and store the generated PDF into a $pdf variable
$pdf = $client->convertURI($url);
// Options
$client->setPageWidth('210mm');
$client->setPageHeight('297mm');
$client->usePrintMedia(True);
// set HTTP response headers
header("Content-Type: application/pdf");
header("Cache-Control: no-cache");
header("Accept-Ranges: none");
header("Content-Disposition: attachment; filename=\"". $url . ".pdf\"");
// send the generated PDF
echo $pdf;
}
catch(PdfcrowdException $why)
{
echo "Pdfcrowd Error: " . $why;
}
}
?>