From f674524aea2f61fe5e89b7e13e504deae25194ea Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Tue, 25 Mar 2025 18:37:21 +0100 Subject: [PATCH] fix: :bug: disable config loading to allow pdfcpu usage in web --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index 82c5327..568923d 100644 --- a/main.go +++ b/main.go @@ -13,6 +13,7 @@ import ( "syscall/js" pdfcpu "github.com/pdfcpu/pdfcpu/pkg/api" + "github.com/pdfcpu/pdfcpu/pkg/pdfcpu/model" ) type Customer struct { @@ -129,6 +130,10 @@ func createArchive(this js.Value, args []js.Value) any { return promiseConstructor.New(handler) } +func init() { + model.ConfigPath = "disable" +} + func main() { c := make(chan struct{}, 0) js.Global().Set("createArchive", js.FuncOf(createArchive))