Hi all,
I have htmldoc 1.8.21 running on Windows XP (compiled from source) and I installed the Pdf Export extension from the Mediawiki page. Now, when I hit the "Print as PDF" Button in the left toolbar, Acrobat Reader opens and tells me that the "File does not begin with %pdf". The php error log file shows the following error:
[03-Jul-2006 23:58:55] PHP Warning: Cannot modify header information - headers already sent in Unknown on line 0
The Apache log file did not produce an error message.
Does anybody has an idea what the problem might be? Thanks for your help.
Mei
On 04/07/06, Mei Wu mwu.mailbox@gmail.com wrote:
Most likely some of the files have U+FEFF aka Byte order Mark at the beginning. PHP doesn't like these. Remove them and use an editor which doesn't insert BOMs.
Hi Niklas,
thanks for the tip. In the PDF Export script, a temporary file is created
$mytemp = "/tmp/f" .time(). "-" .rand() . ".html";
and then the following command is executed:
passthru("htmldoc -t pdf --quiet --jpeg --webpage '$mytemp'");
When I use the script in the wiki, the Acrobat Reader opens and then shows "File does not begin with %pdf ". I installed htmldoc 1.8.24 and MediaWiki 1.6.7. How can I check if the file has U+FEFF at the beginning and how can I fix that? Thanks for your help.
Mei
On 7/4/06, Niklas Laxström niklas.laxstrom@gmail.com wrote:
wikitech-l@lists.wikimedia.org