从pdf文件中检索数据库中的数据

时间:2022-09-25 21:15:33

My application use Firebase, how can retrieve the data from database as pdf file? Users should be able to download that pdf file on their device.

我的应用程序使用Firebase,如何从数据库中检索数据为pdf文件?用户应该能够在他们的设备上下载该pdf文件。

Note: this code not related to my question

注意:此代码与我的问题无关

 public void addinfo() {
    HashMap<String, String> datamap = new HashMap<>();
    datamap.put("", ed1.getText().toString().trim());
    datamap.put("", ed2.getText().toString().trim());
    datamap.put("", ed3.getText().toString().trim());
    datamap.put("", ed4.getText().toString().trim());
    datamap.put("", ed5.getText().toString().trim());
    datamap.put("", ed6.getText().toString().trim());
    datamap.put("", ed7.getText().toString().trim());
    datamap.put("", ed8.getText().toString().trim());

    databasestudent.push().setValue(datamap).addOnCompleteListener(new OnCompleteListener<Void>() {
        @Override
        public void onComplete(@NonNull Task<Void> task) {
            if (task.isSuccessful()) {
                Toast.makeText(Form4Activity.this, "done Successfully!!", Toast.LENGTH_LONG).show();
            } else {
                Toast.makeText(Form4Activity.this, "erorr!!", Toast.LENGTH_LONG).show();
            }
        }
    });
}

}

}

1 个解决方案

#1


0  

You could create a cloud function that reads your database and creates a pdf from the data. The pdf could then be saved to storage and the storage url is then sent back to the client.

您可以创建一个云函数来读取数据库并根据数据创建pdf。然后可以将pdf保存到存储器,然后将存储URL发送回客户端。

#1


0  

You could create a cloud function that reads your database and creates a pdf from the data. The pdf could then be saved to storage and the storage url is then sent back to the client.

您可以创建一个云函数来读取数据库并根据数据创建pdf。然后可以将pdf保存到存储器,然后将存储URL发送回客户端。