Replies: 2 comments
-
To add the installation of Here's what you need to do:
After these steps, |
Beta Was this translation helpful? Give feedback.
-
I believe you are missing |
Beta Was this translation helpful? Give feedback.
-
### My system:
OS: Ubuntu 20.04
Laravel: 10.10
PHP: 8.2
use Spatie\PdfToText\Pdf;
$text = Pdf::getText('mypdf.pdf');
while running the above code I am getting error Error: Class "Spatie\PdfToText\Pdf" not found
here is my composer.json file
{
"name": "laravel/laravel",
"type": "project",
"description": "The skeleton application for the Laravel framework.",
"keywords": ["laravel", "framework"],
"license": "MIT",
"require": {
"php": "^8.1",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.10",
"laravel/sanctum": "^3.2",
"laravel/tinker": "^2.8",
"league/flysystem-aws-s3-v3": "3.0",
"league/html-to-markdown": "^5.1",
"openai-php/laravel": "^0.6.3",
"php-open-source-saver/jwt-auth": "2.1",
"spatie/pdf-to-text": "^1.52",
"stancl/tenancy": "^3.7",
"zehntech/readability": "dev-main"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"laravel/pint": "^1.0",
"laravel/sail": "^1.18",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^7.0",
"phpunit/phpunit": "^10.1",
"spatie/laravel-ignition": "^2.0"
},
"autoload": {
"psr-4": {
"App\": "app/",
"Database\Factories\": "database/factories/",
"Database\Seeders\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\Foundation\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r "file_exists('.env') || copy('.env.example', '.env');""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true
}
},
"minimum-stability": "stable",
"prefer-stable": true
}
Beta Was this translation helpful? Give feedback.
All reactions