Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Wikitech

PDF Export with htmldoc

 

 

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded


mwu.mailbox at gmail

Jul 4, 2006, 12:01 AM

Post #1 of 3 (297 views)
Permalink
PDF Export with htmldoc

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
_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] wikimedia
http://mail.wikipedia.org/mailman/listinfo/wikitech-l


niklas.laxstrom at gmail

Jul 4, 2006, 1:49 AM

Post #2 of 3 (269 views)
Permalink
Re: PDF Export with htmldoc [In reply to]

On 04/07/06, Mei Wu <mwu.mailbox [at] gmail> wrote:
> [03-Jul-2006 23:58:55] PHP Warning: Cannot modify header information
> - headers already sent in Unknown on line 0
>

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.
--
Niklas Laxström
_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] wikimedia
http://mail.wikipedia.org/mailman/listinfo/wikitech-l


mwu.mailbox at gmail

Jul 4, 2006, 8:52 PM

Post #3 of 3 (300 views)
Permalink
Re: PDF Export with htmldoc [In reply to]

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 [at] gmail> wrote:
> On 04/07/06, Mei Wu <mwu.mailbox [at] gmail> wrote:
> > [03-Jul-2006 23:58:55] PHP Warning: Cannot modify header information
> > - headers already sent in Unknown on line 0
> >
>
> 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.
> --
> Niklas Laxström
> _______________________________________________
> Wikitech-l mailing list
> Wikitech-l [at] wikimedia
> http://mail.wikipedia.org/mailman/listinfo/wikitech-l
>
_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] wikimedia
http://mail.wikipedia.org/mailman/listinfo/wikitech-l

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.