Jump to content

Creating a PDF


DigitalDaz

Recommended Posts

I'm currently creating a custom module to print out some stuff, completely unrelated to WHMCS

 

I need to print a PDF and see that there is vendor/tecnickcom/tcpdf

 

Can anyone tell me how I can use this within my module please.

 

I think its goint ot be some sort of use thing but being as WHMCS itself is encrypted I cannot look at the source to see how they do it.

 

TIA

 

Daz

Link to comment
Share on other sites

I wouldn't expect WHMCS to be doing anything devilishly clever internally with this, you should take a look at the tcpdf documentation about creating PDF pages using PHP.

 

you might find it easier for testing to add tcpdf to your module folder, then if/when you have it working there, try to do the same by accessing the files in the tecnickcom folder.

Link to comment
Share on other sites

We don't change any of the files in the vendor directory for third parties. Anything there is stock.

 

Anything we do override is done inside the WHMCS vendor folder and shouldn't affect you making custom PDFs using the TCPDF class directly.

 

 

Guys, thanks for the answer, maybe I worded my question wrong but what I was looking for that I managed to work out was this:

 

$pdf = new \TCPDF;

 

or in my case:

 

$pdf = new \TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated