It seems that is necessary to change the url path of the image to solve the issue, but using tinymce, is only necessary to click in the browse image button and selet an image, so I dont understand how to change the url path of the image?
Jul 12, 2018
12
Level 3
Get tinymce content in a pdf using dompdf: Image not found or type unknown
Im using tinymce with image upload using the package "laravel-tinymce-simple-imageupload". But when the user enters some content in the textarea and click in the form submit button I want to put the content in the textarea in a pdf file so I have the code below.
The issue is that in the pdf file, if is inserted an image in the textarea, the image dont appear in the pdf and it shows "Image not found or type unknown".
Do you know what can be the issue?
The image is stored like this in the content column of the certificates table:
<p>test<img src="/img/image_1530423144_Yn4tAJwZmzcbb82UOGHo07eIQsiGfzdbBjh10r.jpeg" alt="" width="1200" height="900" /></p>
Code to get the pdf:
$certificateContent = RegistrationType::with('certificate')->where('id', $request->registrationType)->first();
$pdf = app()->make('dompdf.wrapper');
$pdf->loadHTML($certificateContent->certificate->content);
return $pdf->download('invoice.pdf');
Please or to participate in this conversation.