Avatar of Ridgejp
Ridgejp
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Generate PDF's using TCPDF - Initial Set Up

Hi,

Just trying to get going with the initial setup so I can learn the basic's but struggling to get to grips which the location of/and which are the basic include files?

Any help would be greatly appreciated ... the new github location states that full installation instructions are available at tcpdg.org but I'm struggling to locate them?

J
PHP

Avatar of undefined
Last Comment
Julian Hansen

8/22/2022 - Mon
Julian Hansen

The examples on the site seem fairly self-explanatory
https://tcpdf.org/examples/example_001/

Try that and if you don't come right post back and I will try a green fields install.
Ridgejp

ASKER
It's the include file in the php that I'm struggling with ... what's the location of 'tcpdf_include.php'?
Ridgejp

ASKER
Sorry didn't quite explain myself there ...

I understand I need to download the 'tcpdf_include.php' referenced in the example you cited and upload it to my server - I just can't find it on the site ... when I go to GitHub the file can be located but it then references further files such as tcpdf.php, tcpdf_config.php after which I got a little lost.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Julian Hansen

The main file is this one

https://github.com/tecnickcom/TCPDF/blob/master/tcpdf.php

If you look at that you see it includes these
// TCPDF configuration
require_once(dirname(__FILE__).'/tcpdf_autoconfig.php');
// TCPDF static font methods and data
require_once(dirname(__FILE__).'/include/tcpdf_font_data.php');
// TCPDF static font methods and data
require_once(dirname(__FILE__).'/include/tcpdf_fonts.php');
// TCPDF static color methods and data
require_once(dirname(__FILE__).'/include/tcpdf_colors.php');
// TCPDF static image methods and data
require_once(dirname(__FILE__).'/include/tcpdf_images.php');
// TCPDF static methods and data
require_once(dirname(__FILE__).'/include/tcpdf_static.php');

Open in new window


You can check each of the above for further includes but it looks like if you have the files in the root and the includes folder you should be set.

You can then include tcpdf.php from anywhere - it loads the other files relative to where IT is.
Ridgejp

ASKER
Ok I'll work through those and come back to you.
Thanks
SOLUTION
Ray Paseur

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Ridgejp

ASKER
Thank you both ... spent some time looking at both examples and finally think I've got a basis now for starting to do some testing.

Really appreciate your input as alway ... just don't leave the country I've got loads more questions to come!

J
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Julian Hansen

You are welcome.