Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (print)
Viewing all articles
Browse latest Browse all 20

Can't AirPrint a view converted to an image?

$
0
0

I am trying to print a view I have converted to an image with the toImage method. I have successfully used this method to get an email-able image.

So, following some advice found here, I tried doing the same and saving the image and printing it:

function printList() {
img = vML.toImage();
var file = Titanium.Filesystem.createTempFile(Titanium.Filesystem.resourcesDirectory);
file.write(img);
AirPrint.print({
    url : file.nativePath,
    showsPageRange : true,
    view : printButton
});
}

It goes through the motions of printing (shows popover etc) but then I get this:

[INFO] Printing out file://localhost/var/folders/d6/tpcb4ld91bscf62zcnxvg46m0000gn/T/F915
2012-07-12 12:19:37.127 RoofingCalc[52839:17603] ?\032172\.30\.176\.4\032@\032BLASTOISE._ipp._tcp.local.: Print-Job request failed: Unsupported document-format "image/png".

Unsupported document format? So how does someone print content from their app in Titanium?


sdk 2.01GA2, ios 5.1


Viewing all articles
Browse latest Browse all 20

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>