Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Error message: "file_get_contents(): read of 8192 bytes failed with errno=21 Is a directory" #191

Open
ntgraph opened this issue Jan 23, 2021 · 0 comments

Comments

@ntgraph
Copy link

ntgraph commented Jan 23, 2021

Hi,
here is my code
$mpdf = new Mpdf();
$html = view($quoteTemplate, $payload)->render();
$lastPageFooter = view($lastPageFooterTemplate, $payload)->render();

    $mpdf->WriteHTML($html);

    $mpdf->SetHTMLFooter($lastPageFooter);

    $fileName = $quote->quote_number . '.pdf';

    return response()->json([
        'data' => [
            'pdf' => base64_encode($mpdf->output('', 'S')),
            'filename' => $fileName,
        ]
    ]);

and I get this message error, can you give me a hint to solve this problem.
file: "/vendor/mpdf/mpdf/src/Image/ImageProcessor.php"
line: 230

Below is my config/pdf.php

'utf-8', 'format' => 'Letter', 'author' => 'oneApp', 'subject' => '', 'keywords' => '', 'creator' => 'Laravel Pdf', 'display_mode' => 'fullpage', 'tempDir' => base_path('storage/app/mpdf'), 'orientation' => 'P', 'margin_left' => 0, 'margin_right' => 0, 'margin_top' => 0, 'margin_bottom' => 0, ]; Please help. Thanks in advance
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant