import html2Canvas from 'html2canvas'
import JsPDF from 'jspdf'
const htmlToPdf = {
getPdf (title) {
var shareContent = document.querySelector('#pdfDom')
var width = shareContent.offsetWidth / 4
var height = shareContent.offsetHeight / 4
html2Canvas(document.querySelector('#pdfDom'), {
allowTaint: true
}).then(canvas => {
var context = canvas.getContext('2d')
context.mozImageSmoothingEnabled = false
context.webkitImageSmoothingEnabled = false
context.msImageSmoothingEnabled = false
context.imageSmoothingEnabled = false
var pageData = canvas.toDataURL('image/jpeg', 1.0)
var img = new Image()
img.src = pageData
img.onload