barryvdh / laravel-snappy

Laravel Snappy PDF
MIT License
2.59k stars 289 forks source link

Load external font #519

Open AhmadAboZaid opened 8 months ago

AhmadAboZaid commented 8 months ago

When I try to load external font in blade I return this error:

The exit status code '1' says something went wrong: stderr: "Loading pages (1/6) [> ] 0% [======> ] 10% [==============================> ] 50% Error: Failed to load https://highhawks.jo/storage/files/01b5e5f92cec61cfac14a566b7533653.ttf, with network status code 3 and http status code 0 - Host not found [============================================================] 100% Counting pages (2/6) [============================================================] Object 1 of 1 Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load. Resolving links (4/6) [============================================================] Object 1 of 1 Loading headers and footers (5/6) Printing pages (6/6) [> ] Preparing [============================================================] Page 1 of 1 Done Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Exit with code 1 due to network error: HostNotFoundError " stdout: "" command: E:\IHR2\blog1\public\wkhtmltopdf\bin\wkhtmltopdf --lowquality "C:\Users\Lenovo\AppData\Local\Temp\knp_snappy653628a975e352.99784901.html" "C:\Users\Lenovo\AppData\Local\Temp\knp_snappy653628a9761451.55687974.pdf".

This is my code in blade: `<!DOCTYPE html>

Page Title

الإسم: {{$name}}

`

And this is my controller: $arr = ['name' => 'أحمد علي سليمان', 'email' => 'ahmad.a@gmail.com']; $newPDF = SnappyPdf::loadView('x',$arr); return $newPDF->download('your-pdf-file.pdf');

How to solve this error? Note: when return the view the font is loaded successfully and the text is displayed correctly

echoskydev commented 6 months ago

I have a problem same this.

pauldstar commented 1 month ago

Same issue here