Questions tagged [android-print-framework]

Android Printing Framework introduced in Android KitKat 4.4 enables printing documents and images directly from applications.

Android Printing Framework introduced in Android KitKat 4.4 enables printing documents and images directly from applications.

See the Printing Content guide for more information.

89 questions
38
votes
1 answer

How to Print PDF using Android 4.4 Printing framework

How to print already downloaded PDF using Android 4.4 printing framework? I viewed the developer documentation. but no luck. Any example would be helpful
Dinesh T A
  • 2,087
  • 4
  • 26
  • 34
23
votes
5 answers

Print Pdf file via Bluetooth Printer Android

In My project Need to print Pdf file Via Bluetooth Printer. I write a code to print via pdf Its for fine for a Text, But I want to Print PDF file on Bluetooth printer. My java Code to Print Text @Override public void onCreate(Bundle…
9
votes
2 answers

How to change the default "Portrait Orientation" to Landscape in Android Print Framework?

Is there a way to change default portrait preview to landscape in print framework? I have tried below - PrintAttributes attrib = new…
kevz
  • 2,727
  • 14
  • 39
9
votes
2 answers

How to remove non-existing printers from print service on android?

I'm developing a print service on android. The list of available printers changes quite often. However, I have not been able to find a way of removing the non-existing printers (i.e. printers that were available at some point). These printers…
bdristan
  • 1,048
  • 1
  • 12
  • 36
9
votes
3 answers

Android Print PDF Programmatically

I have to develop printing functionality in Android 4.4 I want to develop following functionality: - Use Android 4.4 Print Framwork - Print pdf from SD Card(No Need to Re-Generate) - Configuration like : number of copies, page selection I know it…
Hardik
  • 550
  • 1
  • 5
  • 9
8
votes
2 answers

Generate and print a PDF with specific size in Android

I'm working in an Android application, and I want to generate and print a PDF. But I'm having some trouble. I need to generate the PDF with 80mm of width, and the height may vary. I'm trying this: public class PDFGenerator implements Runnable { …
7
votes
1 answer

Android: inflating a layout and writting it to PDF produces a blank PDF

when the user selects a share button within an activity, I would like to inflate a layout, populate it, and then write that layout to a pdf using the new printing API. In my fragment I have @TargetApi(Build.VERSION_CODES.KITKAT) public boolean…
James
  • 5,273
  • 10
  • 51
  • 76
7
votes
1 answer

Android 4.4 Printing - "java.lang.IllegalStateException: printing is already pending"

I am working on printing a webview on android. I'm running into a problem where I get an Illegal State Exception. This only occurs when I call "print" two (or more) times very quick. The crash is not in my callstack either so using a try-catch won't…
Randy
  • 4,351
  • 2
  • 25
  • 46
7
votes
0 answers

Hide Android KitKat 4.4 printing dialog

I am working on a kiosk app which needs to print. I have the printing functionality working but the problem is it shows a dialog and as a kiosk app we need to keep things simple and limit what users can do. Is there a way to print without showing…
Randy
  • 4,351
  • 2
  • 25
  • 46
5
votes
0 answers

Android print job ignores PrintAttributes

I'm trying to implement the print api, which more or less works. I can send a file to the Google Cloud Print app and print it, using the printing framework introduced in api level 19. But it would be nice if i wouldn't allways have to send the…
CAA
  • 968
  • 10
  • 27
5
votes
3 answers

What is the best strategy for creating, displaying and printing pdf documents in android

I plan to use the built-in android pdf library. In my app I need to display a pdf report that may consist of several pages. Users should be able to print those pages. Printing with the PrintDocumentAdapter seems pretty straight forward, but what's…
bmurmistro
  • 1,070
  • 1
  • 16
  • 35
5
votes
2 answers

Printing PDF directly using PrintManager Android 4.4

http://developer.android.com/training/printing/index.html documentation tells how to print a custom content by rendering it on a PDF canvas and sending thus created PDF document for printing. But has no information about if we already have a PDF…
4
votes
3 answers

Printing without print service preview

I want to press button in my app and send pdf document to printer for printing directly (without showing system android preview from printing-framework Android 4.4). How can I do it? I tried to connect to printer via Socket. It was Ok, without…
punchman
  • 1,350
  • 1
  • 13
  • 23
4
votes
1 answer

Android HTML code printing before KitKat (before api 18)

I'm looking for an easy way of making this printing HTML code fragment compatible backwards with older Android versions: @TargetApi(Build.VERSION_CODES.KITKAT) private void createWebPrintJob(WebView webView) { // Get a PrintManager instance …
Hugo
  • 1,662
  • 18
  • 35
4
votes
0 answers

How to register iOS application as virtual printer like android printService

I have developed an android application which implements a printer service like provided by Google in this link : PrintService Documentation this helps me to register my android application as a printer , so when the user is interested in printing…
1
2 3 4 5 6