laravel - barryvdh/laravel-dompdf :- fopen failed to open stream: No such file or directory in laravel 5. 7

标签 laravel dompdf invoice

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

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



enter image description here

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

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



enter image description here

我现在应该怎么办?

最佳答案

经过一路测试,我得到了“fopen failed”和“execution time expired”的完美解决方案。

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

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

为避免所有问题,只需在下载发票 Blade 中粘贴发票的源代码,例如
<!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>

关于laravel - barryvdh/laravel-dompdf :- fopen failed to open stream: No such file or directory in laravel 5. 7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54474036/

相关文章:

php - 从 Mage_Sales_Model_Order_Invoice 对象获取发票 ID

php - Laravel - 视频文件验证

php - Laravel:用于文件上传测试的 Laravel 存储外观上的未定义方法伪造

laravel - 这是 DOMPDF 以 cm 或 mm 为单位的测量值的等价物

php - Dompdf 并设置不同的字体系列

Magento - 自定义发票号码

Java 发票程序 - 将数量设置为 0 将价格设置为 0.0

php - Laravel 中的多提供商关系用户表

javascript - 缺少 jquery,即使它位于文件 laravel 中

php - 使用dompdf在pdf上显示INR货币符号