Click here to Skip to main content
15,908,834 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I made a web form from a paper document that a user can input data to be saved into a database. What I wanted to do is when the user has submitted the data they will need to print it out also to sign. I have the paper document in a file in a word document format on my computer. Is there a way to have the word file to be added to a form and when the user clicks print it will print the file with the data the user entered into the database? I wanted a professional print out report not a screen print.
Posted

You can show the Word File in Browser.

Check - Display Word document on web page in ASP.Net[^].
 
Share this answer
 
Comments
Computer Wiz99 8-Jan-14 5:53am    
Can the user also fill out the word document on the web form? I am trying to get it to look almost like the tax program. Where you can fill out a form on the web page that looks like the the paper form and it prints out the same. Not a screen print.
Computer Wiz99 8-Jan-14 9:43am    
Tadit Dash, Thanks for the info. Any links on how to get the data from a database to the word doc to be printed? What I am looking for is to have the user to enter the data into the textboxes and click print and it will print out a word document page with the data the user just entered will be on it. Is there a link or way of doing that?
In that case, create a word file after user enters the data, store that in some temporary location on server and show that on the web page.
Why to read from database again? No need, it will also make your application slow.
Computer Wiz99 8-Jan-14 9:57am    
Ok. Is there a way to create a professional print out of the web form without the buttons and a signature page?
You can use Google Docs Viewer to preview a doc file on the page and allow the user to print it. Of course, you have to pass absolute URL of your doc file to Google Doc Viewer in order to get it working. You can use a simple markup like this:
HTML
<iframe style="width:100%; height:500px;" frameborder="0" src="ABOSULTE_URL_TO_DOC_FILE_HERE"></iframe>

That is the free way to get what you want. If you cannot disclose your doc file publicly then you can try this another approach but it's not "free"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900