Felipe j.lemos
Felipe j.lemos

Reputation: 51

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");

Upvotes: 0

Views: 131

Answers (1)

async5
async5

Reputation: 2691

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

Upvotes: 1

Related Questions