Can any body help me on the following
I have output a file in pdf using php (fpdf). Normally as I understand the $pdf->output() function acts in the server. Its Ok, but what I want is that the out put file should be saved in a folder in the client machine when a user clicks a button (which is a server side pdf file creation code i.e. fpdf->output function)in his machine .
I can easily save it in the server using appropriate code. But I am unable to save it in the client. What happens is it simply opens in pdf open/save dialog box and of course it can be saved if save option is selected in the pdf download daialog.
But my requirement is that I want to save the pdf download directly to a folder in the client without the save/open pdf dialog opening and prompting the user. I know that pdf can customize its downloads to directly save in to a folder. But it affects all the download files the user views and doesn't want to save.
That is I want to programmatically control to save or open the pdf file in the client. using php or javascript. I know, it being a client side operation javascript may be the only solution. Can any body help me out on this.

    ttarazak wrote:

    But my requirement is that I want to save the pdf download directly to a folder in the client without the save/open pdf dialog opening and prompting the user.

    Allow sites to save arbitrary files to arbitrary locations? Even if you could safely assume that the location you wanted to save the file to even existed in the first place the idea would be .... bad. If I detected that you were running on a Windows machine, would you let me save a file "explorer.exe" to "c:\windows"?

      Thanks for your reply.
      Allow sites to save arbitrary files to arbitrary locations? Yes and No. No, because I don't want all the files to be saved Yes because I should be able to save certain pdf files (generated by a php application) in the client machine without save/ open dialog . It can be done only through a program(java script or php).Please note that the user is working in a PHP application to open/ download the file. I want to add some code in this application so that the file opened/ downloaded here to be saved automatically in some folder.
      Hope you get me...

        ttarazak wrote:

        Yes because I should be able to save certain pdf files (generated by a php application) in the client machine without save/ open dialog .

        Yes, the same way I should be able to save a file named explorer.exe into c:\windows\ without a save/open dialogue.

          Write a Reply...