why css file is not defined, cordova-plugin-pdf?

拜拜、爱过 提交于 2019-12-11 19:11:09

问题


I find myself inserting using a css file, but I don't know in which folder of my project I should create this file, css_file.css, I currently create the file in the directory:

dyslexia/www/css_file.css

but when compiling cordova build android it automatically deletes the file, where should I add it?

my code:

var opts = {
            documentSize: "A4",
            landscape: "portrait",
            type: "share",
            fileName: 'my-pdf.pdf'
        }
        console.log(device.platform);
        var payload = _.template(' <head><link rel="stylesheet" href="<%=css_file%>"></head><body> <h1 class="titulo"> Hello World </h1></body>') 
        console.log(payload);
        cordova.plugins.pdf.fromData(payload({css_file: css_file}),
          opts)
        .then(progressHide)
        .catch(progressHide);

thank you

来源:https://stackoverflow.com/questions/57665118/why-css-file-is-not-defined-cordova-plugin-pdf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!