We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21560
    • 145 Posts
    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...
      [font=Times]Comics, stories, music, graphics, games and more! http://Nimja.com
      • 25663 MODX Staff
      • 12,272 Posts
      Hi Nimja, just wanted to say thanks for such a great solution. We’re using it to process text files into "virtual greenbar" reports from a mainframe. Works wicked-fast and wonderfully. smiley

      In our work Garry found an instance where it was stripping all leading space from each line of text; hopefully he’ll comment back here with his update.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 21560
        • 145 Posts
        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?
          [font=Times]Comics, stories, music, graphics, games and more! http://Nimja.com
          • 25663 MODX Staff
          • 12,272 Posts
          Oh we got it sorted just wanted to note it for others. We are processing 133 column text reports generated off a mainframe and the alignment got a bit foofy with the leading spaces removed. wink

          Have you looked at the project on SF that implements some rudimentary HTML-formatting on top of FPDF?
          http://pdml.sourceforge.net/
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 21560
            • 145 Posts
            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.
              [font=Times]Comics, stories, music, graphics, games and more! http://Nimja.com
              • 25663 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
                • 21560
                • 145 Posts
                I found out why. It’s a project from 2002. I’m looking at TCPDF

                I might do some tests with it to see if it allows for huge documents. Other people might want to look at proper HTML 2 PDF libraries, but my main concern is that my document is over 400 pages long and still is dynamic content.

                As noted before in my replies, most of the libraries I tried failed miserably after 50 pages.
                  [font=Times]Comics, stories, music, graphics, games and more! http://Nimja.com
                  • 25663 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
                    • 21560
                    • 145 Posts
                    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.
                      [font=Times]Comics, stories, music, graphics, games and more! http://Nimja.com
                      • 30884
                      • 142 Posts
                      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. laugh
                        p i x e l p u s h e r e x t r o d i n a i r e
                        A x i s A n i m a t i o n . c o m