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

Uninitialized string offset -72798 #217

Open
RabieAli95 opened this issue Feb 6, 2022 · 0 comments
Open

Uninitialized string offset -72798 #217

RabieAli95 opened this issue Feb 6, 2022 · 0 comments

Comments

@RabieAli95
Copy link

I have a form in the dashboard to upload a font by admin

I stored the font in public/fonts/pdf_font.ttf each time admin uploaded a new a renamed the uploaded font to the same name of the font which is pdf_font.ttf I did everything but I got one problem when the admin upload a new font I went to the preview page to check whether the font is working I got this error:

Screen Shot 2022-02-06 at 10 07 18 PM

This problem went out when I refresh the page twice!

my code of the font:

public function update(PdfTemplateRequest $request)
    {
        PdfTemplate::updateOrCreate(
            ['template_id' => $request->template_id],
            [
                'pdf_form' => Purifier::clean($request->pdf_form),
                'template_id' => $request->template_id
            ]
        );

        return redirect()->back();
    }

config/pdf.php:

 'custom_font_dir'            => base_path('public/fonts/'),
    'custom_font_data' => [
        'graphik-arabic' => [
            'R'  => 'pdf_font.ttf',
            'useOTL' => 0xFF,
            'useKashida' => 75,
        ]
    ],
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