SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist
    Join Date
    May 2003
    Posts
    595
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Convert PDF to HTMl ?

    I need to convert some PDF documenst to HTML. I've tried the online tool at the Adobe site, the formatting in the html was terrible.

    There seems so much available in PHP to create a PDF file, so is it possible to use PHP to read a PDF file and create HTML ?

  2. #2
    SitePoint Addict
    Join Date
    Apr 2001
    Location
    Devon, UK
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're going to have a hard time doing this. PDF is based on Postscript, which precisely controls how items are drawn on paper. HTML/CSS only "suggests" layout.

    So, converting HTML to PDF is a relatively straightforward exercise. But converting it back again won't be easy: the PDF could contain positioned text and graphics, watermarks, text that doesn't follow the flow of the document, etc.

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2003
    Location
    san diego
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have seen projects around the web that can take a pdf and convert it into an image file.

    You might have a hard time doing this, but i would search on google and see what you come up with.
    SEORat.com - A new way to track Web 2.0

  4. #4
    SitePoint Evangelist
    Join Date
    May 2003
    Posts
    595
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the replies. I have thought about using pdf2html , but I wouldn't have a clue how to set it up on a website.

    Could this be done ...

    1. PDF --> Postcript
    2. Postscript --> HTML

    Also, any possibilities with using curl to open the PDF file, etc ?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •