问题
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