Closed GoogleCodeExporter closed 9 years ago
Can you try DOMPDF 0.6.0 alpha2 to see if it is still a problem? We don't plan
on releasing any patches for the
0.5.1 code, but if this is still an issue we will address it.
Also, if you are able can you provide a sample document that causes the error?
Original comment by eclecticgeek
on 6 Nov 2009 at 3:16
[deleted comment]
I am still getting the same error with 0.6.0 alpha2...Here is the actual script
i am
using to try and generate a pdf:
<?php
require 'lib/dompdf2/dompdf_config.inc.php';
$dompdf = new DOMPDF();
$dompdf->load_html('hello world');
$dompdf->render();
$dompdf->stream("sample.pdf");die();
?>
Fatal error: Call to undefined method Style::merge() in
[...]lib/dompdf2/include/stylesheet.cls.php on line 218
Thank you!
Original comment by sethcrie...@gmail.com
on 6 Nov 2009 at 7:45
The problem is maybe that what you load with load_html is not HTML ? ;)
Original comment by phenxdesign
on 6 Nov 2009 at 7:59
I would expect it to render the document even with a simple "hello world" test.
I have confirmed that on my
own system. Despite the strictness of DOMDocument it will attempt to create a
valid document. You can
confirm this in 0.6.0 alpha 2 using the following code:
<?php
require 'lib/dompdf2/dompdf_config.inc.php';
$dompdf = new DOMPDF();
$dompdf->load_html('hello world');
$dompdf->output_html();
?>
What version of PHP are you running?
Original comment by eclecticgeek
on 7 Nov 2009 at 1:14
Hello,
I have the same problem and no way to resolve it. I search on the web, on the
forum,
into the groupe google and nobody have the same problem.
Can you help me ? I am sure that that the error come from the render() function
when it
call add_style()... I don't understand the link between the two classes Style
and
Stylesheet. This last called on line 217 a $this->_styles[$key]->merge and it's
the
cause of the error.
Thanks for your help.
Original comment by quentin....@gmail.com
on 15 Mar 2010 at 2:12
@quentin.janon: The Stylesheet class deals with loading a document stylesheet
while
the Style class deals with the specific entries in the stylesheet.
What version of PHP are you using? Can you provide a sample document that
exhibits
the error?
Original comment by eclecticgeek
on 24 Mar 2010 at 4:39
I suspect a class "Style" which is already defined in the system in which you
want to integrate dompdf.
Original comment by fabien.menager
on 1 Feb 2011 at 9:05
That was that fabien menager !
Thanks for the help !
Original comment by quentin....@gmail.com
on 6 Feb 2011 at 10:15
Great! How did you fix it?
Original comment by fabien.menager
on 6 Feb 2011 at 10:42
Hello guys? Can you please share, how did you fix it?
Original comment by hitesh.w...@gmail.com
on 29 May 2011 at 12:09
I find Style definition on my project and see that I have 2 definitions call
Style so, try replace class Style with other name, I replace Style class name
with Stylepdf and Fix!!!
Original comment by joluissc...@gmail.com
on 28 Sep 2011 at 3:00
Original comment by eclecticgeek
on 30 May 2013 at 5:15
Original issue reported on code.google.com by
sethcrie...@gmail.com
on 4 Nov 2009 at 11:40