Link to home
Start Free TrialLog in
Avatar of JS List
JS ListFlag for United States of America

asked on

convert .aspx to .doc maintain header footer positions

convert .aspx to .doc maintain header footer positions
Avatar of arnold
arnold
Flag of United States of America image

Please explain what you are trying to do, aspx is a web based

Not sure I get what you want, print to PDF will preserve the results ...
Avatar of JS List

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("Content-Disposition", "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?
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.
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.
ASKER CERTIFIED SOLUTION
Avatar of JS List
JS List
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial