Skip to main content
Participant
February 24, 2009
Question

CFFILE --> PDF?

  • February 24, 2009
  • 1 reply
  • 432 views
I have a cfform where a user can upload a file (via cffile) that is limited to certain types (.jpg, .doc, etc)... What I'd like to know is: after the file is uploaded to my server can it be converted to a .pdf ? After the conversion, the original file can be deleted.

Is that possible? Sounds horribly complicated, but figured I would throw it out to the group here for ideas..

Thanks in advance!!
    This topic has been closed for replies.

    1 reply

    Participating Frequently
    February 24, 2009
    It is absolutely possible, but it probably depends on the format! After you upload and save the file, you use the CFDOCUMENT tag to create the PDF. If you are converting an image, for example, you would simply use the IMG tag to insert the image into the PDF. Text documents could be handled similarly, you would just read the text and output it within the CFDOCUMENT tags.

    Word docs would be a bit trickier. I'm not sure if you can convert them in the background and/or read the contents to a format CF would like, which you would then insert into the document.