Problems using pdf-lib in scriptable

hello, I am trying to use pdf-lib (pure javascript non-dependency pdf manipulation library) with scriptable, but I am getting random errors when trying to load a pdf… even the example pdf on the website fails to load inside scriptable… i’m wondering if it has to do with scriptable memory allocation for libraries? ie, perhaps the import of the rather-large pdf-lib.js, followed by loading a somewhat-large pdf, causes random out-of-mem errors leading to failure points randomly in the library? any help is appreciated, thank you in advance!

1 Like

Well, not sure memory is an issue - the same error occurs regardless of using the “minified” or regular version of the pdf-lib; for reference, i’m using pdf-lib v1.4.0

If you get that working it could be rather attractive.

Is there a debugger for scriptable? I need to trace the code execution to determine where / how the error code is generated… my suspicion is a nonstandard implementation by scriptable of instanceof or .constructor