Get the App
SLTechnology News&Howtos  ›  Development  › 

How to modify visual html files to support PDF export

Shulou Source: shulou.com Published: 2022-06-01 04:49:14 10月01日 Update

This article mainly introduces "how to modify visual html files to support PDF export". In daily operation, I believe many people have doubts about how to modify visual html files to support PDF export. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful for you to answer the doubts of "how to modify visual html files to support PDF export". Next, please follow the editor to study!

Open the html file using a text editor such as NotePad++, and there are 4 changes to be made in the file.

1. Add two lines of code to line 11 of the original file. As shown in the following figure, copy and paste the two lines of code from the right file between the tenth and eleventh lines of the left file.

The code is as follows:

two。 Delete lines 124-131 from the original file. Note that the line number will change after the first modification, so don't delete it wrong.

3. Add a piece of code at line 204 of the original file, and copy and paste lines 199-203 of the right file into the right file. Pay attention to the change of line number and don't stick it in the wrong position.

The code is as follows:

Var saveAsSvg = function (filename) {var svgContent = cy.svg ({scale: 1, full: true, bg:'# ffffff'}); var blob = new Blob ([svgContent], {type: "image/svg+xml;charset=utf-8"}); saveAs (blob, "ppi.svg");}

4. Delete lines 225-227 of the original file and replace them with lines 224-225 of the file on the right. Pay attention to the change of line number and don't stick it in the wrong position.

The code is as follows:

Tags: File code visualization support right study line number line location more change help utility next between content place folder text article Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information macOS MySQL NVidia Microsoft