You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Trying to migrate from tcpdf to tc-lib-pdf/tc-lib-pdf-image. When adding images, it takes almost 15-20 seconds more with the same image to add to the PDF between tcpdf and tc-lib-pdf. The goal is to try and set a background to a landscape page.
In tcpdf I have the following:
$pdf->Image('image.png', 0, 0, 279, 216, '', '', '', true, 300, '', false, false);
In tc-lib-pdf/tc-lib-pdf-image I have the following:
$iid01 = $pdf->image->add('image.png');
$iid01_out = $pdf->image->getSetImage($iid01, 0, 0, $page01['width'], $page01['height'], $page01['height']);
$pdf->page->addContent($iid01_out);
If I comment out $iid01_out and adding the image to the page, I still see the long load time of the image ($pdf->image->add).
Is there a different way I should import the image?
Expected behavior
Was hoping for performance to be the same or better than tcpdf.
Logs
Happy to gather additional telemetry, unsure on next steps though.
Environment:
OS: Debian 12
PHP version: 8.2
Version: 8.0.77 / 2.1.2
Thank you!
The text was updated successfully, but these errors were encountered:
Hi,
15-20 seconds is way too slow and I haven't yet observed anything like this.
Would you be able to share an image with a minimal code to reproduce this?
Describe the bug
Trying to migrate from tcpdf to tc-lib-pdf/tc-lib-pdf-image. When adding images, it takes almost 15-20 seconds more with the same image to add to the PDF between tcpdf and tc-lib-pdf. The goal is to try and set a background to a landscape page.
In tcpdf I have the following:
$pdf->Image('image.png', 0, 0, 279, 216, '', '', '', true, 300, '', false, false);
In tc-lib-pdf/tc-lib-pdf-image I have the following:
$iid01 = $pdf->image->add('image.png');
$iid01_out = $pdf->image->getSetImage($iid01, 0, 0, $page01['width'], $page01['height'], $page01['height']);
$pdf->page->addContent($iid01_out);
If I comment out $iid01_out and adding the image to the page, I still see the long load time of the image ($pdf->image->add).
Is there a different way I should import the image?
Expected behavior
Was hoping for performance to be the same or better than tcpdf.
Logs
Happy to gather additional telemetry, unsure on next steps though.
Environment:
Thank you!
The text was updated successfully, but these errors were encountered: