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

Adding Columns to Footer #37

Open
lokacoding opened this issue Jan 31, 2024 · 0 comments
Open

Adding Columns to Footer #37

lokacoding opened this issue Jan 31, 2024 · 0 comments

Comments

@lokacoding
Copy link

lokacoding commented Jan 31, 2024

Can you enhance the footer?
Instead of only the text to a maybe 3-4 line height text with styling and font sizes?
Often you need to put legal information on an invoice like tax-numbers and stuff like this.
Also the text then should adjustable in the row or table with an option to align it left, center, right.

That would be awesome!

Example:

https://www.whmcs-deutschland.eu/wcf/index.php?attachment/204-rechnung-762-page-001-jpg/

maybe like this:

footer?: {
 *       text?: string,
 *   },
 *   footer1?: {
 *       text?: string,
 *       align?: string,
 *       style?: { width?: number },
 *       margin?: {
 *        bottom?: number,
 *        left?: number
 *      }
 *   },
 *   footer2?: {
 *       text?: string,
 *       align?: string,
 *       style?: { width?: number },
 *       margin?: {
 *        bottom?: number,
 *        left?: number
 *      }
 *   },
 *   footer3?: {
 *       text?: string,
 *       align?: string,
 *       style?: { width?: number },
 *       margin?: {
 *        bottom?: number,
 *        left?: number
 *      }
 *   },
 //...
 
  if (param.pageEnable) {
        // current state:
        //doc.text(docWidth / 2, docHeight - 10, param.footer.text, "left");
        //added here also with the margin.
        doc.text(docWidth / 2, docHeight - 10, param.footer1.text, param.footer1.align);
        doc.text(docWidth / 2, docHeight - 10, param.footer2.text, param.footer2.align);
        doc.text(docWidth / 2, docHeight - 10, param.footer3.text, param.footer3.align);
        doc.setPage(i);
        doc.text(
          param.pageLabel + " " + i + " / " + doc.getNumberOfPages(),
          docWidth - 20,
          doc.internal.pageSize.height - 6
        );
      }
```
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

1 participant