Skip to content

Commit

Permalink
Verbeterde line-split bij afprinten naar PDF.
Browse files Browse the repository at this point in the history
  • Loading branch information
igoethal committed Nov 1, 2024
1 parent da0e401 commit f02aa77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 2 additions & 1 deletion jsPDF/print.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ function printPDF(svg, print_table, properties, pages=[1], filename="eendraadsch

let printlines = [];

lines = html.split(/<br>|<\/div><div>/);
html = html.replace(/<div>/g, ''); //remove all instances of <div>
lines = html.split(/<br>|<\/div>/);
lines = lines.map(htmlToUnicode);
for (let line of lines) {
let wrappedlines = doc.splitTextToSize(line, paperdetails.owner_box_width - 2 * 2 - 3);
Expand Down
4 changes: 0 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,6 @@ import_to_structure(EXAMPLE_DEFAULT,false); //Just in case the user doesn't sele

document.querySelector('#left_col_inner').addEventListener('change', function(event) {

console.log("go go go");

function propUpdate(my_id: number, item: string, type: string, value: string | boolean): void {
switch (type) {
case "select-one":
Expand Down Expand Up @@ -440,8 +438,6 @@ document.querySelector('#left_col_inner').addEventListener('change', function(ev
const idNumber = match ? match[1] : null;
const key = match ? match[2] : null;

console.log({ type, value, id: idNumber, key });

propUpdate(parseInt(idNumber),key,type,value);


Expand Down

0 comments on commit f02aa77

Please sign in to comment.