Thank you very much for your reply. I’m basically trying to print a full-screen screenshot. I could do the screenshot in the webview via html2canvas but when I press the print-button in the webview nothing happens.
I guess I would somehow have to overlay a native corona print button at the right time in order for it to work?
I don’t know about printing webViews. But what you might be able to do is have a button in your app that would take the webView (as long as it’s from a website, not a local file) and run it through the SafariView plugin. It might have a print button as it’s a full page widget.
Slightly tangential to the discussion but it is possible to generate PDFs in Corona (none enterprise) using the lua port of a PDF library (no native components required!). It’s at: luaFpdf.zip - Google Code
It works very well indeed, and it can pull background images in, on which you can overlay text using grid coordinates, and so you have some proforma style capability. We’ve used v1.7 quite a bit now.
The difficulty we still have is printing (grr) - even after the advent of the activity plugin!
It seems that printer service does not respond to (‘see’) the url type item. Apple’s documentation says the print service will respond to NSURL where it refers to a local url, but there seems to be no way in Corona to ‘phrase a url’ to a generated PDF residing in the sandbox’s Documents directory - shame - so near and yet so far!
I don’t seem to be able to con it with a PDF as an image as you suggest trying
But also, and more worrying, is that a url to a web PDF does not trigger the printer service - according to the Corona and the Apple documentation this should should at least work as is an NSURL being passed through (supposedly).
I did get it to work with a real image (an icon from app as per the example), but when this printed the image was clipped and the scaling awful.
I remain puzzled at the practical usefulness of the activity plugin in respect of printing.
Would be a relief If I’d made an error somewhere as this would be a darm useful feature - but I simply copied the example code and used the item table mentioned above.