Custom Module from mPDF to TCPDF

Hi,
Please, I need a little help with this, I’m not programmer :frowning:
I’m trying to modify a custom module for TCPDF using the mPDF custom module created by sid (HTML to PDF Action - NodeJS & PHP [Open Source]) with no luck.
The mPDF module works greats but I need a specific function missing in mPDF.

The mPDF custom module is this:

<?php

namespace modules;

use \lib\core\Module;

require_once __DIR__ . '/../../../vendor/autoload.php';

class HtmlToPDF extends Module

{

    public function ConvertToPDF($options, $name)

    {

I already installed tcpdf with composer but when I call this class:

$pdf = new TCPDF($orientation, PDF_UNIT, $pageLayout, true, 'UTF-8', false);

I receive this message:

message: "Class \"modules\\TCPDF\" not found"

And for what I see in my unknowlegment is that I need to call the class TCPDF first.
How can I do to solve this, thanks.

Community Page
Last updated: