简体   繁体   中英

rendering pdf files javascript

I'm using the PDF.js and accurate bilbioteca render a pdf file in a Windows8 application, however, is giving invalid url.

PDFJS.getDocument("C:/Users/flemos/Desktop/Matérias/cronograma (2).pdf");

Based on "in a Windows8 application" in short problem description, you cannot "force" web browser (at least IE) to load files from the local file system.

Use your custom application code to load the file and pass it in the PDF.js as array -- PDFViewerApplication.open accepts Uint8Array. See https://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.objectforscripting(v=vs.110).aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM