Link to home
Start Free TrialLog in
Avatar of Ridgejp
RidgejpFlag 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
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

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.
Avatar of Ridgejp

ASKER

It's the include file in the php that I'm struggling with ... what's the location of 'tcpdf_include.php'?
Avatar of 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.
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.
Avatar of Ridgejp

ASKER

Ok I'll work through those and come back to you.
Thanks
SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 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
You are welcome.