diff --git a/jspdf.plugin.cell.js b/jspdf.plugin.cell.js index b56a19b8a..05bde6d15 100644 --- a/jspdf.plugin.cell.js +++ b/jspdf.plugin.cell.js @@ -64,10 +64,20 @@ text = document.createElement('font'); text.id = "jsPDFCell"; - text.style.fontStyle = fontStyle; + + try { + text.style.fontStyle = fontStyle; + } catch(e) { + text.style.fontWeight = fontStyle; + } + text.style.fontName = fontName; text.style.fontSize = fontSize + 'pt'; - text.textContent = txt; + try { + text.textContent = txt; + } catch(e) { + text.innerText = txt; + } document.body.appendChild(text);