Hi Brian, I downloaded the dompdf_0-7-0_beta2.zip file, and it appears
that the require_once calls in autoload.inc.php are executing without
problems. My best guess is that the requires in the autoloader are
working but these are not bringing in the class definition for the
Dompdf class. I have looked around at other group posts to see if I can
glean any examples from other discussions, but the closest I have found
is this thread:
https://groups.google.com/forum/#!topic/dompdf/cE-551JlK-w
In which you discuss creating an Options class instance and passing that
to the Dompdf::setOptions method. You don't show how the $dompdf
variable was instantiated in the code in that example, but I assume a
'$dompdf = new Dompdf()' would do the trick, but a call to 'new Dompdf'
results in the 'class not found' message I originally reported. I have
tried creating an Options instance as well, as shown in the other post,
and that class is also not available.
I've taken a look at the /src/Autoloader.php file, and it looks like in
the autoload method is a line:
$file = str_replace('\\', DIRECTORY_SEPARATOR, substr($class,
$prefixLength));
In looking into this, it appears that in my environment $class is
'Dompdf', $prefixLength is 6, and DIRECTORY_SEPARATOR is '/'. the
substr() call returns an empty string, as it is getting a subset of the
string 'Dompdf', starting at the 6th character, which is the end of the
string. This sets $file to an empty string, which in turn does not
successfully get the file.
I have replaced the "$file = str_replace( '\\', DIRECTORY_SEPARATOR,
substr( $class, $prefixLength));" line with a simple "$file = $class;"
line to force the loading of the Dompdf.php file, which contains the
Dompdf class definitition, but even with this in place, I am getting a
'Class Dompdf not found' error when trying to instantiate using new
Dompdf(), which surprises me.
Any thoughts or ideas on how to move this forward?
thanks again,
Dan Steeby