We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22673
    • 72 Posts
    I would like to be able to create a HTML page with a basic design which uses getResources and other snippets to pull in content from other resources. I then want to be able to turn that page into a PDF, using the same design as the page.

    I think pdfBridge works slightly differently to this by using a chunk for the PDF template which is not able parse snippets etc. It only pulls in the content from the resource fields and TVs.

    Is there a way of modifying the pdfBridge plugin to create a PDF using a template that contains snippets/plugins, and after they have parsed? [ed. note: paramaniac last edited this post 13 years, 10 months ago.]
      • 36704
      • 131 Posts
      Hi paramaniac,

      Currently i am using the plugin "sekSiteTools" that you can download on Package Manager.
      What is sekSiteTools?

      SekSiteTools is is a collection of modx snippets and chunks to perform common or repetitive tasks within a single add-on. This tool box will continue to grow with lightweight tools that doesn't require its own add-on.

      Requirements

      MODx Revolution 2.1.0-pl2 or later
      PHP5 or later
      History

      Usage

      Currently sekSiteTools has 3 tools, and more will be added:

      printdiv - This will copy the content of the specified div into a popup window that will then open a print dialog box to print a "printer friendly version" of the content. After the print job is sent to the printer the popup window will automatically close.
      google.analytics - Add the google analytics code to your website quickly and easily using this snippet. All that is required for this snippet to work is to register the domain with google and insert the account number into the &accountNumber property.
      easytabs - Add tabs to a form quickly and easily.

        • 34075 ☆ A M B ☆
        • 130 Posts
        Apart from the snippet/chunks problem: pdfBridge is not meant for complex layouts. Besides that, it's quite old too. I created it for one of my clients to convert resources to a PDF catalog (using pdfBridge + PDF merge tool). I ended up using DocRaptor (http://docraptor.com) because, while not free, their HTML to PDF conversion is much better than any open source tool I could find.
          Jeroen Kenters

          MODX Professional | MODX Ambassador | Dutch MODX forums moderator

          website | twitter
          • 42049 ☆ A M B ☆
          • 250 Posts
          +1 for docraptor - You pay for what you get! I used this in a custom Modx quotation system with very impressive results!
            GEL STUDIOS
            MODX Professional | MODX Ambassador

            Website | Email | Twitter | Facebook
            • 22673
            • 72 Posts
            Thanks guys I will check out DocRaptor.
            I take it you can integrate this via a MODx snippet, but how do you insert the final, parsed page HTML into

            $document_content = "MY HTML";


            ??

            http://docraptor.com/documentation/examples_php
              • 22673
              • 72 Posts
              Actually the jQuery example looks OK, I'll try that instead of PHP: http://docraptor.com/documentation/examples_jquery
                • 34075 ☆ A M B ☆
                • 130 Posts
                Quote from: paramaniac at Nov 28, 2012, 06:47 AM
                Thanks guys I will check out DocRaptor.
                I take it you can integrate this via a MODx snippet, but how do you insert the final, parsed page HTML into

                $document_content = "MY HTML";


                ??

                http://docraptor.com/documentation/examples_php

                http://docraptor.com/documentation/referrer_based_document_generation_example_code ?
                  Jeroen Kenters

                  MODX Professional | MODX Ambassador | Dutch MODX forums moderator

                  website | twitter
                  • 22673
                  • 72 Posts
                  Ah sorry, thanks!