Skip to content

Instantly share code, notes, and snippets.

@tsulatsitamim
Created October 10, 2020 12:25
Show Gist options
  • Save tsulatsitamim/884c25163dc50686b55b879608a32044 to your computer and use it in GitHub Desktop.
Save tsulatsitamim/884c25163dc50686b55b879608a32044 to your computer and use it in GitHub Desktop.
Get Height and Width of PDF File
$pdf = new Fpdi();
$source = $pdf->setSourceFile('filename.pdf');
$template = $pdf->importPage($source);
$size = $pdf->getTemplateSize($template);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment