I mean to say you show download and install composer in our pc, to connect pdf library, but I will utilize the web hosting space, how I will use composer to web hosting space, or the particular pdf library which you have shown in the video can be downloaded to our desktop first and then can be uploaded to the web hosting space.
I am using Macbook, I installed somehow composer with instructions I have found on website, but cant run it in terminal console, also in sublinetext dont have the terminal, how to install into?
sorry for disturbing you again, but how would you be able embed, this pdf on another page, with out downloading. I am making a payslip generation website, and I want it to display the generated payslip, under the submit button, after the user has entered they pay rates. Thanks
Really great tutorial. I wonder if this can be used to create a customizable flyer. Maybe give the user a couple of editable text fields, and then allow them to download the file as a pdf
The video is more about posting form data, using windows and installing composer than PDF. Takes until almost the end to get to the part where how to "How To Create a PDF using PHP"
I am using axios to send some of my Javascript variables to the PHP file. How would you do it then? My problem is that I'm using axios.get to send the variables to PHP but that doesn't work with the form submission.
Please help why when i use Output("test.pdf", "D") it wont download my file, then i try use the other format which is Output("test.pdf", "F"), it will then save my pdf into my htdocs folder. thanks
Perfect.. Btw I also want to know how can I built a pdf form, then extract or store the data from the form to mysql. Then in if i want to display these data back to form so people can download it as pdf.. I reall have to know this for my project. Thanks and appreciate if you can help me
what can I do with error" : Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.1.0". You are running 5.6.0. in on line
Hi, thanks for the tutorial! When i submit the form, i get this error: Fatal error: Uncaught Error: Call to undefined function Mpdf\mb_regex_encoding() in C:\MAMP\htdocs\test\vendor\mpdf\mpdf\src\Mpdf.php:1125 Stack trace: #0 C:\MAMP\htdocs\test\makepdf.php(14): Mpdf\Mpdf->__construct() #1 {main} thrown in C:\MAMP\htdocs\test\vendor\mpdf\mpdf\src\Mpdf.php on line 1125 Do you have any idea how to fix this?
Hi, I have question. Do you have to install composer when your're going live with a registered domain go live? mine don't seem to work when its online, but via localhost it works perfectly.. how come? you have the same issue? thanks
Hello Yvan. No you do not need to install it on server side, in most cases it works locally to build the php classes. Just be sure to upload 'vendor' folder with your website when you make it live.
@@mrdigitalau maybe what he meant was can he install/download the mpdf composer.json to the project folder first, then upload it to the hosting server. well basically in the tutorial you used localhost so it's technically already installed to your project files INSIDE your computer hard drive. correct me if i'm wrong. cheers!
It's a really useful tutorial. Please zoom your text editor or increase font size or change the color of your text editor from the next video tutorial.
Hey there, I followed your exact tutorial, but when I press submit it doesn't download the PDF file. Can't seem to find out where I've gone wrong. Please help! Also, how can you upload the generated file to a server instead of download it in the browser? EDIT: It did work on my index.php file, but not in a different PHP file. Why is that? I don't want to use it in my index file but rather another page.
I use window, and when I pasted this 'composer require mpdf/mpdf' into my integrated terminal in vs code. I keep on getting this error: PS C:\xampp\htdocs\0\php\U2O1\PdfromInfo> composer require mpdf/mpdf Using version ^8.0 for mpdf/mpdf ./composer.json has been updated Running composer update mpdf/mpdf Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - mpdf/mpdf[v8.0.0, ..., v8.0.3] require php ^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 -> your php version (8.0.0) does not satisfy that requirement. - mpdf/mpdf[v8.0.4, ..., v8.0.7] require php ^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 -> your php version (8.0.0) does not satisfy that requirement. - mpdf/mpdf[v8.0.8, ..., v8.0.9] require php ^5.6 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement. - mpdf/mpdf[v8.0.10, ..., v8.0.12] require ext-gd * -> it is missing from your system. Install or enable PHP's gd extension. - Root composer.json requires mpdf/mpdf ^8.0 -> satisfiable by mpdf/mpdf[v8.0.0, ..., v8.0.12]. To enable extensions, verify that they are enabled in your .ini files: - C:\xampp\php\php.ini You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode. Installation failed, reverting ./composer.json and ./composer.lock to their original content. ---------------------------------------------------------------------------------------------------------------------------------------------------------- I have tried copy pasting the composer.json, and vendor folder into my project folder. Although everything seem to work when I was coding, when I went onto the webpage and entered the input's I got this error 'Fatal error: Uncaught Error: Class "Mpdf\Mpdf" not found in C:\xampp\htdocs\0\php\U2O1\PdfromInfo\makepdf.php:14 Stack trace: #0 {main} thrown in C:\xampp\htdocs\0\php\U2O1\PdfromInfo\makepdf.php on line 14'. This is what my line 13 and 4 in code looks like. //Create new PDF instance $mpdf = new \Mpdf\Mpdf(); I know this comment is really long, but could you please be able to help me with issue.
@@mrdigitalau I installed the latest version, but when entered 'npm remove mpdf/mdf'. I got this error: npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + npm remove mpdf/mpdf + ~~~ + CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- I think the problem might be somethin to do with the gd extension, which was the line 4 of the error that previously sent you. mpdf/mpdf[v8.0.10, ..., v8.0.12] require ext-gd * -> it is missing from your system. Install or enable PHP's gd extension.
@@mrdigitalau Thanks for replying, I fixed the issue. I found out the problem, it was to do with gd extension on php.ini file, there was a semicolon in front of it, which made it a comment I think(;extension=gd). I just had to remove the semicolon, now I am able to fully download mpdf, and have done this. Thanks so much for all your help, the tutorial was easy to follow has been really helpful for payslip generation project I am doing for school. 🙂
Hey Bro. Can You Make A Good Looking Invoice Using PHP, MySql. Which one Will Be Printable and automatically will be Saved on Data base. With Some Mathematical Functionality Like Total, Discount, Random Invoice Number Etc. Thanks. It Will Be very Helpful For Us.
Uuh, i'm having a difficulty here. so when i try to pressed the create pdf button, it doesn't do anything. it does redirect to the makepdf.php file, but it does not do anything. is there something wrong at the output browser command or the Write PDF command? cheers! Update : nvm, i mistyped the $mpdf->output to $mdpf->output -_-" p.s : is there a tutorial where we could design the output PDF like using CSS or something? please let me know :) Thanks for the tutorial!!
So sorry I'm late. I'm about to try this to make sure, but my guess is you need to have the loop create a pre-existing HTML so the $data variable can take as input the result of the loop. The $data variable, being constructed as a string with HTML tags, won't necessarily have programmatic functionality, since HTML is just a Markup language, not a programming one. If you're still interested I'll come back to this comment later since I need to build the same functionality for my client.
hi, i am getting this error can you guide me Parse error: syntax error, unexpected 'function' (T_FUNCTION), expecting identifier (T_STRING) or \\ (T_NS_SEPARATOR) in /home/sh2/S3734392/public_html/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php on line 5
@@mrdigitalau uhuh yes it was successful installed .To check that from the command prompt ,I typed "php composer.phar" because just" composer" does not work for me .Now for the mdpf I tried " php composer.phar require mpdf/ mpdf " and it is showing Me something like this below
I always have a problem with the \Mpdf\Mpdf() it is not recognized , I also tried using \mPDF() but it was not solved it says that the type is undefined. help plssss :((((
Yeh I'm having issues with this too. His tutorial is excellent, but I'm coming up with this issue as well. Specifically: Fatal error: Uncaught Error: Class "Mpdf\Mpdf" not found in C:\xampp\htdocs\testing\makepdf.php:13 Stack trace: #0 {main} thrown in C:\xampp\htdocs\testing\makepdf.php on line 13. Any help would be appreciated.
Fatal error: Uncaught Error: Class "Mpdf\Mpdf" not found in C:\xampp\htdocs\FYP\test\pdf\makepdf.php:10 Stack trace: #0 {main} thrown in C:\xampp\htdocs\FYP\test\pdf\makepdf.php on line 10
Functionality of mPdf is great, but unfortunately it is licensed under GNU GPL - which makes it useless for many cases. I recommend to use TCPDF instead - which is also great but licensed under the less restrictive GNU LGPL license.
Great video! Super high-quality! Keep it up! Here you can get the source code - www.etutorialspoint.com/index.php/195-how-to-generate-pdf-file-using-mpdf-in-php
Please don't put so much space between HTML elements, it actually makes the code harder to read instead of easier. Also, If we're trying to create PDFs automatically from a PHP site, I wouldn't say we're at Fischer-Price levels of coding.
Want to email the PDF? See the next video - th-cam.com/video/K8eoQPwKZjY/w-d-xo.html
Thank you @Mr_Digital ! Can you make another tutorial to explain how to put elements in a bootstrap table?
thanks a lot man you helped a lot
help please, i need to loop through the db table... how to print it in pdf? i have no idea, looping not working
@@superkamehameha1744 contact me on my whatsapp group i will tell you what you want
Whatsapp group link on my youtube channel page
This tutorial is SMOOTH. Dunno how to explain it this is just satisfying to watch. It's neat and smooth.
Thanks Lance, appreciate it mate!
Perfect Working 100% actually!
Followed faithfully and got totally working project. Subscribed
Congratulations !
It's a very good video and helps people who don't know anything about the subject.
One of the simplest and most useful bootstrap lessons here too
Thank you very much for your tutorial. There is a question can we insert image also in our output pdf using this method??
Lovely tutorial, straight to the point. I also like the bootstrap classes explanation, you just got a subscriber as well thank you
Thanks for the video! How do you apply CSS to the pdf before it's outputted?
I mean to say you show download and install composer in our pc, to connect pdf library, but I will utilize the web hosting space, how I will use composer to web hosting space, or the particular pdf library which you have shown in the video can be downloaded to our desktop first and then can be uploaded to the web hosting space.
how do i convert a complete php page (consisting of css stylesheet,bootstrap and data from mysql ) into a php....?
Great video and excellent explanations about code blocks. Thank you soo much
mush love from Sri Lanka
Good Luck
Very helpful video. Thank you so much.
I am using Macbook, I installed somehow composer with instructions I have found on website, but cant run it in terminal console, also in sublinetext dont have the terminal, how to install into?
Can We link a CSS file to style the pdf?
sorry for disturbing you again, but how would you be able embed, this pdf on another page, with out downloading. I am making a payslip generation website, and I want it to display the generated payslip, under the submit button, after the user has entered they pay rates.
Thanks
Really great tutorial. I wonder if this can be used to create a customizable flyer. Maybe give the user a couple of editable text fields, and then allow them to download the file as a pdf
The video is more about posting form data, using windows and installing composer than PDF. Takes until almost the end to get to the part where how to "How To Create a PDF using PHP"
It's very easy to fast forward if something doesn't apply to you
Very good tutorial, very explanitive, splitting it up into sections.
Thank you very much cordially it was Cleary and simple 🙂
Speechless!, I Just subscribed.
great work! Thank you so much!
Do you have to do it via Composer? Can't you jus copy some files in your project folder?
I am using axios to send some of my Javascript variables to the PHP file. How would you do it then? My problem is that I'm using axios.get to send the variables to PHP but that doesn't work with the form submission.
What a great tutorial , I really appreciate simple and very clear
Hi. Can you use mPDF to fill a fillable PDF? PDFtk seems to have problems running on Ubuntu.
Really clear...much appreciated 👍
thats was cool
Well explained Sir !!!!
Is it possible with this library generate forms in pdf with fields for signatures? Thanks
Please help why when i use Output("test.pdf", "D") it wont download my file, then i try use the other format which is Output("test.pdf", "F"), it will then save my pdf into my htdocs folder. thanks
Great Video, one question, is there any way to save the pdf when you create the pdf and not download manually?
Suuupeeeer ! Great tutorial ever
Perfect.. Btw I also want to know how can I built a pdf form, then extract or store the data from the form to mysql. Then in if i want to display these data back to form so people can download it as pdf.. I reall have to know this for my project. Thanks and appreciate if you can help me
what can I do with error"
: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.1.0". You are running 5.6.0. in on line
I have a problem Error loading the pdf document. Please I need a help!
I got the same issue, did you find the solution?
Hi, thanks for the tutorial!
When i submit the form, i get this error:
Fatal error: Uncaught Error: Call to undefined function Mpdf\mb_regex_encoding() in C:\MAMP\htdocs\test\vendor\mpdf\mpdf\src\Mpdf.php:1125 Stack trace: #0 C:\MAMP\htdocs\test\makepdf.php(14): Mpdf\Mpdf->__construct() #1 {main} thrown in C:\MAMP\htdocs\test\vendor\mpdf\mpdf\src\Mpdf.php on line 1125
Do you have any idea how to fix this?
Is there any way to format this file?
Hi, I have question.
Do you have to install composer when your're going live with a registered domain go live?
mine don't seem to work when its online, but via localhost it works perfectly.. how come? you have the same issue?
thanks
I have the same problem :-(
Wich version of Php do you use? i tried that library with Php 7.3.2 and i'm getting a blank page :( any suggestions?
me to
@@juangonzalez3288 same here :(
I am downgrading to php 7.1 letting you know
7.2.2 is the php he is running
Will it be work when I just copy all files from project to server?
Thank you very much sir!!!
Do I need to install composer on the server side,
or I only download everything local to the server?
Hello Yvan. No you do not need to install it on server side, in most cases it works locally to build the php classes. Just be sure to upload 'vendor' folder with your website when you make it live.
@@mrdigitalau Thank you very much
Can php composer file first to download at our computer hard disk and then it uploaded to web hosting or cloud hosting space?
Hi Sunil. Sorry, I don't understand your question exactly, do you mind clarifying what you mean? cheers
@@mrdigitalau maybe what he meant was can he install/download the mpdf composer.json to the project folder first, then upload it to the hosting server. well basically in the tutorial you used localhost so it's technically already installed to your project files INSIDE your computer hard drive. correct me if i'm wrong. cheers!
It's a really useful tutorial. Please zoom your text editor or increase font size or change the color of your text editor from the next video tutorial.
Sorry, will take that on board for next videos. Cheers :)
Very good tutorial... thanks a lot
Hey there, I followed your exact tutorial, but when I press submit it doesn't download the PDF file. Can't seem to find out where I've gone wrong. Please help! Also, how can you upload the generated file to a server instead of download it in the browser?
EDIT: It did work on my index.php file, but not in a different PHP file. Why is that? I don't want to use it in my index file but rather another page.
This video is so helpful ,Thank you.
Waiting for your localhost email video
I am getting HTTP 405 error when I submit the form.
I use window, and when I pasted this 'composer require mpdf/mpdf' into my integrated terminal in vs code. I keep on getting this error:
PS C:\xampp\htdocs\0\php\U2O1\PdfromInfo> composer require mpdf/mpdf
Using version ^8.0 for mpdf/mpdf
./composer.json has been updated
Running composer update mpdf/mpdf
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- mpdf/mpdf[v8.0.0, ..., v8.0.3] require php ^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 -> your php version (8.0.0) does not satisfy that requirement.
- mpdf/mpdf[v8.0.4, ..., v8.0.7] require php ^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 -> your php version (8.0.0) does not satisfy that requirement.
- mpdf/mpdf[v8.0.8, ..., v8.0.9] require php ^5.6 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
- mpdf/mpdf[v8.0.10, ..., v8.0.12] require ext-gd * -> it is missing from your system. Install or enable PHP's gd extension.
- Root composer.json requires mpdf/mpdf ^8.0 -> satisfiable by mpdf/mpdf[v8.0.0, ..., v8.0.12].
To enable extensions, verify that they are enabled in your .ini files:
- C:\xampp\php\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
----------------------------------------------------------------------------------------------------------------------------------------------------------
I have tried copy pasting the composer.json, and vendor folder into my project folder. Although everything seem to work when I was coding, when I went onto the webpage and entered the input's I got this error 'Fatal error: Uncaught Error: Class "Mpdf\Mpdf" not found in C:\xampp\htdocs\0\php\U2O1\PdfromInfo\makepdf.php:14 Stack trace: #0 {main} thrown in C:\xampp\htdocs\0\php\U2O1\PdfromInfo\makepdf.php on line 14'.
This is what my line 13 and 4 in code looks like.
//Create new PDF instance
$mpdf = new \Mpdf\Mpdf();
I know this comment is really long, but could you please be able to help me with issue.
You need to install the latest version of MPDF as you are using PHP 8. Type npm remove mpdf/mdf, then npm install mpdf/mpf.. See that that wokrs
@@mrdigitalau I installed the latest version, but when entered 'npm remove mpdf/mdf'. I got this error:
npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ npm remove mpdf/mpdf
+ ~~~
+ CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I think the problem might be somethin to do with the gd extension, which was the line 4 of the error that previously sent you.
mpdf/mpdf[v8.0.10, ..., v8.0.12] require ext-gd * -> it is missing from your system. Install or enable PHP's gd extension.
@@mathsmagician6949 So sorry mate. composer remove mpdf/mpdf ... then composer require mpdf/mpdf -- sorry I got mixed up with a different thing .. :)
@@mrdigitalau
Thanks for replying, I fixed the issue.
I found out the problem, it was to do with gd extension on php.ini file, there was a semicolon in front of it, which made it a comment I think(;extension=gd). I just had to remove the semicolon, now I am able to fully download mpdf, and have done this.
Thanks so much for all your help, the tutorial was easy to follow has been really helpful for payslip generation project I am doing for school. 🙂
Can i ask about , how if i want to design that pdf.
Great video thanks man oh btw can we use css on this pdf? It would be interesting if we can use css then print it out on a pdf page
Later version of mpdf, object is created by $mpdf = new mPDF() Took me a while to figure that out. Great video though
Hi .. I did the same thing
But I am not able to download any pdf file
Please send me ur source code
Thank you very much, a great video.
Thats a really good Turorial, thanks for that.
You're welcome!
Great tutorial! thanks for the video.
Hey Bro. Can You Make A Good Looking Invoice Using PHP, MySql. Which one Will Be Printable and automatically will be Saved on Data base. With Some Mathematical Functionality Like Total, Discount, Random Invoice Number Etc. Thanks. It Will Be very Helpful For Us.
You can try hosting invoice ninja!
This is awesome. Thanks man.
Mpdf doesn't work for one large row table
Uuh, i'm having a difficulty here. so when i try to pressed the create pdf button, it doesn't do anything. it does redirect to the makepdf.php file, but it does not do anything. is there something wrong at the output browser command or the Write PDF command? cheers!
Update :
nvm, i mistyped the $mpdf->output to $mdpf->output -_-"
p.s : is there a tutorial where we could design the output PDF like using CSS or something? please let me know :)
Thanks for the tutorial!!
Glad your sorted it m8!
this is great thank you!
Excellent...
Thank you for the video. I tried and it delivers the font in pdf is large. How to solve this?
What is the command if i wanted it to open the pdf file automatically.
Could you make a tutorial to retrieve data from pdf documents, for example counting pages (in my case)
help please, i need to loop through the db table... how to print it in pdf? i have no idea, looping not working
So sorry I'm late. I'm about to try this to make sure, but my guess is you need to have the loop create a pre-existing HTML so the $data variable can take as input the result of the loop.
The $data variable, being constructed as a string with HTML tags, won't necessarily have programmatic functionality, since HTML is just a Markup language, not a programming one.
If you're still interested I'll come back to this comment later since I need to build the same functionality for my client.
Thanks, I think this was very well done.
Thanks, Please how would i insert a php array into mpdf
Hi Adisa. PHP array? as in you want to display the array on the PDF?
AOA
What if we want to get data from checkboxes??
use if
hi, i am getting this error can you guide me
Parse error: syntax error, unexpected 'function' (T_FUNCTION), expecting identifier (T_STRING) or \\ (T_NS_SEPARATOR) in /home/sh2/S3734392/public_html/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php on line 5
Hi mate, paste your deep_copy.php code here.. Most likely missing a { or something?
@@mrdigitalau
Good video bro 👍🙂 I would like to request you to kindly create a school marksheet retrieving data from the Database.
Really good! Thank you!
I'm stuck while trying to install the mpdf package ! can anyone help me please
composer require mpdf/mpdf is not working !!
Hi Ari, is composer installed on your machine?
@@mrdigitalau uhuh yes it was successful installed .To check that from the command prompt ,I typed "php composer.phar" because just" composer" does not work for me .Now for the mdpf I tried " php composer.phar require mpdf/ mpdf " and it is showing Me something like this below
@@JonesSmiraj5626 you have to make composer global
Great tutorial, thank you.
You're welcome !!!
I always have a problem with the \Mpdf\Mpdf() it is not recognized , I also tried using \mPDF() but it was not solved it says that the type is undefined.
help plssss :((((
I have the same problem !! do you find any solution ????
@@ayatanssaien--4084 do you find any solution
Yeh I'm having issues with this too. His tutorial is excellent, but I'm coming up with this issue as well. Specifically: Fatal error: Uncaught Error: Class "Mpdf\Mpdf" not found in C:\xampp\htdocs\testing\makepdf.php:13 Stack trace: #0 {main} thrown in C:\xampp\htdocs\testing\makepdf.php on line 13. Any help would be appreciated.
Thanks you helped a lot ❤️👍
amazing thank you !!!
Fatal error: Uncaught Error: Class "Mpdf\Mpdf" not found in C:\xampp\htdocs\FYP\test\pdf\makepdf.php:10 Stack trace: #0 {main} thrown in C:\xampp\htdocs\FYP\test\pdf\makepdf.php on line 10
how to fix this
@@bsskll9544 i'm facing the same problem , were u able to fix it ?
Did you solve it? I have the same error code
thank you MR DIGITAL from algeria
Ya it's working 🙂
video start from 8:43
thank you so much to this help
Hats off!
i've got error, plz help me ----> Undefined type 'Mpdf\Mpdf'.
$mpdf = new \mPDF('utf-8', 'A4-L');
Functionality of mPdf is great, but unfortunately it is licensed under GNU GPL - which makes it useless for many cases. I recommend to use TCPDF instead - which is also great but licensed under the less restrictive GNU LGPL license.
what about fpdf???
@@divyshrivastava5377 The FPDF license is a permissive license very similar to the MIT license. This should be OK too.
can you please put into Github.
This is great can i get the source code?
Git source code ?
Many thanks.
source code ka link kha h bey..
Thank u so much
We click a thing, install the thing that does some magic...and there we go, magic is done! now we can push to production. . .
buen trabajo facil de aplicar
Please send the code file here😥🙄
THANKS!!!!!!!!!!!!!!!!!!!
Listen Sir Can you help me ?
Source code?
🔥💯
Thanks
thnx
Never heard a tutorial recorded from a cavern before.
First time for everything mate. Hope you got something out of the tutorial.
Great video! Super high-quality! Keep it up! Here you can get the source code -
www.etutorialspoint.com/index.php/195-how-to-generate-pdf-file-using-mpdf-in-php
Please don't put so much space between HTML elements, it actually makes the code harder to read instead of easier.
Also, If we're trying to create PDFs automatically from a PHP site, I wouldn't say we're at Fischer-Price levels of coding.