Free Support Forum - aspose.com

Adding header and footer on each page of word doc

Hi,

I am generating the word doc using Aspose from html text. Now I need to have the header and footer with some images center aligned horizontally on each page. How can I integrate the images on each page?

Please suggest for this.

Thanks in Advance!

Hello

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Actually, HTML does not support header/footer natively. To support these features MS Word adds some custom tags and CSS attributes, like:

@page Section1

{size:14.0in 8.5in;

mso-page-orientation:landscape;

margin:.2in 22.3pt .2in .35in;

mso-header-margin:.2in;

mso-footer-margin:.35in;

mso-even-header:url("Mortgages.Charges.Register_files/header.htm") eh1;

mso-header:url("Mortgages.Charges.Register_files/header.htm") h1;

mso-even-footer:url("Mortgages.Charges.Register_files/header.htm") ef1;

mso-footer:url("Mortgages.Charges.Register_files/header.htm") f1;

mso-first-header:url("Mortgages.Charges.Register_files/header.htm") fh1;

mso-first-footer:url("Mortgages.Charges.Register_files/header.htm") ff1;

mso-paper-source:0;}

We will consider an ability to support this in Aspose.Words. I will notify you as soon as the issue is resolved.

May I ask you, why do you use HTML to generate your document? I think in your case you can try using DocumentBuilder. Please see the following link to learn how to work with document using DocumentBuilder:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/documentbuilder-overview.html

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/howto-create-headersfooters-using-documentbuilder.html

Best regards,

Hello, I would like to ask if this feature is allready supported in Aspose.Words? (as you mentioned you will consider such a support)

Thank you,
Ludek

Hi Ludek,


Thanks for your inquiry. Unfortunately, this issue is not resolved yet. This issue was more complex than we initially estimated. I have verified the status of WORDSNET-179 from our issue tracking system and regret to share with you that this issue has been postponed till a later date. We will inform you as soon as your issue is resolved. We apologize for any inconvenience.

Best regards,