Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no pdf visualized #2

Open
antbucc opened this issue Oct 15, 2015 · 6 comments
Open

no pdf visualized #2

antbucc opened this issue Oct 15, 2015 · 6 comments

Comments

@antbucc
Copy link

antbucc commented Oct 15, 2015

Hi, I have downloaded it but does not work. When I click on "Generate" no pdf file is create. What should be the problem?

Thanks
Antonio

@jeffleus
Copy link
Owner

Have you stepped thru the code w/ a debugger? Do you have any more info on what happens when clicking generate?

@jandrefcosta
Copy link

I have the same problem, first thing I notice was this

I/chromium( 6324): [INFO:CONSOLE(21)] "Uncaught ReferenceError: $cordovaFile is not defined", source: file:///android_asset/www/js/app.js (21)

And after that

I/chromium( 6324): [INFO:CONSOLE(44)] "ReportCtrl: Opening PDF File (file:///storage/emulated/0/rptSample.pdf)", source: file:///android_asset/www/js/controllers.js (44)
I/chromium( 6324): [INFO:CONSOLE(19387)] "ReferenceError: hideLoading is not defined
I/chromium( 6324): at file:///android_asset/www/js/controllers.js:46:21
I/chromium( 6324): at processQueue (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:20962:27)
I/chromium( 6324): at file:///android_asset/www/lib/ionic/js/ionic.bundle.js:20978:27
I/chromium( 6324): at Scope.$eval (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:22178:28)
I/chromium( 6324): at Scope.$digest (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:21994:31)
I/chromium( 6324): at Scope.$apply (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:22282:24)
I/chromium( 6324): at file:///android_asset/www/lib/ionic/js/ionic.bundle.js:24008:36
I/chromium( 6324): at completeOutstandingRequest (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:12714:10)
I/chromium( 6324): at file:///android_asset/www/lib/ionic/js/ionic.bundle.js:13094:7", source: file:///android_asset/www/lib/ionic/js/ionic.bundle.js (19387)

@jeffleus
Copy link
Owner

jeffleus commented Jan 8, 2016

'...$cordovaFile is not defined...' is an indication that the File plugin is not available. Did you add the File plugin to allow working w/ files on the device?

cordova plugin add org.apache.cordova.file

Please take a look at the section on plugins used and make sure all of these plugins are installed and retry.

@jandrefcosta
Copy link

Hello!

I think my problem was other stuff and get fixed with this http://stackoverflow.com/questions/33970789/cordovafile-not-defined-ngcordova-plugin

Thank You!

@surajde16
Copy link

In android the pdf view is not displaying, Its just displaying blank page.
When i open the pdf from file manager path it opens.

What seems to be the problem? why its not getting displayed in app?

@jeffleus
Copy link
Owner

@surajde16 do you have a pdf viewer installed on the android device? I know that android does not have a default pdf viewer like the one built into safari on ios. So, perhaps you need a pdf viewer. The other issue could be the way in which my code opens the pdf. I don't do a great deal of android work, so it may be that the pdf viewer is there, by my code does not open the file properly to have it opened by the viewer. I know that there was a separate issue (#3) posted about android viewing. The fix in that issue was related to switching to use fileopener2 plugin for opening the PDF.

Give these a look and let me know if it helps. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants