-
Notifications
You must be signed in to change notification settings - Fork 26
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
Issue with text after a table when on same page #21
Comments
Could you provide a complete script with datas so I can test that? Using this works well for me: let doc = new PdfDocument()
doc.fontSize('32').text("Report", 0, 0.4 * (doc.page.height - doc.heightOfString("Report", { width: doc.page.width, align: 'center' })), { width: doc.page.width, align: 'center' })
doc.fontSize('16').fillColor('black').text("Top 10 Downlink Congestion")
doc.fontSize('10')
let table = getTable(doc) // return same table as in README.md
table.addBody(getData()) // return same data as in README.md
doc.fontSize('16').fillColor('black').text("Top 10 Downlink Congestion")
doc.pipe(res);
doc.end(); |
When I add some text under the table it will show the hole text in the last column... how can I fix that? |
Did you try |
yes I tried this but still the same problem? |
Could you provide a link to your PDF with current state and desired state, so I can check what's happening? |
no sorry I cant provide you a link like this. but maybe the code |
Since I don't see this problem with README code, it's hard to figure out what is your problem without any screenshot or PDF. You can post your code and maybe it will help understand. |
@sullrich85 have you tried doc.moveDown() or doc.moveDown() |
yes i tried it already... doesnt work... look 5 comments before |
i made a new table under the existing and put inside only one row and column its not the best way but it works |
@sullrich85 post your code here, one of us will help you to find the issue |
|
@sullrich85, I had the same issue with the example from the README. Looks like an issue with the doc.x not being reset. After the table .addBody, I added doc.x = 0 // Or whatever your margins are to fix |
solve the issue turns out you have to reset the x by using doc.x = (0, or what ever value that you want) |
Trying to figure out whats going on but if i do the following i get a huge out of memory crash every time.
as soon as that last line hits, memory shoots to nearly 4g and the app crashes, here's the odd thing... if I throw a "doc.addPage()" above the text line at the end it doesn't crash.
The text was updated successfully, but these errors were encountered: