Web to Print in Pimcore not working

#1

Hello.

I’m trying to make some printable documents following the instruction on the official pimcore documentation, but it doesn’t seem to be working.
When I try to Generate a PDF an error pops up:

Status: 500 | Internal Server Error URL: /admin/printpage/start-pdf-generation Method: POST Message: Attempted to load class "COM" from the global namespace. Did you forget a "use" statement? Trace: #0 C:\xampp\htdocs\Web2Print\vendor\pimcore\pimcore\lib\Tool\Console.php(365): Pimcore\Tool\Console::execInBackgroundWindows('C:\\PHP\\php.exe ...', 'C:\\xampp\\htdocs...') #1 C:\xampp\htdocs\Web2Print\vendor\pimcore\pimcore\lib\Web2Print\Processor.php(80): Pimcore\Tool\Console::execInBackground('C:\\PHP\\php.exe ...', 'C:\\xampp\\htdocs...') #2 C:\xampp\htdocs\Web2Print\vendor\pimcore\pimcore\models\Document\PrintAbstract.php(112): Pimcore\Web2Print\Processor->preparePdfGeneration(7, Array) #3 C:\xampp\htdocs\Web2Print\vendor\pimcore\pimcore\bundles\AdminBundle\Controller\Admin\Document\PrintpageControllerBase.php(278): Pimcore\Model\Document\PrintAbstract->generatePdf(Array) #4 C:\xampp\htdocs\Web2Print\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php(151): Pimcore\Bundle\AdminBundle\Controller\Admin\Document\PrintpageControllerBase->startPdfGenerationAction(Object(Symfony\Component\HttpFoundation\Request)) #5 C:\xampp\htdocs\Web2Print\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #6 C:\xampp\htdocs\Web2Print\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php(200): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #7 C:\xampp\htdocs\Web2Print\web\app.php(42): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #8 {main}

I know that it says that I’m missing a use statement, but where do I put it?
I don’t want to “override” vendor files.

Is there a way to fix this?

#2

Hi,
which tool are you using?

BR
Christian

#3

I’m using PDFreactor, but it’s not working with WkHtmlToPdf too.

#4

hmm, seems to be a problem on your installation/site … at our demo, it works…

BR
Christian