Align Header/Footer Text in Word Document using Aspose.Words Cloud SDK for Node.js

Hi Team,

How can we align header / footer text. We are creating headers / footers using below mentioned calls.

image.png (142.2 KB)
image.png (152.2 KB)

Regards,
Nipun Jain

@nipunjain1964

We just completed the implementation of this feature and we will live it by next week. We will share a complete example with you as we make this feature live.

Hi Team,

We are going live with Aspose integration in the coming week. Can you let us know the exact date when this feature would be available on live.

Regards,
Nipun Jain

@nipunjain1964

We have made this feature live.

Please use POST /words/{name}/{nodePath}/paragraphs/{index}/format API to align text in a header/footer. This API also lets you update lot other Paragraph formatting properties. Following is an example:

name = SampleDocument_Result.docx
dto = { “Alignment”: “Center” }
nodePath = sections/0/headersfooters/0
index = 0
destFileName = SampleDocument_Result_1.docx

Input Document: SampleDocument_Result.docx.zip (53.1 KB)
Output Document: SampleDocument_Result_1.docx.zip (98.0 KB)

Alignment object could have one of the following values:

  1. Left (Text is aligned to the left.)
  2. Center (Text is centred horizontally.)
  3. Right (Text is aligned to the right.)
  4. Justify (Text is aligned to both left and right.)
  5. Distributed (Text is evenly distributed.)
  6. ArabicMediumKashida (Arabic only. Kashida length for text is extended to a medium length determined by the consumer.)
  7. ArabicHighKashida (Arabic only. Kashida length for text is extended to its widest possible length.)
  8. ArabicLowKashida (Arabic only. Kashida length for text is extended to a slightly longer length.)
  9. ThaiDistributed (Thai only. Text is justified with an optimization for Thai.)

We hope this helps!

Hi team,

Can you please include this change in your node package asposewordscloud - npm as well.

Regards,
Nipun Jain

@nipunjain1964

Aspose.Words Node.js package has been upgraded. The latest version is 18.9.0 and it includes newly added “Paragraph Format” APIs.