Hello,
I have generated some reports in PDF format, that is stored on my server (c:\reports)
How I can use the p:fileDownload in order to make the PDF available for download to the users?
I checked out the showcase :
<p:fileDownload value="org.primefaces.model.DefaultStreamedContent@44ffa0" />
public FileDownloadController() {
InputStream stream = this.getClass().getResourceAsStream("primefaces.pdf");
file = new DefaultStreamedContent(stream, "application/pdf", "downloaded_primefaces.pdf");
}
Where i have to set the location of my pdf on server?