Closed coxfrederic closed 6 years ago
It is possible. It should be loaded from applicationDirectory or applicationStorageDirectory (whichever allowingReadAccessTo param is set to). Here I've loaded the air release notes from a local fie.
Do you have Acrobat DC installed? For me it is not working if I do it like this:
`webView = new WebViewANE;
var settings:Settings = new Settings;
var thisL:Point = new Point(0,0);
var thisG:Point = localToGlobal(thisL);
var webViewViewport:Rectangle = new Rectangle(thisG.x + 10, thisG.y + 10, this.width - 45, this.height - 20);
webView.init(stage, webViewViewport, "", null, 1, 0xFFFFFF, true);
webView.loadFileURL(pathFile.nativePath, File.applicationStorageDirectory.nativePath);`
I found a workaround by upgrading to 1.6.5 and then using PDF.js viewer together with https://github.com/tuarua/WebViewANE/issues/150
So I have a solution but unclear why the code is not working directly to the PDF.
Answer the below. DO NOT DELETE!!
Yes
1.5.0
OSX
If Windows is the AIR app 32bit or 64bit**?
Which IDE are you using?
Flash Builder
20
I searched the docs and issues in Github but can't find an answer.
Is it possible to load a PDF from local disk? pathFile.nativePath points to a PDF that is being loaded but not displayed it seems.
I use
webView = new WebViewANE; var settings:Settings = new Settings; settings.webkit.plugInsEnabled = true; var thisL:Point = new Point(0,0); var thisG:Point = localToGlobal(thisL); var webViewViewport:Rectangle = new Rectangle(thisG.x + 10, thisG.y + 10, this.width - 45, this.height - 20); webView.init(stage, webViewViewport, "", null, 1, 0xFFFFFF, true); webView.loadFileURL(pathFile.nativePath, File.applicationStorageDirectory.nativePath);
Is this not supported or am I using it wrong?
A PDF to be displayed, I'm not seeing the PDF
Please provide any additional information below.
Does this problem also occur in the
WebViewANE
Sample Application provided?Not relevant