Open Andressu opened 3 years ago
Hey! Can you try to load the pdf without modifying? Also did you try to increase your php memory size?
I have same concern.
$pdf = PDF::loadFile(public_path('myfile.pdf'));
When I visit the route
of this, the browser keeps loading, until it gives error 500.
I am using:
Laravel 7.x PHP 7.4 "niklasravnsborg/laravel-pdf": "^4.1"
Hey @itzmj-23,
what kind of error message or stack trace do you receive with the 500?
$file_name = str_replace('/','\', $material->video_path);
$config = ['instanceConfigurator' => function($mpdf) { $mpdf->SetWatermarkText('DRAFT'); $mpdf->showWatermarkText = true; }];
PDF::loadFile(storage_path('app\'.$file_name), $config);
Hi I want to watermark existing pdf File, but I have some issues.
When I had tried to debug the config parameter , it gave me this error
"message": "Allowed memory size of 536870912 bytes exhausted (tried to allocate 264245248 bytes)", "exception": "Symfony\Component\ErrorHandler\Error\FatalError", "file": "C:\inetpub\wwwroot\moodle_bridge-master\vendor\niklasravnsborg\laravel-pdf\src\LaravelPdf\PdfWrapper.php", "line": 28, "trace": []
But if don't do debug at all, it gives 500 code. It did not return any error. i was confused. What did I do wrong? Please help