mirror of
https://github.com/unidoc/unipdf.git
synced 2025-05-01 22:17:29 +08:00
Merge branch 'v3' into v3-json-form-fill
This commit is contained in:
commit
4adddde141
@ -698,6 +698,7 @@ func (i *Invoice) generateHeaderBlocks(ctx DrawContext) ([]*Block, DrawContext,
|
||||
cell := table.NewCell()
|
||||
cell.SetHorizontalAlignment(CellHorizontalAlignmentLeft)
|
||||
cell.SetVerticalAlignment(CellVerticalAlignmentMiddle)
|
||||
cell.SetIndent(0)
|
||||
cell.SetContent(i.logo)
|
||||
|
||||
i.logo.ScaleToHeight(titleParagraph.Height() + 20)
|
||||
@ -738,6 +739,7 @@ func (i *Invoice) generateInformationBlocks(ctx DrawContext) ([]*Block, DrawCont
|
||||
table.SetMargins(0, 0, 25, 0)
|
||||
|
||||
cell := table.NewCell()
|
||||
cell.SetIndent(0)
|
||||
cell.SetContent(addrDivision)
|
||||
|
||||
cell = table.NewCell()
|
||||
|
@ -51,7 +51,7 @@ func TestInvoiceSimple(t *testing.T) {
|
||||
})
|
||||
|
||||
// Add invoice line items.
|
||||
for i := 0; i < 10; i++ {
|
||||
for i := 0; i < 75; i++ {
|
||||
invoice.AddLine(
|
||||
fmt.Sprintf("Test product #%d", i+1),
|
||||
"1",
|
||||
@ -204,11 +204,11 @@ func TestInvoiceAdvanced(t *testing.T) {
|
||||
invoice.AddSection("Custom section", "This is a custom section.")
|
||||
|
||||
// Customize note styles.
|
||||
noteStyle := invoice.AddressStyle()
|
||||
noteStyle := invoice.NoteStyle()
|
||||
noteStyle.Font = fontHelvetica
|
||||
noteStyle.FontSize = 12
|
||||
|
||||
noteHeadingStyle := invoice.AddressHeadingStyle()
|
||||
noteHeadingStyle := invoice.NoteHeadingStyle()
|
||||
noteHeadingStyle.Color = blue
|
||||
noteHeadingStyle.Font = fontHelvetica
|
||||
noteHeadingStyle.FontSize = 14
|
||||
|
@ -331,7 +331,9 @@ func (table *Table) GeneratePageBlocks(ctx DrawContext) ([]*Block, DrawContext,
|
||||
block = NewBlock(ctx.PageWidth, ctx.PageHeight)
|
||||
ulX = ctx.Margins.left
|
||||
ulY = ctx.Margins.top
|
||||
|
||||
ctx.Height = ctx.PageHeight - ctx.Margins.top - ctx.Margins.bottom
|
||||
origHeight = ctx.Height
|
||||
|
||||
startrow = cell.row - 1
|
||||
yrel = 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user