Load a PDF and Print it Without User Seeing the PDF

I have a client who has a need to allow users via a web browser to print PDFs wihtout gaining direct access to them.  Ignoring all the flaws in this logic , I am new to Flex and am having difficulty determining if this is possible.  So, here are the details:
1) This is a web browser application.
2) The files reside on a server.
3) The user will view a list of available PDF files in their browser.
4) There will be a print icon next to each one.
5) When they click on the print icon we need to pull in the PDF from the server and initiate a print, all without the user seeing the PDF.  So once they click the print icon the next thing they see is thier browser's print dialog box.
I have 1-4 done, I just need help with the most important one, #5.
So, can Flex (without AIR) load a PDF in without displaying it and print it?
I am using Flash Builder 4.6, if it matters.
Thanks in advance for any input.

Well, that's going to be difficult. Before everything else, a silent printing in general, is not what Browser is all about. A print dialog is thrown by the browser when a user selects a print option. Same thing if an application is trying to print using built into it conventional methods of printing - you get Print dialog. It gets even harder if you want to print PDF files silently. You will need to make sure that a file is available to print in case it's generated on the fly. The following code will print your PDF without dialogs to a selected (var printer) printer:
var WshShell = new ActiveXObject("WScript.Shell");
var fs = new ActiveXObject("Scripting.FileSystemObject");
var fi = "AcroRd32.exe /N /T " + '"c:\\temp\\' + "filename" + '" ' + printer;
WshShell.Run(fi, 0, false);
As you notice, the file is on the local system. Or you can try printing over the network.
This code will be a part of a JS function in your html wrapper. You will call this function from Flex using ExternalInterface.
AcroRd32.exe is an Adobe free PDF reader.  I would suggest starting from the end - have a file on the local system and working on everything esle.
HTH

Similar Messages

Maybe you are looking for

  • New Hard Drive still have Question Mark Folder

    So I first got the 'Question Mark Folder' and had to keep running Safe Boot Mode to use computer. Finally got around to replacing the Hard Drive, but this Question Mark Folder still comes up trying to turn the computer on and now trying to setup the

  • Problem with Protected Excel sheets through OLE

    Hi Friends We are facing the problem with the protected sheets in excel, when we are accessing worksheets via SAP. We can insert the values in the protected sheet and we can do other manupalations, but when we are trying to do the autofit for the pro

  • Steps for the IDOC TO FILE with ACKNOWLEDGMENT

    Hello experts,    Kindly give me the step by step procedure for the following scenario. My scenario is an IDOC( any idoc) for R/3 is coming to XI and send to FTP as XML file with out any modifications, and ftp have to send an response (acknowledgment

  • Dunning for head office/branch account

    Hi All, Our client is maintaining the customers with relationship of head office and branch account. Ex: Customer 1 has been created as Head office account  and the same customer maintained as branch office account. Head office customers are maintain

  • Very heavy illustrator file

    hello, I have a problem because I developed a very simple file and the same is weighing nearly 200mb. Has no image, type transformed  into object and the drawing size is 30x60mm sources  very small. I have had these problems with other files.