Closed Grehgous closed 3 years ago
Welcome! Thanks for posting your first issue. The way things work here is that while customer issues are prioritized, other issues go into our backlog where they are assessed and fitted into the roadmap when suitable. If you need to get this done, consider buying a license which also enables you to use it in your commercial products. More information can be found on https://unidoc.io/
Hi @Grehgous
You can use creator.StyledParagraph
to achieve this, instead of creator.Paragraph
.
package main
import (
"log"
"strings"
"github.com/unidoc/unipdf/v3/creator"
)
func main() {
c := creator.New()
c.SetPageMargins(50, 50, 100, 70)
p := c.NewStyledParagraph()
p.Append(strings.Repeat("foo ", 3000))
if err := c.Draw(p); err != nil {
log.Fatal(err)
}
if err := c.WriteToFile("out.pdf"); err != nil {
log.Fatal(err)
}
}
@Grehgous Have you tried the suggested solution? Would be good to update the ticket so it can be closed or further investigation done.
Description
What a paragraph is larger than fits on a single page, a blank page is added, however the text is not distributed between the two pages. It ends up with one empty page, one page that is overflowed, and the remaining text missing.
Expected Behavior
I expect the text to be distributed to new pages whenever a page is overflowed, and not to have any empty pages added
Attachments
output.pdf