Free Support Forum -

How to add image into Header/Footer of a Microsoft Word Document using Aspose.Words Cloud REST API


I am trying to understand if the cloud API can help me implement the following process:

A document (word) is received.
we use the cloud API to strip off, all headers and footers, including images that are part of the headers/footers.
We than add my company’s header (an image).

Almost like ‘stamping’ the documents with my company’s logo at the top (header). if any previous ‘stamp’ was there (header or footer) - I remove it first.

Is it possible? has anyone done that before? any help will be appreciated.


Thanks for your inquiry. You can remove headers footers using Aspose.Words for Cloud. Please refer to the following article:

Remove all Headers and Footers using Aspose.Words for Cloud

Secondly, I am afraid, you cannot insert anything in header/footer right now. We have logged this requirement in our issue tracking system as WORDSCLOUD-63. Our product team will further look into the details of this problem and we will keep you updated on the status of this issue. We apologize for your inconvenience.

Best regards,

Thank you for the quick reply.

Maybe the image-watermark API would be a workaround?

Can I use the image-watermark API, to add my company’s logo at the
top section of the document?

So, the complete process woudld be:

1. All headers from the document using REST
2. Insert watermark image (my company’s logo) using REST.

Can this work?

Is there any limitation to the watermark image size?



Thanks for your inquiry. You will only be able to display image at the center of the page using the insertImage (Controller Resource). You won’t be able to align it at the top of the page. We will inform you via this thread as soon as the linked issue is resolved. We apologize for any inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSCLOUD-63) have been fixed in this Aspose.Words for Cloud update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.


You can achieve your requirement using following API Methods of Aspose.Words Cloud API.

  1. Delete Header/Footer of a Word Document
  2. Insert Header to Word Document
  3. Insert drawing object to header using InsertDrawingObject API Method passing by header nodepath. The sample parameter values could be as follows:

name = SampleDocument_Result.docx
drawingObject = { “Left”: 0 }
imageFile = environment.png
destFileName = SampleDocument_Drawing.docx
nodePath = sections/0/headersfooters/0/paragraphs/0