WhiteOctoberTCPDFBundle icon indicating copy to clipboard operation
WhiteOctoberTCPDFBundle copied to clipboard

I cant use the Fork

Open Luvelnet opened this issue 5 years ago • 5 comments

Hi all,

Im trying to config the fork Qipsius but it's not possible. I've done all step in doc:

  1. Install and register the bundle
  2. Create service Qipsius\TCPDFBundle\Controller\TCPDFController: '@qipsius.tcpdf'
  3. And the last: $pdfObj = $container->get("qipsius.tcpdf")->create();

I get the following error: "Service "qipsius.tcpdf" not found: even though it exists in the app's container"

I'm using Symfony 5 version.

Thanks for help!

Luvelnet avatar Sep 02 '20 12:09 Luvelnet

Hi Luvelnet,

I have to improve the documentation for QipsiusTCPDFBundle

Try this, instead of using the container, inject the TCPDFController service:

use Qipsius\TCPDFBundle\Controller\TCPDFController;

class PDFService
{
    protected TCPDFController $tcpdf;

    public function __construct(
        TCPDFController $tcpdf
    ) {
        $this->tcpdf = $tcpdf;
    }

   ...
}

davnavarro avatar Sep 02 '20 12:09 davnavarro

Gracias David! Me he vuelto loco con este tema.

Y todo para hacer una firma electrónica con PDFs. A ver si lo consigo.

Gracias por tu tiempo!

El mié., 2 sept. 2020 14:40, David Navarro [email protected] escribió:

Hi Luvelnet,

I have to improve the documentation for QipsiusTCPDFBundle https://github.com/Qipsius/QipsiusTCPDFBundle

Try this, instead of using the container, inject the TCPDFController service:

use Qipsius\TCPDFBundle\Controller\TCPDFController;

class PDFService { protected TCPDFController $tcpdf;

public function __construct(
    TCPDFController $tcpdf
) {
    $this->tcpdf = $tcpdf;
}

... }

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/whiteoctober/WhiteOctoberTCPDFBundle/issues/61#issuecomment-685707283, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASA5TUGKAMJFBSOUKXXG4LSDY4LBANCNFSM4QS6HW5Q .

Luvelnet avatar Sep 02 '20 13:09 Luvelnet

Nada, lo que necesites.

Nosotros usamos este bundle precisamente para eso, para la firma digital.

Saludos

davnavarro avatar Sep 02 '20 13:09 davnavarro

David, pues la verdad que estoy leyendo mucho acerca del tema, y por lo que veo necesito además la librería FPDI para poder abrir PDFs existentes, y luego con el TCPDF aplicar la firma.

¿Estoy en lo correcto? ¿Conoces algun bundle fiable para FPDI?

Mil gracias! Un saludo, Luis Velázquez

On Wed, 2 Sep 2020 at 15:08, David Navarro [email protected] wrote:

Nada, lo que necesites.

Nosotros usamos este burdel precisamente para eso, para la firma digital.

Saludos

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/whiteoctober/WhiteOctoberTCPDFBundle/issues/61#issuecomment-685724304, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASA5TXEUJ37XCID2SQTFU3SDY7WHANCNFSM4QS6HW5Q .

Luvelnet avatar Sep 02 '20 15:09 Luvelnet

Luis, yo uso setasign/fpdi.

Te hará falta además esto:

use setasign\Fpdi\Tcpdf\Fpdi;

class TCPDFService extends Fpdi
{
}

davnavarro avatar Sep 02 '20 16:09 davnavarro