HTML to PDF

Discussion in 'Programming' started by mrbrantley, Sep 9, 2008.

  1. #1
    Hey all! I am looking for a web based componet which will take the page I am currently viewing and convert it to a PDF. I have looked at abcPDF, but am not sure it will work how I need it to. I need a PDF to be taken of the page via a bookmarklet, but as the page appears at that moment. If the page is a dynamic page populated with session variables and I feed the URL to my PDF converter, the PDF would in turn be blank, because the session was not provided. I need a PDF conversion script which will actually create the PDF of the page, as the user is viewing. Any ideas?
     
    mrbrantley, Sep 9, 2008 IP
  2. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #2
    Two steps:

    1) Retrieve the data using fsockopen/CURL using the required sessions/cookies.
    2) Send the data to the converter.

    Peace,
     
    Barti1987, Sep 9, 2008 IP
  3. it career

    it career Notable Member

    Messages:
    3,562
    Likes Received:
    155
    Best Answers:
    0
    Trophy Points:
    270
    #3
    If your webhosts supports running executable like pdf2html it should be quite easy to implement.
     
    it career, Sep 10, 2008 IP
  4. mrbrantley

    mrbrantley Member

    Messages:
    87
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #4
    Dont think I mentioned this.... the site I want to create the PDF of is a remote site where I cannot control the sessions. I have the componet installed, and creating PDF's from URL's with Query Strings is no problem. When the page is a session dependent page, I cannot provide the values and in turn, end up with a blank pdf. I have no clue what the session parameters are, so i cannot send them unfortunatly.
     
    mrbrantley, Sep 10, 2008 IP