Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to align page number to the bottom right? #65

Closed
cooleraid opened this issue Apr 15, 2021 · 2 comments
Closed

How to align page number to the bottom right? #65

cooleraid opened this issue Apr 15, 2021 · 2 comments

Comments

@cooleraid
Copy link

Can you please point out how to handle changing the page number from the bottom left to the bottom right? @privateOmega

@privateOmega
Copy link
Owner

@cooleraid its quite easy, just give a footerString containing a <p></p> tag with text-align: right;

Short snippet on this lifted from example files and modified

const fileBuffer = await HTMLtoDOCX(
    htmlString,
    null,
    {
      table: { row: { cantSplit: true } },
      footer: true,
      pageNumber: true,
    },
    `<p style="text-align: right;"></p>`
  );

Closing this issue. Feel free to reopen if you need any more clarity on this.

@KariNabor
Copy link

KariNabor commented Aug 23, 2023

Hello! I found your comment.
I am trying to bind the page number with more content in the footer, but the page number is pasted with the rest of the content of the footer.
Can you help me please?
@privateOmega

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants