*HELP* Intergrate TCPDF |
[eluser]Phil Sturgeon[/eluser]
Search the forums, I answered this question a few times I think.
[eluser]jjbakker[/eluser]
I did search the forums, tcpdf uses also a config file, i think the problem is there. But i'm not experienced enough to be sure. I placed tcpdf.php and the config dir the system/application/libraries In my controller i use this: Code: function pdf3() Whatever i do it keeps complaining about: Code: A PHP Error was encountered
[eluser]xwero[/eluser]
i don't know anything about tcpfd but the error shows there must be a problem with the font file or the path. Can you define it in the config?
[eluser]Jonathan Gordon[/eluser]
For one thing, if you look in the fonts folder, you'll see arial.(php/ctg.z/z) does not exist. Try using a font that comes with the library. Basically, to get it to work, you need to set up the tcpdf.php to point to the correct folder, if you choose to have all the components in a sub-folder like I do, and I'm assuming anyone else avoiding a headache would do. I defined my fonts path in the config file, and I found that using the normal $pdf class straight up breaks. I haven't messed with it enough to see what will unbreak it, and I'm no codeigniter pro here. Anyway, here's what I used, and it worked fine. I'll be using tcpdf to output lots and lots of user reports from a web app I'm making now, I'll update this with anything I find in the next few days of swearing and experimenting. Code: <?php Oooooh, okay, so I peeked around in the library for a couple seconds, and it seems as though anything you need to be doing with $pdf (which as far as I remember, is the fdpf class), you can access with the aliased version through tcdpf. So for those lines I dropped out, do this: Code: $this->tcpdf->SetFont("vera", "BI", 20); Now to make it pretty. ![]()
[eluser]bjora857[/eluser]
Yes Im having trouble using tcpdf too. Does someone know how to set it up?
[eluser]yekibud[/eluser]
bjora857: Just put the tcpdf files in your libraries directory and change the two paths in the config file appropriately.
[eluser]pixelazion[/eluser]
I know this is kind of late, but I hope this will help... just happen to have a need of html-to-pdf kind of viewing thingy. here's how i did it ^_^ http://www.ikawka.com/2008/09/codeignitertcpdf-plugin/ |
Welcome Guest, Not a member yet? Register Sign In |