'Fatal error: Class 'Document' not found in C:\xampp\htdocs\test.php:4 Stack trace: #0 {main} thrown in C:\xampp\htdocs\test.php on line 4
I want to make test.php can convert input1.pdf become docx file, but igot this error
Fatal error: Class 'Document' not found in C:\xampp\htdocs\test.php:4 Stack trace: #0 {main} thrown in C:\xampp\htdocs\test.php on line 4
test.php full code
<?php
# Open the target document
$pdf = new Document($dataDir . 'input1.pdf');
# Save the concatenated output file (the target document)
$pdf->save($dataDir . "output.docx");
print "Document has been converted successfully";
?>
may somone help me? thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
