function calculatePdfSize() {
    var tableList = document.getElementsByTagName('table');
    var title = document.title;
    if (tableList.length > 0) {
        var table = tableList[0];
        return {width: table.clientWidth, height: table.clientHeight, title};
    }
    return {width: 0, height: 0, title};
}

   //为ipad横屏添加样式
   function changeHorizontalScreen(){
      if(window.orientation===180||window.orientation===0){//竖屏
          document.getElementsByTagName('body')[0].classList.remove('horizontalScreen');
      }
      if(window.orientation===90||window.orientation===-90){//横屏
          document.getElementsByTagName('body')[0].classList.add('horizontalScreen');
      }
  }
  window.addEventListener("onorientationchange" in window ? "orientationchange" : "resize", changeHorizontalScreen, false);