diff --git a/table-info/partition_text.go b/table-info/partition_text.go index 221b44b8..5d0f3cd4 100644 --- a/table-info/partition_text.go +++ b/table-info/partition_text.go @@ -11,20 +11,21 @@ import ( "os" "strconv" + "github.com/unidoc/unipdf/v3/common/license" "github.com/unidoc/unipdf/v3/extractor" "github.com/unidoc/unipdf/v3/model" ) -// func init() { -// // Make sure to load your metered License API key prior to using the library. -// // If you need a key, you can sign up and create a free one at https://cloud.unidoc.io -// err := license.SetMeteredKey(os.Getenv(`UNIDOC_LICENSE_API_KEY`)) -// if err != nil { -// panic(err) -// } -// } -func main() { +func init() { + // Make sure to load your metered License API key prior to using the library. + // If you need a key, you can sign up and create a free one at https://cloud.unidoc.io + err := license.SetMeteredKey(os.Getenv(`UNIDOC_LICENSE_API_KEY`)) + if err != nil { + panic(err) + } +} +func main() { if len(os.Args) < 3 { fmt.Printf("Usage: go run partition_text.go inputFile.pdf pageNum\n") os.Exit(1)