forked from angelodlfrtr/go-invoice-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.go
71 lines (53 loc) · 1.74 KB
/
constants.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package generator
const (
// Invoice define the "invoice" document type
Invoice string = "INVOICE"
// Quotation define the "quotation" document type
Quotation string = "QUOTATION"
// DeliveryNote define the "delievry note" document type
DeliveryNote string = "DELIVERY_NOTE"
// BaseMargin define base margin used in documents
BaseMargin float64 = 30
// BaseMarginTop define base margin top used in documents
BaseMarginTop float64 = 40
// HeaderMarginTop define base header margin top used in documents
HeaderMarginTop float64 = 5
// MaxPageHeight define the maximum height for a single page
MaxPageHeight float64 = 900
)
// Cols offsets
const (
// ItemColUnitPriceOffset ...
ItemColUnitPriceOffset float64 = PageWidth * 0.4
// ItemColQuantityOffset ...
ItemColQuantityOffset float64 = PageWidth * 0.5
// ItemColTotalHTOffset ...
ItemColTotalHTOffset float64 = PageWidth * 0.55
// ItemColDiscountOffset ...
ItemColDiscountOffset float64 = PageWidth * 0.69
// ItemColTaxOffset ...
ItemColTaxOffset float64 = PageWidth * 0.75
// ItemColTotalTTCOffset ...
ItemColTotalTTCOffset float64 = PageWidth * 0.85
)
var (
// BaseTextFontSize define the base font size for text in document
BaseTextFontSize float64 = 8
// SmallTextFontSize define the small font size for text in document
SmallTextFontSize float64 = 7
// ExtraSmallTextFontSize define the extra small font size for text in document
ExtraSmallTextFontSize float64 = 6
// LargeTextFontSize define the large font size for text in document
LargeTextFontSize float64 = 10
)
const (
ColumnWidth = 250
PageWidth = 592
itemFontSize = 8
itemTitleMargin = 6
itemsPaddingTop = 40
metasFontSize = 8
contactMargin = 3
totalMargin = 5
imageHeight = 80
)