barryvdh/laravel-dompdf:-fopen无法打开流:laravel 5.7中没有此类文件或目录 [英] barryvdh/laravel-dompdf:- fopen failed to open stream: No such file or directory in laravel 5.7

查看:187
本文介绍了barryvdh/laravel-dompdf:-fopen无法打开流:laravel 5.7中没有此类文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我要下载invoice.pdf时出现错误:-

When I want to download invoice.pdf got error:-

打开(project_path \ storage \ fonts/\ 071ddd89a9cb147bf5639344caee3fe8.ufm):无法打开流:没有这样的文件或目录

fopen(project_path\storage\fonts/\071ddd89a9cb147bf5639344caee3fe8.ufm): failed to open stream: No such file or directory

在此处输入图片描述

在存储下创建字体文件夹后也出现错误:

After creating fonts folder under storage also got an error:

执行次数最多"的最大执行时间为30秒.

"execution times up" maximum execution time is 30 sec.

在此处输入图片描述

我现在该怎么办?

推荐答案

在测试了所有方式之后,我获得了"fopen失败"的完美解决方案. 执行时间到期".

After testing all the way I got a perfect solution for "fopen faild" & "execution time expired".

当您使用发票代码扩展主文件时会发生这种情况

It happens when you'll use your invoice code in extending the master file like

@extends('admin.master')
@section('body')
/* your invoice code*/
@sectionend

为避免所有问题,只需将发票的源代码粘贴到下载发票刀片中,例如

To avoid all issue just paste source code of your invoice in download invoice blade, like

<!doctype html>

    <html lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <meta name="viewport"
              content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>BigStore: Shopping Invoice</title>
    </head>
    <body>


    <style>
    /*css*/
    </style>
    <br>
    /**html code**/
     </body>
    </html>

这篇关于barryvdh/laravel-dompdf:-fopen无法打开流:laravel 5.7中没有此类文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆