JS List
asked on
convert .aspx to .doc maintain header footer positions
convert .aspx to .doc maintain header footer positions
ASKER
I have a web page, .aspx, that looks like a report. The page has a header and footer. The page has report data, pulled from a database, which fills part of the page. The report data does not fill the entire page. When I do a print preview, using the printer drivers, the footer & header are in the correct area.
To make the report produce a word file, .doc, I use this:
<%Response.AddHeader("Cont ent-Dispos ition", "Attachment;Filename=" & thisFile & "_Training.doc")
Response.ContentType = "application/vnd.ms-word"% >
When I produce the word doc the header is at the top but the footer jumps up to where the last paragraph is at. The footer doesn't display at the bottom.
I've used CSS - encompass the whole document in a <div> then have 3 sub <div>s - Header Body Footer. But doesn't work.
Any ideas?
To make the report produce a word file, .doc, I use this:
<%Response.AddHeader("Cont
Response.ContentType = "application/vnd.ms-word"%
When I produce the word doc the header is at the top but the footer jumps up to where the last paragraph is at. The footer doesn't display at the bottom.
I've used CSS - encompass the whole document in a <div> then have 3 sub <div>s - Header Body Footer. But doesn't work.
Any ideas?
Look at the page setup for margins, use print to pdf
If you want it in word format, simply designating content type would not do it. Look at whether you can use the conversion before outputing the results.
If you want it in word format, simply designating content type would not do it. Look at whether you can use the conversion before outputing the results.
as what I thought, you should create a Word Document Template directly and use it to fill in the details
A direct conversion from aspx to doc won't give you much flexibility and nice layout.
A direct conversion from aspx to doc won't give you much flexibility and nice layout.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Not sure I get what you want, print to PDF will preserve the results ...