You don’t have to use a page.pdf file, you can just comment out the including of templates without any trouble.
It’s just included for things like watermarks that I used to have in my PDF’s
Unfortunately, with 450 pages, PHP seems to run out of memory if there’s a watermark...
Actually that ’stripping of leading lines’ could very well be my fault. I tend to strip whitespaces around blocks of text as databases (or people) tend to add useless spaces, tabs or enters between stuff.
The command is called ’trim’ (or it’s brothers ltrim and rtrim for left and right).
If you look in the code: $line = trim($par);
That removes the spaces around the $par(agraph).
If you want to keep leading spaces/tabs intact, just change it to rtrim (only removes whitespaces from the end).
Would that help?
Didn’t notice that yet. Hmm... quite interesting. I’ll look further into it and see if I can make a more compatible PDF from content version.
Btw. They don’t support <p> tags, oddly enough.
-
MODX Staff
- 12,272 Posts
Not supporting paragraph tags is crazy indeed. lol
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
MODX Staff
- 12,272 Posts
TCPDF looks quite interesting indeed.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
It does, I will have to do many tests with the large amount of data that I wish to put in it before I will use it though.
Wow, just found this thread. I was just about to start scouring the modx forum for a PDF generator to output reports upon request. Nice one!
Look forward to integrating it here.