Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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:

  1. Creating A Temporary File in Php
  2. Create temporary file and auto removed

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:

  1. Calls a script (either a .NET application or an .exe), with parameters!
  2. 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

share

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.