File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 66
66
} ) ;
67
67
}
68
68
</ script >
69
+ < script >
70
+ function downloadAsPDF2 ( ) {
71
+ const element = document . body ; // Capture l'ensemble du corps de la page
72
+ html2pdf ( )
73
+ . from ( element ) // Convertit l'élément en PDF
74
+ . save ( 'page.pdf' ) ; // Télécharge le fichier PDF
75
+ }
76
+ </ script >
77
+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.9.2/html2pdf.bundle.js "> </ script >
69
78
</ head >
70
79
< body >
71
80
<!-- Utilisez le conteneur div avec l'id "example-container" pour le captcha -->
86
95
< button onclick ="downloadAsImage() "> Télécharger la page en image</ button >
87
96
< p > Cliquez sur le bouton ci-dessous pour télécharger la page en PDF.</ p >
88
97
< button onclick ="downloadAsPDF() "> Télécharger la page en PDF</ button >
98
+ < p > Cliquez sur le bouton ci-dessous pour télécharger la page en PDF.</ p >
99
+ < button onclick ="downloadAsPDF2() "> Télécharger la page en PDF</ button >
89
100
< a href ="/retriever-public/avisimpotstest.pdf " download id ="avisimpotstest "> avisimpotstest</ a >
90
101
< div id ="login_label "> Login : </ div > < input id ="login " name ="login " type ="text ">
91
102
< div id ="pass_label "> Password : </ div > < input id ="pass " name ="pass " type ="text ">
You can’t perform that action at this time.
0 commit comments