Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load external font #519

Open
AhmadAboZaid opened this issue Oct 23, 2023 · 3 comments
Open

Load external font #519

AhmadAboZaid opened this issue Oct 23, 2023 · 3 comments

Comments

@AhmadAboZaid
Copy link

AhmadAboZaid commented Oct 23, 2023

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:
`

<style type="text/css"> @font-face { font-family: 'Arslan'; src: url('https://highhawks.jo/storage/files/01b5e5f92cec61cfac14a566b7533653.ttf') format('truetype'); /* Add additional font properties as needed */}body{font-family: Arslan, serif; direction: rtl}</style><title>Page Title</title>

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

`

And this is my controller:
$arr = ['name' => 'أحمد علي سليمان', 'email' => '[email protected]']; $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
Copy link

I have a problem same this.

@pauldstar
Copy link

Same issue here

@studioycm
Copy link

any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants