In Short...
I have an ASP.NET script that generates a PDF based on parameters passed to it. Firstly, I need to be able to call this script from PHP, and secondly, I need to ensure that the file is not stored once it is sent to the browser.
Calling the Script
So my first question is, how can I execute a .NET
application that requires DLL's
from PHP? I read something about PHP's Component Object Model
, but I am a little unsure as to what this is and how it works (I have read here). Alternatively, would it be better to compile this script into an .exe
and call it through that?
Furthermore, is it possible to pass parameters to an .exe
when calling it via PHP?
Sending the file without Storing it
Once the file has been generated (either via .NET
or via an .exe
), I would like to send it to the browser without storing it on the server. I have looked at the following threads:
The above threads may contain the correct answer, but I wasn't sure whether it was possible to send a PDF using any of these methods...
To Conclude
I would like to write a script that achieves the following:
- Calls a script (either a
.NET
application or an.exe
), with parameters! - Outputs the resulting contents (a PDF) to the browser without storing it on the server
I am not asking anybody to write this script for me, I simply would like some pointers to allow me to write this myself :-)
There is no point in storing these PDF's on the server as they will rarely be the same