I want to know if this is possible to print all attached pdf from an object.
(i'm afraid not, but better asking ;D)
User uploads multiple pdf file in his account, then later, he clicks on "print all the pdf attachements", instead of downloading and then one by one clicking on "print"
There are several ways you can go about this with either just JS or a combination of PHP and js (and perhaps server-side programs that can be called by PHP):
Have the target document be a php file which programatically join all the PDFs into a single document (for instance, with pdftk) and then outputs the joined file with PDF headers. This file would be loaded into an iframe which you could call
window.print() function to target several hidden iframes each of which has one of the PDFs loaded in it. The major drawback of this approach is that it will generate multiple print dialogue boxes.
Both of these approaches rely on the user having the necessary settings and plugins to actually load PDFs within the browser window, but if they don't they'll be prompted to download the large file/multiple files.
This can not be done with PHP. Why? Well, PHP is a server-side script. It has no possibilities to access the user's printer.
Best way is probably to concatenate all the pdf into a single document server side then allow the user to download and print that. This is what manuscriptcentral and probably other online academic peer review systems do.