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

External link not working after pdf merge #1869

Open
1 task done
random-webdeveloper opened this issue May 8, 2023 · 0 comments
Open
1 task done

External link not working after pdf merge #1869

random-webdeveloper opened this issue May 8, 2023 · 0 comments

Comments

@random-webdeveloper
Copy link

random-webdeveloper commented May 8, 2023

Guidelines

Description of the bug

I'm merging PDFs with MPDF, but after merging the links stop working. although they still have their blue color.
This doesn't work in pdf.js viewer and neither in the chrome built in viewer so i'm pretty sure this is mpdfs fault. The provided example is as minimal as possible to reproduce this behaviour

mPDF version

8.1 (newly installed)

PHP Version and environment (server type, cli provider etc., enclosing libraries and their respective versions)

php 8.1, macos with nginx

Reproducible PHP CSS HTML snippet suffering by the error

$filePath = 'link to the provided example pdf'

$pdf = new Mpdf([
            'mode'    => 'UTF-8',
            'tempDir' => sys_get_temp_dir(),
        ]);

        $pdf->SetSourceFile($filePath);

        $templateId = $pdf->importPage(1);
        $pageSize   = $pdf->getTemplateSize($templateId);

        $pdf->AddPageByArray([
            'orientation' => $pageSize['orientation'],
            'newformat'   => [$pageSize['width'], $pageSize['height']],
        ]);

        $pdf->useTemplate($templateId);

        $pdf->Output('title.pdf', 'I');

lnkexample.pdf

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

No branches or pull requests

2 participants