Upvise Client Library: Form Class (Java & .NET)

Properties string id string name List<FormField> fields Parsing & Serialization static Form fromJson(JSONObject obj, Query query) JSONObject toJson()
Methods byte[] downloadPdfArchive(Query query) string writeXml() static void archive(string id, Query query)


The Form class of the Upvise Client Library represent a Form record in the Forms.forms Upvise table.

Form Sample on Github

byte[] downloadPdfArchive(Query query)

Download the PDF file content for this form. Works only for submitted forms.

WARNING : this method will return the PDF content only if:
        using com.upvise.client;
        string token = Query.login("email", "password");
        Query query = new Query(token);
        Project project = new Project();
        project.id = "ID1"; // some project ID
        long lastSyncDate = 0;  // instead of 0 used the last sync date return by server to be more efficient
        Form[] forms = project.selectForms(query, lastSyncDate);
        // Iterate through all forms,  ignore DRAFT ones
        foreach (Form form in forms) {
            if (form.status != Form.DRAFT) {
                byte[] pdfcontent = form.downloadPdfArchive(query);
                if (pdfcontent != null) {
                    string filename = @"C:\temp\FORM " + form.templatename + " " + form.name + ".pdf";
                    System.IO.File.WriteAllBytes(filename, pdfcontent);\

static void archive(string id, Query query)

Archives one form and all its linked photos / files