Skip to content

URL input not being processed as URL

When passing a URL, it should be processed as such, and not a file. My document requires a local server, and when I try run pagedjs-cli -o /tmp/out.pdf http://localhost:8000, the process hangs. After passing -d to debug, I found that pagedjs-cli was trying to insert the contents into an about:blank window, when it really should just be printing directly from the url I gave it.

The issue seems to be that the input variable is not being converted to a URL instance in the paged command. Simply changing the line to input = URL(input) seems to fix the issue completely.