developers how do you print source code on the fly?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fris
    Too lazy to set a custom title
    • Aug 2002
    • 55679

    #1

    developers how do you print source code on the fly?

    i want users to be able to download snippets of source code in pdf format.

    anyone know a trick around getting to send it to pdf format using a php class of some sort?

    currently im using dompdf.

    Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.
  • edgeprod
    Permanently Gone
    • Mar 2004
    • 10019

    #2
    Obviously, the code is being read dynamically, and there's nothing you've found in Pear? During my time on the Python team, I remember some py lib that'd output to PDF. As a last resort, you could probably convert it from the command line.

    Comment

    • edgeprod
      Permanently Gone
      • Mar 2004
      • 10019

      #3
      And did you try fpdf.org unsuccessfully already?

      Comment

      • Kiopa_Matt
        Confirmed User
        • Oct 2007
        • 1448

        #4
        Originally posted by edgeprod
        And did you try fpdf.org unsuccessfully already?
        That's what I always use, and it's a good little library. PDF is a pain though, because everything has to go pixel by pixel. If you're dynamically generating some statement or invoice, you end up fucking around reloading the PDF a few times a minute just to move a line or piece of text over by a couple pixels here and there, to make sure everything lines up.

        It's a pain...
        xMarkPro -- Ultimate Blog Network Management
        Streamline your marketing operations. Centralize management of domains, pages, Wordpress blogs, sponsors, link codes, media items, sales and traffic statistics, plus more!

        Comment

        • TheDoc
          Too lazy to set a custom title
          • Jul 2001
          • 13827

          #5
          I just bookmarked this a few days back...haven't used it yet.

          http://www.pdflib.com/products/pdflib-family/pdflib/

          "PDFlib’s main targets are dynamic PDF creation on a Web server"
          ~TheDoc - ICQ7765825
          It's all disambiguation

          Comment

          • fris
            Too lazy to set a custom title
            • Aug 2002
            • 55679

            #6
            Originally posted by TheDoc
            I just bookmarked this a few days back...haven't used it yet.

            http://www.pdflib.com/products/pdflib-family/pdflib/

            "PDFlib?s main targets are dynamic PDF creation on a Web server"
            ya dompdf uses pdflib, just dont know how to make it highlight the source code when creating the actual pdf, it tries to run the actual php code, and ive tried highlight_file, even set the output to false, but still no go.

            Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

            Comment

            • TheDoc
              Too lazy to set a custom title
              • Jul 2001
              • 13827

              #7
              Originally posted by fris
              ya dompdf uses pdflib, just dont know how to make it highlight the source code when creating the actual pdf, it tries to run the actual php code, and ive tried highlight_file, even set the output to false, but still no go.

              Not sure how you get the content, but can you remove/filter the php tags?
              ~TheDoc - ICQ7765825
              It's all disambiguation

              Comment

              • edgeprod
                Permanently Gone
                • Mar 2004
                • 10019

                #8
                Get everything sorted, fris? Feel free to ICQ or call if you need a hand.

                Comment

                Working...