- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
using intel xdk 2807.
Building android apk
using bootstrap framework
os windows 10
I have tried using Google Cloud Print and jquery printThis.js with no success yet.
I have design page with images on it and a page that has a dynamically generated table. Both pages show in application. How do I print the pages or is it even possible to print the pages.
Note: Both pages print from the emulator. Neither print once I build apk.
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What plugin are you using to print? Any chance you could provide a complete xdk project we could look at to try to figure out what's happening?
Thanks!
Dale
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is one of the more popular print plugins - https://github.com/katzer/cordova-plugin-printer
Its for iOS and Android and users have had good luck working with it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Used - https://github.com/katzer/cordova-plugin-printer and finally got it to working partially.
The initial problem seems to be tablets I was using.
First tablet is RCA 10 Viking Pro running android 5.0 - print does not work crashes when line --
cordova.plugins.printer.print(page, 'Document.html', function () { alert('printing finished or canceled') });
-- is called.
Second Tablet is nextbook 8 inch running android 5.0 crashes exact same line of code.
Third phablet Galaxy Note 4 running android 5.0.1 app works printing works.
Forth Galaxy S4 running android 5.0.1 app works printing works.
Trying to determine why not apk not working on tablets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interesting. Have you added the device plugin? You will need that. It might be a coincidence but your non-updated devices seem to be causing the issue.
Could you zip your project and send me via IM? I can test it on my devices.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would recommend try building with Android crosswalk instead of Android. This might solve the issue with other tablets.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Printing now working - have not checked every possibility yet.
Here is what I found so far.
The following lines were added by program:
<!-- <a style="text-decoration:none; " onclick="window.print(); ">
<span class="uib_shim "></span>
</a> -->
</div>
<!-- <a style="text-decoration:none; " onclick="window.print(); ">
</a> -->
</div>
<!-- <a style="text-decoration:none; " onclick="window.print(); ">
</a> -->
Once I commented out the links that were calling window.print() function print started working.
I had a onclick event for the entire page: <div class="upage vertical-col left hidden" id="stndpg" onclick="myprint('stndpg')">
I do not know if I did something that caused all the onclick events to be added or not.
Thanks for all the responses.
I can not explain why to Samsung worked yet other two devices did not until I commented out lines..
Tony
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page