Anyone have experience putting pdf documents in an...
# cfml-general
g
Anyone have experience putting pdf documents in an xlsx file? I can produce the pdf which is some data output in tables singularly fine using cfdocument. But when I stick them in an xlsx by doing <cfheader name="Content-Disposition" value="attachment;filename=#download_file_name#.xls"> they lose their formatting. I get this:
The individual pdf looks like this:
g
Feels like a PDF in an xlsx file is asking a bit much. Wait for other answers, but I'd probably try to generate an image instead of a PDF.
d
Are you really inserting a pdf into an xlsx file (and if so, how?), or are you just opening a pdf in Excel. Based on your description, it looks like you're doing the latter, in which case I'm surprised it looks as good as it does. You might be better off skipping the cfdocument and sending the unconverted html instead. Or, if you could use CF's spreadsheet functions to recreate your document as a proper xlsx file, that would be even better.
p
Wow, that seems like a combination tailor made to be an attack vector! I'd definitely try to keep everything in just one format, if for no other reason to make it easier to work with.