Skip to content

Commit 4e6bcb4

Browse files
committed
problem of lost lines solved
1 parent 45b5f8e commit 4e6bcb4

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

jspdf.plugin.from_html.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -862,9 +862,16 @@
862862
var localFragments = [];
863863
var localStyles = [];
864864
//create fragement array of
865-
lines.forEach(function(line) {
866-
localFragments.push(line[0][0]+" ");
867-
localStyles.push(line[0][1]);
865+
lines.forEach(function(localLine) {
866+
var i = 0;
867+
var l = localLine.length;
868+
while (i !== l) {
869+
if (localLine[i][0]) {
870+
localFragments.push(localLine[i][0]+' ');
871+
localStyles.push(localLine[i][1]);
872+
}
873+
++i;
874+
}
868875
});
869876
//split lines again due to possible coordinate changes
870877
lines = this.splitFragmentsIntoLines(PurgeWhiteSpace(localFragments), localStyles);

0 commit comments

Comments
 (0)