change the dompdf download folder

Asked

Viewed 618 times

-2

Could someone help me?

I can already use the variable as the name of the download file, but I can’t change the download folder, always low in the download folder.

  • is very confused. explains better, put some part of the code and point out where is your doubt, please.

  • In this part: $dompdf->stream($name.'.pdf', array("Attachment" =>true)); I cannot define the directory to be downloaded. I’ll use it to generate the report on my own machine.

1 answer

0

The question contains very little about your problem the ideal is you give more details, but let’s try to help, are you trying to set the folder to the client-side? If yes, you have no way to tell the client where it will force the download by stream, will always save where the user says to save, it is only possible to set the location on your server. If I’m on your server you can tell him so:

  $dompdf->stream("pasta/doc/documento_para_download.pdf", array("Attachment" =>true)); 
  • No, I’m using this to generate the internal report for my company, I want to generate the report in pdf for a certain folder. This quote after the pdf is closing where? .

  • Then it is the user who should set the download location. I’m sorry the error, the quotes after the . pdf open before the word folder, inside the parentheses.

  • So, but it is for our company that esotu doing, we will print the report, and I want whenever you click to generate reports it downloads inside the folder with the files of the site, understand? I’ve tried it this way, and it goes to download too! Thanks.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.