feat: use new pdf lib

This commit is contained in:
2026-02-06 21:09:58 +01:00
parent 785f3f9393
commit b659359a79
12 changed files with 106 additions and 109 deletions
+15 -2
View File
@@ -4,8 +4,9 @@ import (
"log"
"os"
"github.com/urfave/cli/v2"
"pdf/lib"
"github.com/urfave/cli/v2"
)
func main() {
@@ -57,16 +58,28 @@ func main() {
Usage: "Debug flag",
Aliases: []string{"d"},
},
&cli.StringFlag{
Name: "description",
Usage: "Description for the embedded xml file",
Required: false,
},
&cli.StringFlag{
Name: "embedded-name",
Usage: "Name of the xml file inside the pdf",
Required: false,
},
},
Action: func(context *cli.Context) error {
inputPdfFilePath := context.Args().Get(0)
inputXmlFilePath := context.String("xml-input")
outputFilePath := context.String("out")
description := context.String("description")
embedName := context.String("embedded-name")
debug := context.Bool("debug")
lib.EnableDebug(debug)
lib.AppendToPdf(inputPdfFilePath, inputXmlFilePath, outputFilePath)
lib.AppendToPdf(inputPdfFilePath, inputXmlFilePath, outputFilePath, embedName, description)
return nil
},