Coder Social home page Coder Social logo

Comments (5)

JanSlabon avatar JanSlabon commented on September 26, 2024

The namespace of FPDI is \setasign\Fpdi.

Please read through the documentation and check out the examples.

The error message from composers looks somewhat strange to me. Please follow the installation guide of the documentation.

from fpdi.

Telsho avatar Telsho commented on September 26, 2024

I've tried several things, even to use it on a linux machine but I still get the same error..
I want to use FPDF with it, then I've add the line
{ "require": { "setasign/fpdi-fpdf": "^2.0" } }

My error is now :

Problem 1
- Installation request for setasign/fpdi No version set (parsed as 1.0.0) -> satisfiable by setasign/fpdi[No version set (parsed as 1.0.0)].
- setasign/fpdi-fpdf v2.0.0 requires setasign/fpdi ^2.0 -> satisfiable by setasign/fpdi[v2.0.0, v2.0.1, v2.0.2, v2.0.3].
- Can only install one of: setasign/fpdi[v2.0.0, No version set (parsed as 1.0.0)].
- Can only install one of: setasign/fpdi[v2.0.1, No version set (parsed as 1.0.0)].
- Can only install one of: setasign/fpdi[v2.0.2, No version set (parsed as 1.0.0)].
- Can only install one of: setasign/fpdi[v2.0.3, No version set (parsed as 1.0.0)].
- Installation request for setasign/fpdi-fpdf ^2.0 -> satisfiable by setasign/fpdi-fpdf[v2.0.0].

And my composer.json looks like this, maybe I've put it on the wrong place ?
{ "name": "setasign/fpdi", "homepage": "https://www.setasign.com/fpdi", "description": "FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fixed dependencies defined. Please see suggestions for packages which evaluates the dependencies automatically.", "type": "library", "keywords": [ "pdf", "fpdi", "fpdf" ], "license": "MIT", "autoload": { "psr-4": { "setasign\\Fpdi\\": "src/" } }, "require": { "php": "^5.6 || ^7.0", "ext-zlib": "*" }, "authors": [ { "name": "Jan Slabon", "email": "[email protected]", "homepage": "https://www.setasign.com" }, { "name": "Maximilian Kresse", "email": "[email protected]", "homepage": "https://www.setasign.com" } ], "suggest": { "setasign/fpdf": "FPDI will extend this class but as it is also possible to use \"tecnickcom/tcpdf\" as an alternative there's no fixed dependency configured.", "setasign/fpdi-fpdf": "Use this package to automatically evaluate dependencies to FPDF.", "setasign/fpdi-tcpdf": "Use this package to automatically evaluate dependencies to TCPDF." }, "require-dev": { "phpunit/phpunit": "~5.7", "setasign/fpdf": "~1.8", "tecnickcom/tcpdf": "~6.2" }, "autoload-dev": { "psr-4": { "setasign\\Fpdi\\": "tests/" } }, "require": { "setasign/fpdi-fpdf": "^2.0" } }

Thanks a lot for your help !

from fpdi.

JanSlabon avatar JanSlabon commented on September 26, 2024

Why do you use the composer.json of FPDI?

For sure you need to create your own: https://getcomposer.org/doc/01-basic-usage.md !

from fpdi.

Telsho avatar Telsho commented on September 26, 2024

Oh I see, the thing is this is the first time I'm using composer and I don't get all of it..

Where should I put the composer.json file ? Should I rewrite the one from FPDI and then use autoload instead of doing composer install ?

from fpdi.

JanSlabon avatar JanSlabon commented on September 26, 2024

Don't get me wrong but this is not a support forum for "how to use composer". If you're not familiar with it, ask in an appropriate forum or use FPDI without composer.

from fpdi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.