Problems about print a pdf content

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • datactrl
    New Member
    • Jul 2008
    • 51

    Problems about print a pdf content

    Hi, all
    I create a pdf content on fly and then print it out with coding as following. It's used to work fine on an apache server. Now I change to another apache server on different machine, it won't work now. I wonder maybe the apache version is different, this one is lattest version. Can't figure out the problem. Please advise, thank you very much!


    header('Content-Type: application/pdf');
    header('Content-Disposition: inline');
    print($rpt_cont ent);

    Jack
  • prabirchoudhury
    New Member
    • May 2009
    • 162

    #2
    could you check "PDF Support: enabled" for both server ... you could check calling phpinfo() function on a separate php page.

    The phpinfo() function generates a html page with all the information
    about the PHP installation, including the information about the Apache
    web server, the version and settings of the PHP compiler, and the
    supplemental PHP libraries that are installed and activated.

    Comment

    • Markus
      Recognized Expert Expert
      • Jun 2007
      • 6092

      #3
      Do you get any output? What *does* happen? What *doesn't* happen? Are there any errors given?

      PDF reading is left up to the browser (the browser needs a plugin to read it).

      Comment

      • datactrl
        New Member
        • Jul 2008
        • 51

        #4
        Thank you for reply. I did checked variable
        $rpt_content
        which does have correct content of PDF. The browser got nothing after
        PHP print($rpt_cont ent)
        and become like hang up. On phpinfo, I didn't found anything about PDF. Actually I didn't use PHP to create PDF content. I just read a pdf file from somewhere in server disk.

        Comment

        Working...