Versions in this module Expand all Collapse all v1 v1.0.0 Jun 23, 2022 Changes in this version + const BaseMargin + const BaseMarginTop + const DeliveryNote + const HeaderMarginTop + const Invoice + const ItemColDiscountOffset + const ItemColNameOffset + const ItemColQuantityOffset + const ItemColTaxOffset + const ItemColTotalHTOffset + const ItemColTotalTTCOffset + const ItemColUnitPriceOffset + const MaxPageHeight + const Quotation + var BaseTextFontSize float64 = 8 + var ExtraSmallTextFontSize float64 = 6 + var LargeTextFontSize float64 = 10 + var SmallTextFontSize float64 = 7 + type Address struct + Address string + Address2 string + City string + Country string + PostalCode string + func (a *Address) ToString() string + type Contact struct + Address *Address + Logo *[]byte + Name string + type Document struct + ClientRef string + Company *Contact + Customer *Contact + Date string + Description string + Footer *HeaderFooter + Header *HeaderFooter + Items []*Item + Notes string + Options *Options + PaymentTerm string + Ref string + Type string + ValidityDate string + Version string + func New(docType string, options *Options) (*Document, error) + func (d *Document) AppendItem(item *Item) *Document + func (d *Document) SetCompany(company *Contact) *Document + func (d *Document) SetCustomer(customer *Contact) *Document + func (d *Document) SetDate(date string) *Document + func (d *Document) SetDescription(desc string) *Document + func (d *Document) SetFooter(footer *HeaderFooter) *Document + func (d *Document) SetHeader(header *HeaderFooter) *Document + func (d *Document) SetNotes(notes string) *Document + func (d *Document) SetPaymentTerm(term string) *Document + func (d *Document) SetRef(ref string) *Document + func (d *Document) SetType(docType string) *Document + func (d *Document) SetVersion(version string) *Document + func (d *Document) Validate() error + func (doc *Document) Build() (*fpdf.Fpdf, error) + func (doc *Document) Pdf() *fpdf.Fpdf + func (doc *Document) SetUnicodeTranslator(fn UnicodeTranslateFunc) + type HeaderFooter struct + FontSize float64 + Pagination bool + Text string + UseCustomFunc bool + func (hf *HeaderFooter) ApplyFunc(pdf *fpdf.Fpdf, fn fnc) + type Item struct + Amount string + Description string + Name string + type Options struct + AutoPrint bool + BaseTextColor []int + BoldFont string + CurrencyDecimal string + CurrencyPrecision int + CurrencySymbol string + CurrencyThousand string + DarkBgColor []int + Font string + GreyBgColor []int + GreyTextColor []int + TextDateTitle string + TextItemsNameTitle string + TextItemsQuantityTitle string + TextItemsTotalTTCTitle string + TextItemsUnitCostTitle string + TextRefTitle string + TextTotalTotal string + TextTypeDeliveryNote string + TextTypeInvoice string + TextTypeQuotation string + UnicodeTranslateFunc UnicodeTranslateFunc + type UnicodeTranslateFunc func(string) string