Oregon Health and Science University is having me create a application for a health fare that will be available to all age groups.
I'm using AlivePDF to create a PDF file, then save it to the desktop. I can then use an HTMLLoader to display my lovely PDF file.
Now, the print button in Adobe Reader works fine. However, there will be young children using the app, so I'd like to have a big "Print" button right above it.
I figured I could just start up a print job and feed it my HTMLLoader. Am I doing something wrong here, cause I can't seem to get any output?
note: variable "stuff" below is my HTMLLoader. I also have access to the PDF file if that comes in handy.
private function print():void
var myPrintJob:PrintJob=new PrintJob();
if (result && stuff != null)
var rect:Rectangle=new Rectangle(0, 0, 2550, 3300);
var opt:PrintJobOptions=new PrintJobOptions(true);
myPrintJob.addPage(stuff, rect, opt);
//User does not have printer or user canceled print action
See http://www.adobe.com/devnet/air/flex/quickstart/scripting_pdf.html for information on calling JS functions in a pdf file from AIR.
Strange, but I don't know how to mark this as answered without replying.
Thanks! Everything worked great.