natancabral / pdfkit-table

Helps to draw informations in simple tables using pdfkit. #server-side. Generate pdf tables with javascript (PDFKIT plugin)
MIT License
91 stars 55 forks source link

Table does not add new page automatically anymore #49

Open jetoneza opened 2 years ago

jetoneza commented 2 years ago

I have noticed that the table doesn't create a new page if the content is long. I found an option called addPage but setting this to true throws an error.

ReferenceError: Cannot access 'onFirePageAdded' before initialization
ELIONET commented 2 years ago

I'm facing the same issue. After a small investigation, this line seems to be the source of the problem. Removing lockAddPage = true; resolved the issue for me.

@natancabral Could you please verify this is the correct fix, and publish it ?

nicodesd commented 2 years ago

I'm facing the same issue, Thanks @ELIONET!, it solved the problem.

sshakyaUR commented 1 year ago

I am seeing the same issue. I have a for-loop that renders tables. The cursor just gets reset to the top of the same page. I have tried removing lockAddPage = true but see no changes. I am running "pdfkit-table": "^0.1.99" on node v14.17.0.

issogood commented 7 months ago

i'm still having this problem pdfkit-table@0.1.99 that the table continues at the top of the page instead of adding a new page. solved it by setting lockAddPage = false; on line 486.

weebao commented 2 months ago

i'm still having this problem pdfkit-table@0.1.99 that the table continues at the top of the page instead of adding a new page. solved it by setting lockAddPage = false; on line 486.

@issogood I tried this and it's still showing the Cannot access 'onFirePageAdded' before initialization error. Did you change anything else? Thanks

weebao commented 2 months ago

i'm still having this problem pdfkit-table@0.1.99 that the table continues at the top of the page instead of adding a new page. solved it by setting lockAddPage = false; on line 486.

@issogood I tried this and it's still showing the Cannot access 'onFirePageAdded' before initialization error. Did you change anything else? Thanks

Ah nevermind I just remove the addPage option and it worked :D

jordanwegener commented 1 month ago

i'm still having this problem pdfkit-table@0.1.99 that the table continues at the top of the page instead of adding a new page. solved it by setting lockAddPage = false; on line 486.

@issogood I tried this and it's still showing the Cannot access 'onFirePageAdded' before initialization error. Did you change anything else? Thanks

Just adding that I have the same issue, can't use the addPage option because of Cannot access 'onFirePageAdded' before initialization