added pdf.js support