Download multiple PDF files as a zip file

Hi There,

I have an application where a user has multiple PDF documents stored in a database. I currently pull those documents from the database and stitch them together, along with other personal data, into one PDF and display it in a browser.

My question is, would it be possible do this for multiple users at once and put the PDF documents into a zip file that would be downloaded through the browser? In other words, instead of doing one PDF at a time for each user, could I, say as an administrator, select 25 users and create a PDF for each (containing their associated pdfs from the database) and place them in a zip file that is then downloaded via the browser?

Thanks,
Tom Quinlivan

Hi Tom,

Thanks for contacting support.

As per my understanding, you want to generate multiple PDF documents against multiple users in a single call and download them in zip format through browser. However, you may generate multiple documents by calling a method something like following.

[C#]

public List<Document> generateDocuments(List userList)

{

    List<Document> DocumentList = new List<Document>();

    foreach (var user in userList)

    {

        Document doc = new Document();

        // Get other documents from Database against user

        // Concatenate/Merge documents

        // Do other stuff

        DocumentList.Add(doc);

    }

    return DocumentList;

}

This way you may generate multiple documents by single server side call. You may then create a zip file from the list of documents returned by the method and download it from your browser. In a case if you find these details different than your requirements, we will really appreciate if you please share more details about your requirements so that we can provide some useful information accordingly.

Best Regards,