thanks for the reply, Weedpacket
as it happens, I fiddled some more and got it working, (with code as below). No - there's nothing else there, no blank lines or anything.
This all stemmed from a more ugly problem which I have been suffering from when using sessions within the same script - yup that's the one.. IE doesn't understand the pdf headers when the cache-control parts of the session headers have already been sent.
Anyway, I'll explore some more and post about that one in a separate thread. Meanwhile, here's the working version of the above problem.
<?php
/*
test pdf script to work without sessions
$Id: pdftest.php,v 1.3 2003/08/26 19:35:50 chris Exp $
*/
include('include/template_nosess.php');
# $foo='bar';
$p = PDF_new();
PDF_open_file($p);
PDF_begin_page($p,595,842);
$font = PDF_findfont($p,"Helvetica-Bold","host",0);
$now=date ("dS F Y");
PDF_setfont($p,$font,38.0);
PDF_show_xy($p,"$foo",50,700);
PDF_end_page($p);
PDF_close($p);
$buf = PDF_get_buffer($p);
Header("Content-type: application/pdf");
Header("Content-Length: ".strlen($buf));
Header("Content-Disposition: inline; filename=pdftest.pdf");
echo $buf;
PDF_delete($p);
?>
ta
christo