Add page size configurability
This commit is contained in:
@@ -18,6 +18,7 @@ var flagFontStyle string
|
||||
var flagBorders bool = true
|
||||
var flagFilename string
|
||||
var flagCodeIsLabel bool
|
||||
var flagPageSize string
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -32,6 +33,7 @@ func main() {
|
||||
flag.StringVar(&flagFontStyle, "font-style", "", "font style, combine 'B', 'U', 'S', 'I' characters")
|
||||
flag.BoolVar(&flagBorders, "borders", false, "print borders between labels")
|
||||
flag.StringVar(&flagFilename, "output", "", "filename to write the PDF")
|
||||
flag.StringVar(&flagPageSize, "page-size", "A4", "page size (A1, A2, A3, A4, A5, A6, A7, Letter, Legal, Tabloid)")
|
||||
|
||||
flag.BoolVar(&flagCodeIsLabel, "code-is-label", false, "use the -code as the -label")
|
||||
|
||||
@@ -69,6 +71,7 @@ func main() {
|
||||
qr_labels.WithFont(flagFont, flagFontSize, flagFontStyle),
|
||||
qr_labels.WithBorders(flagBorders),
|
||||
qr_labels.WithGrid(int(flagRows), int(flagCols)),
|
||||
qr_labels.WithPageSize(flagPageSize),
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user