-
Notifications
You must be signed in to change notification settings - Fork 44
How can i use a custom class that extends TCPDF #41
Comments
Hi @julien-its, Could you take a look at the instructions at https://github.com/whiteoctober/WhiteOctoberTCPDFBundle#using-a-custom-class and see if they provide the information that you need? If you're still stuck, add further comments to this issue and we'll help you further and also think whether the documentation needs updating. Thanks |
Oh, and if you don't need further help, let us know that too so that we can close this issue! Thanks |
Hello, Thank you for your answer. I actuly found the solution but not like explained in the Readme Doing this :
The class is never called So i created a new class that extends TCPDF with Header function
And instead of using
I instantialize my custom class
It works but maybe there is a beter solution Regards |
Hi Julien, I've done a test of the custom-class functionality here and all seems to be working as expected. Could you update your config to look like this?
Replace And then use
and let me know if that works? If it doesn't, can you show me where you're getting |
Sorry it doesn't work My service.yml :
In InvoiceService :
var_dump($this->pdf) return object(TCPDF) When doing in InvoiceService :
var_dump($this->pdf) return object(AppBundle\Services\Exports\Pdf\InvoiceTcpdf) $this->tcpdfService is a parameter given in the service.yml ` AppBundle\Services\Exports\Pdf\InvoiceService: it's the $tcpdf param |
@julien-its I think the problem is these lines:
These should go in Could you move those lines to |
I would like to change the header and footer functions
The text was updated successfully, but these errors were encountered: