0

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

5
  • Do you have a question? Commented Nov 18, 2015 at 18:58
  • 1
    That certainly doesn't look like a valid URL. Commented Nov 18, 2015 at 18:59
  • which would be a valid url Commented Nov 18, 2015 at 19:26
  • @Felipej.lemos "http:// mi-servidor-web.com/Matérias/cronograma(2).pdf" Commented Nov 18, 2015 at 19:41
  • can not be that way , do not use url server, step the path of the machine directory Commented Nov 19, 2015 at 11:08

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.