We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19349
    • 9 Posts
    This plugin is nice. Can i use it to in modX revolution?
    I tried it the same way and the result is a site with strange symbols. No text from my content or a new pdf.
    Has somebody tried it in revo?
      • 31381
      • 31 Posts
      Evolution and Revolution are two different systems with similar ideas of how stuff should work.

      Don’t try to use extentions that are made for Evo an Revo.

        • 19349
        • 9 Posts
        Yes i Kow undecided
        But it would be nice if this plugin works in revo too. Maybe somebody have experience with this?
          • 4172
          • 5,888 Posts
          with some small mods this should also work with revo, but didn’t need and haven’t tried it yet.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 38917
            • 17 Posts
            Hi everyone, has anyone tried htmlToPDF 0.1.3.1 yet? I can't make it work. I can't find out what I'm doing wrong as my programming skills are poor, also I've been working with modx for not so long.

            I'm really enjoying modx but as I'm recently trying to dig into it a bit deeper and add some new functionalities to my websites I find it difficult to get detailed 'how tos' or tutorials for non-developers like me, it's such a shame. It puts me down every time when I get stuck with something because it's really hard to find the right information. Developers are generally too busy to answer my basic questions like this which I understand but where else can I search for help? I must say I'm really surprised why modx hasn't become more popular, this is such a great tool. I thought designers and developers are seeking more flexibility - which modx would give them and also, it's so simple once you've learned how it works.

            Back to the subject: to install htmlToPDF- I do the following:
            1) I put all the files into directories specified in documentation (impossible to get it wrong);
            2) create a snippet;
            3) create a plugin and check system events;
            4) place a snippet call inside of a template used by the document;
            5) place a link inside of the document.

            And the error I get after clicking the link is this:

            Fatal error: Call to undefined method htmlToPDF::setLineColor() in D:\xampp\htdocs\test\manager\includes\document.parser.class.inc.php(814) : eval()'d code on line 115

            What does it mean?
            I'm really frustrated as I've been trying to get it to work for 2 weeks now and I guess the solution must be really simple and I'm doing something really stupid.

            Any hints or ideas would be greatly appreciated.

            JaneVi
              muriz.com
              • 3749
              • 24,544 Posts
              I'm just guessing (I haven't used that extra in a long time -- maybe never). it might mean that an "include" statement is not finding a class file to load. Is there an "include" line near the top of the snippet or plugin?

              What version of MODX are you running?


              ---------------------------------------------------------------------------------------------------------------
              PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
              MODX info for everyone: http://bobsguides.com/modx.html
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 38917
                • 17 Posts
                Thank you so much for taking time to read my message. Today I finally got it working!

                I'm running Modx 1.0.5 and here is what I did:
                There is this line in the snippet:

                // Set the color of the header and footer line
                $pdf->setLineColor(isset($lineColor) && (is_array(explode(',', $lineColor))) ? explode(',', $lineColor) : array(0, 0, 0));


                which I commented out. I don't really understand why this line of code was making problem but I'm happy it works now.

                Thank you for your guides Bob, they are very comprehensive for someone like me (I'm not a developer) and helped me so many times (added your page to favourites long time ago). I hope that modx team won't stop developing and improving it.

                I've seen that in the newest release there is 'improvement to pageCache read logic', does this mean that the quirk that you wrote about on your website:
                http://bobsguides.com/modx-cache.html
                no longer exists?

                JaneVi
                  muriz.com
                  • 4172
                  • 5,888 Posts
                  this function ($pdf->setLineColor) doesn't exist (any more).

                  you would use setDrawColor or setDrawColorArray instaed
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 38917
                    • 17 Posts
                    And how can I get the eForm data to show in my pdf?
                      muriz.com
                      • 3749
                      • 24,544 Posts
                      @JaneVi, Thanks for the kind words.

                      Your question about the quirk in MODX Evolution is a good one. It was based on the architecture of MODX Evolution and, TBH, I don't know whether it's gone or not.


                      ---------------------------------------------------------------------------------------------------------------
                      PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
                      MODX info for everyone: http://bobsguides.com/modx.html
                        Did I help you? Buy me a beer
                        Get my Book: MODX:The Official Guide
                        MODX info for everyone: http://bobsguides.com/modx.html
                        My MODX Extras
                        Bob's Guides is now hosted at A2 MODX Hosting