I am looking for my options to have a button on my page to print directly a word document or pdf.
The <LINK rel=alternate media=print href="thedocument.doc"> type tag does not work, it only prints a blank page unless it's a direct text file/htm file that can be interpreted directly by the browser.
I'd even be willing to put some sort of invisible frame in the document that opens the word document and then having the button call some javascript to print that frame if that would work?
I currently have all the files set up so that i can call them by the form that is pulled -- if i am on form L9, then I want to be able to call something like
"#rtrim(selection.selectio
n)#.doc" as the filename
(selection is a query that will only return 1 result, the second selection is the form [L9])
I can put them in either doc or pdf, but html formatting for printing doesnt work for the forms i am using (I have a date of print running on the footer of each page of the form) and it just doesnt look the same/harder to format and i have numerous forms to do this way.
If i can get one answer that is a direct print of either the doc or pdf (even if there are prompts to open the file/save the file/print), i will award all the points to that solution, if there are a few good ideas that dont directly print, i will split the points.
Results are key, if it can be done in coldfusion or javascript, or anything else that can be interpreted on the coldfusion/iis platform, and it works, then i am all ears.
Thanks to all who respond. I will close out the question if i get a direct answer before a week has passed, after a week, i will close out the question and split points between all other viable options.
Start Free Trial