PDF Generated Using Zoho CRM API Contains Empty Pages
Hello, I’m trying to convert an inventory template into a PDF for a specific record using the Zoho CRM API with ZohoEmbededAppSDK and Javascript . However, when I run the following code, I end up with a 6-page PDF that is completely empty. Could you please help me with this?
- ZOHO.CRM.CONNECTION.invoke("zohocrm", {
- url: "https://www.zohoapis.eu/crm/v5/settings/inventory_templates/" + inventory_template.id + "/actions/print_preview?record_id=" + quote_id + "&print_type=pdf",
- responseType: "blob",
- }).then((pdf_file) => {
- // convert data to pdf
- let downloadLink = inventory_template.name + ".pdf";
- var binaryData = [];
- binaryData.push(pdf_file);
- var url = URL.createObjectURL(new Blob(binaryData, {type: "application/pdf;charset=UTF-8"}));
- console.log(url);
- });
The purpose of this code is to convert the inventory template into a PDF for a specific quote. However, the resulting PDF file is entirely blank. Do you have any ideas on this? Thanks!