Closed ikasuryani closed 8 years ago
I had this error too, I remove the imports of personal fonts on CSS and it's works
works for me too thanks @devswert actually after that i encountered problem with appendChild() null so i decided to use snappy instead lol
Can you submit an issue to dompdf itself? https://github.com/dompdf/dompdf
Any fix done into the laravel version of DOMPDF? I've got the same problem, using:
<link rel="stylesheet" type="text/css" href="font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css" />
in my view I'm using to create a PDF will result in same error as described above. Any fix known?
@Pekinese Did you fix the problem?
Sorry, no way found, Problem is still same AS described above. Someone solved this? Plesse tell me how to do so...
Am 3. März 2016 09:51:06 MEZ, schrieb Arnab Rahman notifications@github.com:
@Pekinesehttps://github.com/Pekinese Did you fix the problem?
— Reply to this email directly or view it on GitHubhttps://github.com/barryvdh/laravel-dompdf/issues/191#issuecomment-191658416.
@Pekinese I created fonts directory inside storage. It solved the problem. Then i faced bunch of other problems. After googling them i was able to solve the errors. Now it generates the pdf but it went all haywire, CSS is working but not properly.
Are you using bootstrap and/or font awesome? If yes could you please post samples? Would be great if I could get this running too.
Am 3. März 2016 12:53:47 MEZ, schrieb Arnab Rahman notifications@github.com:
@Pekinesehttps://github.com/Pekinese I created fonts directory inside storage. It solved the problem. Then i faced bunch of other problems. After googling them i was able to solve the errors. Now it generates the pdf but it went all haywire, CSS is working but not properly.
— Reply to this email directly or view it on GitHubhttps://github.com/barryvdh/laravel-dompdf/issues/191#issuecomment-191724322.
@perkines I'm using both. Followed the domPDF doc to generate pdf though pdf isn't showing data properly. My PDF generation code is:
$student = Student::where('registration_no', $request->input('registration_no'))->first();
$pdf = PDF::loadView('layouts.resultPDFTemplate', ['student' => $student]);
return $pdf->download('result.pdf');
I know how to use laravel-dompdf, my problem is the error I described above when using bootstrap & font-awesome in my view I try to render using laravel-dompdf.
@Pekinese Create fonts folder inside storage. This will solve the problem.
Do you mean creating a fonts folder here?
Which files should I store into the "fonts" folder? Would be great if you could show some details..
@Pekinese Yup there, you don't need to put any files there. Files will be created automatically when you run the pdf method. See these files were created automatically, i didn't add them.
could you please drop me your mail?
Seems like we missunderstand each other.
Von: Arnab Rahman notifications@github.com Gesendet: Donnerstag, 3. März 2016 18:36 An: barryvdh/laravel-dompdf Cc: Pekinese Betreff: Re: [laravel-dompdf] help ErrorException in Adobe_Font_Metrics.php line 42 (#191)
Yup there, you don't need to put any files there. Files will be created automatically when you're running the pdf method. See these files were created automatically, i didn't add them. [fonts]https://cloud.githubusercontent.com/assets/12469224/13503188/5c3fd672-e198-11e5-8bf2-e90a48c060bc.png
Reply to this email directly or view it on GitHubhttps://github.com/barryvdh/laravel-dompdf/issues/191#issuecomment-191877288.
My email address is : arnabrahman@hotmail.com
Date: Thu, 3 Mar 2016 09:52:52 -0800 From: notifications@github.com To: laravel-dompdf@noreply.github.com CC: arnabrahman@hotmail.com Subject: Re: [laravel-dompdf] help ErrorException in Adobe_Font_Metrics.php line 42 (#191)
could you please drop me your mail?
Seems like we missunderstand each other.
Von: Arnab Rahman notifications@github.com
Gesendet: Donnerstag, 3. März 2016 18:36
An: barryvdh/laravel-dompdf
Cc: Pekinese
Betreff: Re: [laravel-dompdf] help ErrorException in Adobe_Font_Metrics.php line 42 (#191)
Yup there, you don't need to put any files there. Files will be created automatically when you're running the pdf method. See these files were created automatically, i didn't add them.
Reply to this email directly or view it on GitHubhttps://github.com/barryvdh/laravel-dompdf/issues/191#issuecomment-191877288.
— Reply to this email directly or view it on GitHub.
I just did what @arnabrahman said and it worked, but it takes quite a lot to load the pdf file. Have you experienced the same?
@PinkFLoyd92 Same here takes too much time to generate pdf. And what about html/css, working properly?
@arnabrahman Please check your mails. I sent you some mail with my problem (so you can take a look onto my problem). Would be great.
You don't have folder /storages/fonts or permission this folder
@arnabrahman No it did not work properly, anyway I am using another library called jasperphp now. I realized I needed a report format approach instead of this.
Using this library with bootstrap/font-awesome in views to render them makes tons of errors as you may see above. @barryvdh should take some time and upgrade to DOMPDF 0.7. Maybe he can drop a few lines about how he schedule to do so.
I had the same issue and I found a simple solution:
I created the folder fonts in storage and gave it the chmod 777. Everything should be fine then.
@giga-development
could you please post an example using bootstrap & font-awesome in a view and render this view using laravel-dompdf?
bootstrap & font-awesome will give you additional errors: '...' is not a valid CSS2 property. These are not related to the error: ErrorException in Adobe_Font_Metrics.php line 42
fopen() fails. This can only be because the system cannot find the folder or the user www-data does not have sufficient rights.
If you remove those properties in your local bootstrap/font-awesome file it should work. Tried it with google fonts after I had the same issue and it works.
I had some problems upgrading my developer station to Windows 10
I solve the same issue adding a folder called "fonts" in storage folder... I'm using bootstrap.min.css' font-awesome.min.css laravel 5.2
thanks to everybody...
hi all, i have same error... and when i add fonts folder to storage, get this error
i have an error same with @simafaraji86 .
I also have the same as @simafaraji86
Is this specific to 5.2? Is there a fix?
After creating the fonts directory I went on to the next error:
DOMPDF_Exception in inline_positioner.cls.php line 37: No block-level parent found. Not good. in inline_positioner.cls.php line 37 at Inline_Positioner->position() in frame_decorator.cls.php line 700 at Frame_Decorator->position() in inline_frame_reflower.cls.php line 36 at Inline_Frame_Reflower->reflow(null) in frame_decorator.cls.php line 711 at Frame_Decorator->reflow() in page_frame_reflower.cls.php line 123 ...
But I do use FontAwesome and bootstrap as mentioned in some comments above. I think I'll just remove the fonts for this view. The time it takes to create the PDF is indeed long (between 3 to 9 seconds). This is just a resume page.
Which brings me to this issue https://github.com/barryvdh/laravel-dompdf/issues/137
Tx anyhow Barry, love the simplicity of your work and the fact you can call views to render this is amazing.
I simply change the storage_path in config/dompdf.php and it works!
Thank you @meodev! Just encountered this issue and your solution works like a charm! 👍
Solve: Make a fonts folder in the storage folder.
Yup. Creating a fonts folder inside Storage folder did the trick for me :)
I'am facing the same problem..any one help me plz..??
Did you try adding a folder called "fonts" in storage folder?
@arnabrahman Thaks work for me
@meodev I've done that, but it takes a long time to load the pdf file how can I solve it?
@meodev Use Laravel Queues To Generate PDF in Background.
I created a fonts folder inside the storage and did not give the error more, but it takes a lot of time and ends up going beyond the limit.
Do you know how to solve this problem?
Error Maximum execution time of 60 seconds exceeded
Error Maximum execution time of 60 seconds exceeded
set_time_limit(0);
Just Create a fonts folder inside the storage one will solve the problem :)
This can be solved by creating a fonts directory storage directory ie App/storage/fonts.... Also remember to make it writable.
ErrorException in Adobe_Font_Metrics.php line 42: fopen(C:\xampp\htdocs\project-name\core\storage/fonts/b7d682615af57edb23146f1f67349ed0.ufm): failed to open stream: No such file or directory
here is my controller
and here is the full error
how can i solve this? anyone ever found this problem too?