0
I have a system that marks the text, creating a span with the notes, I’m using a lib to export PDF, but when it loads the DOM to export to PDF, it’s keeping this blue check mark, very strange. Have some way to lock that "Selection" event in the text while having the pdf exported?
Here the HTML that is sent to generate the PDF.
This is the Lib.
This is the code that takes this HTML:
var content = "aqui entra como string o conteúdo do link acima";
var worker = html2pdf();
worker.set(opt)
.from(content)
.toPdf()
.get('pdf')
//
.then(function (doc) {
var totalPages = doc.internal.getNumberOfPages();
for (var i=1; i<=totalPages; i++) {
if (i == 1) {
doc.setPage(1);
//cria a legenda
doc.setFontType("bold");
doc.text(330, 40, 'Matéria: ');
doc.setFontType("normal");
doc.text(380, 40, 'No onno nono nononono');
doc.setFontType("bold");
doc.text(330, 60, 'Atividade: ');
doc.setFontType("normal");
doc.text(390, 60, 'Nonnono onno nonono');
doc.setFontSize(12);
doc.setFontType("normal");
doc.setPage(i);
} else {
doc.setPage(i);
}
}
})
.save();
See the problem that is occurring:
Because at the time of export you do not force a . Focus() into an element that is off the screen for example? Or change the color of ::Lection to transparent to test
– hugocsl
So I’ve already tried
.blur()
in the elements ,.focusout()
,.focus()
Return false; and nothing...– Ivan Ferrer
I don’t understand why this happens? It doesn’t make much sense, besides, it was to be with color in the text, and it didn’t take...
– Ivan Ferrer