Skip to content

Commit

Permalink
Merge pull request #2671 from LibreSign/fix/make-compatible-with-fpdf
Browse files Browse the repository at this point in the history
fix: make compatible with FPDF
  • Loading branch information
vitormattos authored Apr 5, 2024
2 parents 6ffb134 + c8a3d34 commit fd43025
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Service/PdfParserService.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ private function parsePdfOnlyWithPhp(string $filename): array {
];
foreach ($pages as $page) {
$details = $page->getDetails();
if (!isset($details['MediaBox'])) {
$pages = $pdf->getObjectsByType('Pages');
$details = reset($pages)->getHeader()->getDetails();
}
$output['d'][] = [
'w' => $details['MediaBox'][2],
'h' => $details['MediaBox'][3]
Expand Down

0 comments on commit fd43025

Please sign in to comment.