It is already usable as long as I pass the pdf file in a base64 string or as a remote http url, BUT as soon as I try to pass a local url, it spins forever.
I have tested Scriptable in many ways, it does work in loading local relatives contents but still, it does not work for my little library. If anyone wants to help, I have a gist scriptable-pdfjs-demo to play with. The “library” is at scriptable-pdfjs.
The only glitch I found, but I don’t think it’s related, is that the request.url shown in the WebView.shouldAllowRequest is displaying an extra slash:
Look for the double slash after Scriptable.
And I also ping @simonbs as he was kind enough to answer my topic: does the response for local request implements a kind of ReadableStream ? (I saw in the docs that pdfjs seems to use this).
Thank you for reading!