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

Positioning/aligning table to the right side of a page #1318

Closed
hdhaheri opened this issue Mar 16, 2018 · 5 comments
Closed

Positioning/aligning table to the right side of a page #1318

hdhaheri opened this issue Mar 16, 2018 · 5 comments

Comments

@hdhaheri
Copy link

I need to align a table to the right side of a page, is this possible with pdfmake?

@liborm85
Copy link
Collaborator

Table alignment is problematic because there is #72, but can be used workaround:

var dd = {
  content: [
        {
            columns: [
                { width: '*', text: '' },
                {
                    width: 'auto',
                        table: {
                                body: [
                                        ['Column 1', 'Column 2', 'Column 3'],
                                        ['One value goes here', 'Another one here', 'OK?']
                                ]
                        }
                }
            ]
        }
  ]
}

@hdhaheri
Copy link
Author

Greate. Thank you for the workaround

@eteisman
Copy link

Thank you, this worked for me.

@IvanCornejo
Copy link

Thank you, works!

@rusicsemenov
Copy link

rusicsemenov commented Nov 26, 2019

Also you can use

     [  
        co1,
        {
          text: "right value",
          alignment: "right"
        },
        {
          text: "right value",
          alignment: "right"
        },
        {
          text: "right value",
          alignment: "right"
        }
      ]

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

5 participants