smalot / pdfparser

PdfParser, a standalone PHP library, provides various tools to extract data from a PDF file.
GNU Lesser General Public License v3.0
2.37k stars 537 forks source link

Install the "smalot/pdfparser" #196

Closed alan2060 closed 6 years ago

alan2060 commented 6 years ago

Hello, I have a problem installing the project. When I add the lines in the file "componser.json": { "require": { "smalot/pdfparser": "*" } }

I get this error when executing the command code (composer update smalot/pdfparser): Key require is a duplicate in ./composer.json at line 35

I have added these lines at the end of the file "componser.json", so getting it this way:

`{ "name": "smalot/pdfparser", "description": "Pdf parser library. Can read and extract information from pdf file.", "keywords": ["PDF", "text", "parser", "parse", "extract"], "type": "library", "license": "LGPLv3", "authors": [ { "name": "Sebastien MALOT", "email": "sebastien@malot.fr" } ], "support": { "issues": "https://github.com/smalot/pdfparser/issues" }, "homepage": "http://www.pdfparser.org", "require": { "php": ">=5.3.0", "ext-iconv": "", "tecnickcom/tcpdf": "~6.0", "smalot/pdfparser": "" }, "require-dev": { "atoum/atoum": "^2.8 | ^3.0" }, "autoload": { "psr-0": { "Smalot\PdfParser\": "src/" } }, "config": { "process-timeout": 1200 }

}

{
    "require": {
        "smalot/pdfparser": "*"
    }
}`

So I can not install "smalot/pdfparser" in the "vendor" directory.

Could someone give me an idea of what might be wrong?

smalot commented 6 years ago

you should do first

composer init

and then

composer require smalot/pdfparser