Git Product home page Git Product logo

Comments (8)

JanSlabon avatar JanSlabon commented on July 26, 2024

What version of TCPDF and FPDI are you using?

from fpdi.

leandre-atienza avatar leandre-atienza commented on July 26, 2024

I'm using the same as the docs says :

"require": {
      "tecnickcom/tcpdf": "6.6.*",
      "setasign/fpdi": "^2.5"
},

from fpdi.

JanSlabon avatar JanSlabon commented on July 26, 2024

Ähm... The method setSignature() of TCPDF has following signature:

public function setSignature($signing_cert='', $private_key='', $private_key_password='', $extracerts='', $cert_type=2, $info=array(), $approval='')

Executing your script results in several errors but not in the quoted. Please prepare a complete and runable test-case, thanks!

from fpdi.

leandre-atienza avatar leandre-atienza commented on July 26, 2024

Ähm... The method setSignature() of TCPDF has following signature:

public function setSignature($signing_cert='', $private_key='', $private_key_password='', $extracerts='', $cert_type=2, $info=array(), $approval='')

Executing your script results in several errors but not in the quoted. Please prepare a complete and runable test-case, thanks!

I only need this code to get the error :

use setasign\Fpdi\Tcpdf\Fpdi;

$pdf = new Fpdi();
$pdf->setSourceFile('input.pdf');

from fpdi.

JanSlabon avatar JanSlabon commented on July 26, 2024

Please prepare a complete and runable test-case, thanks!

Also add the composer.json/.lock files.

I already build my own test-case with the information you provided and was not able to trigger an error if I comment the $pdf->setSignature(...) call.

from fpdi.

leandre-atienza avatar leandre-atienza commented on July 26, 2024

Here is my composer.json and lock files. I'm using laravel framework.

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The skeleton application for the Laravel framework.",
    "keywords": [
        "laravel",
        "framework"
    ],
    "license": "MIT",
    "require": {
        "php": "^8.1",
        "barryvdh/laravel-dompdf": "^2.0",
        "directorytree/ldaprecord-laravel": "*",
        "guzzlehttp/guzzle": "^7.2",
        "inertiajs/inertia-laravel": "^0.6.8",
        "laravel/fortify": "*",
        "laravel/framework": "^10.10",
        "laravel/sanctum": "^3.2",
        "laravel/tinker": "^2.8",
        "tecnickcom/tcpdf": "6.6.*",
        "setasign/fpdi": "^2.5",
        "spatie/laravel-permission": "^6.3",
        "tightenco/ziggy": "^1.0"
    },
    "require-dev": {
        "fakerphp/faker": "^1.9.1",
        "laravel/breeze": "*",
        "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
        },
        "platform-check": false
    },
    "minimum-stability": "stable",
    "prefer-stable": true
}

composer.lock.json

from fpdi.

JanSlabon avatar JanSlabon commented on July 26, 2024

I cannot reproduce this, sorry. The script runs through without any problem (for sure without the strange setSignature() call).

Again: Please prepare a COMPLETE test case with ALL related files, which let us reproduce this with as less effort as possible.

from fpdi.

leandre-atienza avatar leandre-atienza commented on July 26, 2024

I finally got it working ! I removed my vendor folder, reinstalled my composer packages and know everything is good. I already tried that but it didn't change anything before... Thanks for your help and patience.

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.