Changes

Jump to: navigation, search

An Android HTML and Web Content Printing Example

93 bytes added, 19:29, 29 January 2014
no edit summary
<br><br><google>BUY_ANDROID</google><br><br>
As outlined in the previous chapter, entitled Printing with the Android Printing Framework, the Android Printing framework can be used to print both web pages and dynamically created HTML content. Whilst there is much similarity in these two approaches to printing, there are also some subtle differences that need to be taken into consideration. This chapter will work through the creation of two example applications in order to bring some clarity to these two printing options.
Save both layout and manifest files before proceeding.
<google>BUY_ANDROID</google>
== Loading the Web Page into the WebView ==
The Android Printing framework includes extensions to the WebView class that make it possible to print HTML based content from within an Android application. This content can be in the form of HTML created dynamically within the application at runtime, or a pre-existing web page loaded into a WebView instance. In the case of dynamically created HTML, it is important to use a WebViewClient instance to ensure that printing does not start until the HTML has been fully loaded into the WebView.
<br><google>BUY_ANDROID</google><br>

Navigation menu