Use URI instead of URL in PDFAsImage. Use
UserAgentCallback.getBinaryResource to load the PDF (instead of opeing a
stream to the URL).