Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

vue save page elements to pdf

printFacture() {
    var pdf = new jsPDF();
    var element = document.getElementById('facture');
    var width= element.style.width;
    var height = element.style.height;
    html2canvas(element).then(canvas => {
        var image = canvas.toDataURL('image/png');
        pdf.addImage(image, 'JPEG', 15, 40, width, height);
        pdf.save('facture' + moment(this.facture.date_debut).format('LL') + '_' + moment(this.facture.date_fin).format('LL') + '.pdf';
    });
}
Comment

PREVIOUS NEXT
Code Example
Typescript :: ts class 
Typescript :: mongo count elements in array 
Typescript :: how to target all child elements css 
Typescript :: push at first index typescript 
Typescript :: make an interface iterator typescript 
Typescript :: typescript infinite loop 
Typescript :: typescript array of objects interface 
Typescript :: type usestate typescript 
Typescript :: loc with multiple conditions 
Typescript :: ionic 3 search bar get value 
Typescript :: reddit requests 429 
Typescript :: array with objects read element with the lowest value 
Typescript :: gitlab where are artifacts stored 
Typescript :: react scripts version for react 17.0.2 
Typescript :: separate subplots in python 
Typescript :: import google fonts to flutter 
Typescript :: axios typescript 
Typescript :: typescript random 
Typescript :: class example in typescript 
Typescript :: defining component layout next ts 
Typescript :: typescript get full path of file 
Typescript :: accessing list elements in dictionary python 
Typescript :: typescript generic object 
Typescript :: define typescript types 
Typescript :: nuxt 3 postcss 
Typescript :: comments visual studio code html 
Typescript :: typescript open site in frame 
Typescript :: nest js null exclude 
Typescript :: check type of object typescript 
Typescript :: where to create assets folder in flutter 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =