Comments (4)
Hi @leandro-chile,
Did you see the description for this in #1 ? I think that might help you :)
from pdfjs.
Hi @leandro-chile,
Did you see the description for this in #1 ? I think that might help you :)
Yes I did, but my problem is that I don't want to read a file from the assets directory, since I'm downloading it into the FileSystem.AppDataDirectory inside of a folder I created there. I tried passing the oath to the file directly into the browser with file:/// and content:// but none of that worked. looking at your code and some of the issues this is what I got:
localPath = FileSystem.AppDataDirectory + "/examenes/215/EXAMEN_MUTUAL000910.pdf";
if (Device.RuntimePlatform == Device.Android)
PdfView.Source = $"file:///android_asset/pdfjs/web/viewer.html?file={"file:///" + WebUtility.UrlEncode(localPath)}";
else
PdfView.Source = localPath;
I don't get the "Failed to fetch" error anymore but I just get the black screen with the markers of a pdfviewer like the zoom in and out buttons, the page nav, etc. The alarming thing is that i even get that screen even with a path that leads to nowhere.
Do you good sir, have any idea on how to solve this or help me in any way, I would greatly appreciate it.
Greetings.
from pdfjs.
I saw the same issue.
Fortunately I found the error from Application output.
"Uncaught ReferenceError: require is not defined", source: file:///android_asset/pdfjs/web/viewer.js
Unfortunately : I didn't find the solution.
from pdfjs.
Hi Gerald,
I am trying to open local file, but its unable to find. I tried putting pdf into assets library as well as Environment.GetFolderPath(Environment.SpecialFolder.Personal) which is resolving to /data/user/0/com.companyname.amcdemo/files/sample.pdf
I also made sure file in asset library is androidasset. this is the error I am getting -
with asset folder -
with internal storage -
from pdfjs.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdfjs.