-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinfo.php
More file actions
17 lines (13 loc) · 868 Bytes
/
info.php
File metadata and controls
17 lines (13 loc) · 868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
$pdfDoc = new \Pdf\PdfDocument('./File.pdf', 'user', 'password');
$created = $pdfDoc->getCreationDate();
$modified = $pdfDoc->getModifiedDate();
echo "Created On: ".(($created)?$created->format('Y-m-d H:i:s'):'Not set')."\n";
echo "CreatedBy: ".$pdfDoc->getCreator()."\n";
echo "Modified On: ".(($modified)?$modified->format('Y-m-d H:i:s'):'Not set')."\n";
echo "PDF Version: " . $pdfDoc->getMajorVersion() . '.' . $pdfDoc->getMinorVersion() . "\n";
echo "Is Encrypted: " . (($pdfDoc->isEncrypted() === true) ? 'Yes' : 'No') . "\n";
echo "Is Linear: " . (($pdfDoc->isLinear() === true) ? 'Yes' : 'No') . "\n";
echo "Has JS: " . (($pdfDoc->hasJS() === true) ? 'Yes' : 'No') . "\n";
echo "Has XFA: " . (($pdfDoc->hasXFA() === true) ? 'Yes' : 'No') . "\n";
echo "NumPages: " . $pdfDoc->getNumberOfPages() . "\n";