unidoc / unipdf

Golang PDF library for creating and processing PDF files (pure go)
https://unidoc.io
Other
2.54k stars 250 forks source link

[BUG] Invoice table has rendering problems when there are many items in AddLine/AddTotalLine #339

Closed lilith-writes-code closed 4 years ago

lilith-writes-code commented 4 years ago

Description

There are two somewhat separate items I noticed while trying out different inputs. I tested this against the latest from the development branch, (my go.mod shows: github.com/unidoc/unipdf/v3 v3.6.3-0.20200505001727-9ef2f2769408)

Expected Behavior

When there are long tables it would be great if the content didn't get lost or did not overlap.

Actual Behavior

Steps to reproduce the behavior:

  1. Using pdf_invoice_advanced.go you can see this by changing the for loop adding lines to 5 or 15 depending on the issue. In addition, you would want to add a for loop to add a number of total lines using invoice.AddTotalLine(..., I did a for loop of 15 and that seemed to be enough.

Attachments

Include a self-contained reproducible code snippet and PDF file that demonstrates the issue.

example.zip

lilith-writes-code commented 4 years ago

Also tried with v3.7.0 rather than the dev branch hash. Seems to still render improperly.

gunnsth commented 4 years ago

@venison Addressed by #342 . Can you try again with development branch?

lilith-writes-code commented 4 years ago

I tried both cases and they seem to be working for me locally now. Well done!