pdf not created when text/php script in html

239 views
Skip to first unread message

Milosh

unread,
Jun 5, 2010, 12:45:21 PM6/5/10
to dompdf
Hi!

When I use <script text/php> in HTML then the dompdf fails. No pdf is
created and the error message prompted in the browser is something
like: "Cannot open fail dompdf.php because no application is
associated with this filetype". (I have non-english browser, so this
is probably spelled out differently in english, but the content of the
message is this).

The problem boils down to the '<script type="text/php">' tag in html.
When I remove this script tag or leave it in just closed like '<script
type="text/php"></script>' then the pdf is created. But even an empty
space within <script> tags like '<script type="text/php"> </script>'
breaks dompdf... The problem seems to be version invariant, as I have
tried both 0.5 and most recent 0.6beta version of dompdf.

I get this error message even when i try official example (demo_01)
from dompdf/www/test folder, so It's not a problem of my HTML, but
'<script type="text/php">' tag that breaks it...

Any ideas?

My PHP Version is 5.3.2-1ubuntu4.2

BrianS

unread,
Jun 6, 2010, 9:56:10 PM6/6/10
to dompdf
More than likely the script is hitting a fatal error and exiting
before execution is complete. You need to figure out why the script is
failing. Do you receive any PHP errors (look at the PHP error.log)?

Just as an FYI, the error you are receiving is an operating system
error. Since the script dies early your web server is sending whatever
content it has. Since the failing page is dompdf.php, that is the file
sent to your web browser. More than likely the document you are
getting is plain text. Try saving it and opening it in a text editor
to see if any errors are shown.
Reply all
Reply to author
Forward
0 new messages