Luke
Luke

Reputation: 183

Android bluetooth printing allows only txt and jpeg

I have got problem, that I'm able to print only txt or jpg files using bluetooth. I need to print pdf file, but can't. I tried to convert pdf to jpeg, but printing is too slow (35 seconds A4 format). Currently I'm printing using 'Share' button, when I try to send pdf,html or any other kind of file except txt and jpg it says 'File not sent'. In my code I use

Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.setType("image/jpeg");//Tried many types
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(my_pdf_image));

Printer: DeskJet 460

EDIT: I think Marcel is correct, I must send file rendered. But how? What format it must be? I can render PDF to jpeg which dimenions are A4 page and size ~200Kb, but printer prints unusually slow. Is there special formats which I can send to printer? Or maybe there is some commands to send to printer?

Upvotes: 1

Views: 608

Answers (1)

Marcel Blanck
Marcel Blanck

Reputation: 866

Android can not support each and every properitary format. You need to render the pdf pages or what else you like to print to jpeg before sending it to a printer.

Your Pc will not send the pdf to the printer or the printer driver too. There is no magic printPdf function. Except maybe in third party libs that already do the rendering to a printable format.

Upvotes: 0

Related Questions