From b2eb864210cef6d19ef0d0b5b540925a7dd71a72 Mon Sep 17 00:00:00 2001 From: Nick Sagona Date: Thu, 6 Jun 2024 10:45:51 -0500 Subject: [PATCH] Update README --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 0bba400..3a771b6 100644 --- a/README.md +++ b/README.md @@ -197,6 +197,23 @@ use Pop\Pdf\Pdf; $doc = Pdf::importFromImages($arrayOfImages); ``` +### Extract Text + +If you just want to extract the text from a PDF that contains text (not a PDF comprised of images with text in them), +you can do so like this: + +```php +use Pop\Pdf\Pdf; + +$text = Pdf::extractTextFromFile('path/to/document.pdf'); +``` + +```php +use Pop\Pdf\Pdf; + +$text = Pdf::extractTextFromData($pdfStream); +``` + [Top](#pop-pdf) Documents