Support more features needed for PDF.js on the sever side plus tests.