Closed CristianCucunuba closed 5 years ago
Si me puedieras ayudar @bjrmatos Estaria muy agradecido o si estoy usando la libreria de la forma incorrecta.Gracias.
hola, probablemente los links no cargan por que la pagina del reporte es http y los links usan https, creo que puedes probar cargando los links con http
en lugar de https
. o la otra solución es que carges localmente esos recursos dentro de entidades assets y los carges como tal.
PD: en el futuro es mejor abrir issues en ingles, ya que ese es el lenguaje oficial del soporte, y el lenguaje que todos los colaboradores usan para comunicarse.
Hi thank you for answering , changing the link to HTTP still does not work, I also have another problem, How do i make asynchronous JavaScript in the PDF. We already try the waitForJS property like this and does not work:
APP JS
const jsreport = require('jsreport-core')({
"extensions": {
"phantom-pdf": {
waitForJS: true,
"numberOfWorkers": 1,
"timeout": 180000,
"allowLocalFilesAccess": true,
},
},
})
pdf.html
setTimeout(function(){
window.JSREPORT_READY_TO_START = true;
$(".texto").html('purple')
}, 3000);
Hi thank you for answering , changing the link to HTTP still does not work, I also have another problem
i see, you should try the assets entities then.
I also have another problem, How do i make asynchronous JavaScript in the PDF. We already try the waitForJS property like this and does not work
you should specify the waitForJS
in the render options of template property, like this:
jsreport.render({
template: {
content: templateInformeCF,
engine: 'ejs',
recipe: 'phantom-pdf',
phantom: {
waitForJS: true
}
},
data: {
foo: "world"
}
})
Wow this one DO works thank you so much, this library is all i need and more awesome work.
Hola, estoy intentando cargar imagenes y archivos CSS, JS al template pero solo logro cargar estos archivos cuando los tengo localmente. El proyecto esta en node este es mi codigo:
app.js
informe-cf.js