help with php file conversion

Discussion in 'PHP' started by minhazikram, May 23, 2012.

  1. #1
    Actually i am stuck with an unusual problem. It goes like this, suppose i have a website and user can register over there.
    When user uploads a file with the following extensions like .doc, .docx and other document files. When they will click upload, the file will be uploaded and it will be automatically converted to .pdf extensions. On first thought, i decided that i will only allow user to upload the .pdf files, but some common complains that arrived are like "It will be much easier If files are automatically converted to pdf when uploaded.". So is there any way to convert files to .pdf extensions AUTOMATICALLY when user uploads a document file.
     
    minhazikram, May 23, 2012 IP
  2. ROOFIS

    ROOFIS Well-Known Member

    Messages:
    1,234
    Likes Received:
    30
    Best Answers:
    5
    Trophy Points:
    120
    #2

    Some resource links:
    http://forums.digitalpoint.com/showthread.php?t=843238
    http://forums.digitalpoint.com/showthread.php?t=886648
    http://www.hotscripts.com/forums/php/26663-php-code-2-convert-doc-file-into-pdf-file.html
    http://www.fpdf.org/
    http://php.net/manual/en/book.pdf.php (PDF doc's - php,net)


    Personally I haven't done something like this (only csv to html) but I'd envision that you'd need to phrase the .doc format to extract the text and input to pdf, possibly via php's built in pdf functions.

    Some suggest that you need to convert .doc(x) to html then to pdf to make the conversion possible which might be the case.





    ROOFIS
     
    ROOFIS, May 24, 2012 IP