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AApAEwAVQBWAFcAAwBTAEQASgBLACQAUQBSAEgADwBQAE8ARQBOAFgAWgBHAFkAMQAAABoBPgABAAAAAAAAAB8AAAADAAEECQAAAD4AHwABAAAAAAABAAYAXQADAAEECQABAAwAYwABAAAAAAACAAcAbwADAAEECQACAA4AdgABAAAAAAADABIAhAADAAEECQADACQAlgABAAAAAAAEAA4AugADAAEECQAEABwAyAABAAAAAAAFABYA5AADAAEECQAFACwA+gABAAAAAAAGABUBJgABAAAAAAAHACABOwADAAEECQAHAEABWwABAAAAAAAJAAYBmwADAAEECQAJAAwBoQABAAAAAAALAAoBrQADAAEECQALABQBtwABAAAAAAAMABMBywADAAEECQAMACYB3gABAAAAAAANAC4CBAADAAEECQANAFwCMgABAAAAAAAOACoCjgADAAEECQAOAFQCuAABAAAAAAASAA4DDEZvbnQgZGF0YSBjb3B5cmlnaHQgR29vZ2xlIDIwMTMARgBvAG4AdAAgAGQAYQB0AGEAIABjAG8AcAB5AHIAaQBnAGgAdAAgAEcAbwBvAGcAbABlACAAMgAwADEAM1JvYm90bwBSAG8AYgBvAHQAb1JlZ3VsYXIAUgBlAGcAdQBsAGEAckdvb2dsZTpSb2JvdG86MjAxMwBHAG8AbwBnAGwAZQA6AFIAbwBiAG8AdABvADoAMgAwADEAM1JvYm90byBSZWd1bGFyAFIAbwBiAG8AdABvACAAUgBlAGcAdQBsAGEAclZlcnNpb24gMS4yMDAzMTA7IDIwMTMAVgBlAHIAcwBpAG8AbgAgADEALgAyADAAMAAzADEAMAA7ACAAMgAwADEAM0FBQUFBQStSb2JvdG8tUmVndWxhclJvYm90byBpcyBhIHRyYWRlbWFyayBvZiBHb29nbGUuAFIAbwBiAG8AdABvACAAaQBzACAAYQAgAHQAcgBhAGQAZQBtAGEAcgBrACAAbwBmACAARwBvAG8AZwBsAGUALkdvb2dsZQBHAG8AbwBnAGwAZUdvb2dsZS5jb20ARwBvAG8AZwBsAGUALgBjAG8AbUNocmlzdGlhbiBSb2JlcnRzb24AQwBoA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jb2RpbmcKL1RvVW5pY29kZSAxMSAwIFIKPj4KZW5kb2JqCjIgMCBvYmoKPDwKL1R5cGUgL0NhdGFsb2cKL1BhZ2VzIDEgMCBSCj4+CmVuZG9iagoxIDAgb2JqCjw8Ci9UeXBlIC9QYWdlcwovQ291bnQgMQovS2lkcyBbNSAwIFJdCj4+CmVuZG9iagp4cmVmCjAgMTIKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDA4MTQ0IDAwMDAwIG4gCjAwMDAwMDgwOTUgMDAwMDAgbiAKMDAwMDAwMDI4NiAwMDAwMCBuIAowMDAwMDAwMTY5IDAwMDAwIG4gCjAwMDAwMDAwNTkgMDAwMDAgbiAKMDAwMDAwNzgwOCAwMDAwMCBuIAowMDAwMDAwMDE1IDAwMDAwIG4gCjAwMDAwMDMxOTIgMDAwMDAgbiAKMDAwMDAwMzMwNCAwMDAwMCBuIAowMDAwMDA2OTUwIDAwMDAwIG4gCjAwMDAwMDcxNjYgMDAwMDAgbiAKdHJhaWxlcgo8PAovU2l6ZSAxMQovUm9vdCAyIDAgUgovSW5mbyA4IDAgUgo+PgpzdGFydHhyZWYKODIwMQolJUVPRgo=
如何保存此pdf,如果可能,我可以将其转换或制作成Word文档吗?
基本上我想要数据URI,所以我可以将它与FileSaver.js一起下载,但我无法弄清楚pdfmake.js file 中URI的位置。
答案 0 :(得分:0)
首先,您需要从base64创建BLOB,然后将其作为url传递给锚点。要将base64转换为Blob,请看这里:
Creating a Blob from a base64 string in JavaScript
然后从blob创建url:
blobUrl = window.URL.createObjectURL(Blob);
并添加下载链接:
<a href="'+ blobUrl +'" download="filename.pdf">
答案 1 :(得分:0)
我建议您使用https://github.com/MrRio/jsPDF创建PDF。例如:https://parall.ax/products/jspdf
对于MS Word,请尝试https://github.com/MrRio/DOCX.js。但我不认为你可以将base64转换为docx