页面打印pdf格式文件
'<td><button type="button" class="btn btn-primary" data-loading-text="Loading..." onclick="printReports(\'' + task_ids + '\')">打印</button></td>'
function printReports(task_ids) {
$.ajax({
url:"webVisual/printReport/admin/" + task_ids,
async:false,
dataTyoe:"json",
success:function(json){
var printEntity = json.data;
var poiIdsss = printEntity.poiIds;
var oPop = window.open('','oPop');
var str = '<!DOCTYPE html>';
str +='<html>';
str +='<head>';
str +='<meta charset="utf-8">';
str += '<title>爬取错误poi打印</title>';
str +='</head>';
str +='<body>';
str += '<table border="1px" cellspacing="0" width="100%" align="center">';
str += '<tr>'+
'<th colspan="3">爬取错误poi打印</th>'
'</tr>';
str += '<tr>'+
'<th>任务名</th>' +
'<th>来源</th>' +
'<th>总数</th>' +
'</tr>';
str += '<tr>'+
'<td align="center">' + printEntity.taskName + '</td>' +
'<td align="center">' + printEntity.source + '</td>' +
'<td align="center">' + printEntity.geoNums.length + '</td>' +
'</tr>';
$(printEntity.geoNums).each(function(index_num, errorGeoNum) {
str += '<tr>'+
'<th align="center">网格编码: ' + errorGeoNum.geo_num + '</th>' +
'<th align="center">创建时间: ' + errorGeoNum.create_time + '</th>' +
'<td align="center">总计: ' + errorGeoNum.poi_ids.length + '</td>' +
'</tr>';
$(errorGeoNum.poi_ids).each(function(num_index, errorPoi) {
str += '<tr>'+
'<td align="center">(' + (num_index+) + ')</td>' +
'<td align="center" colspan="2">' + errorPoi + '</td>' +
'</tr>';
})
})
str +='</table>';
str += '</body>' +
'</html>';
oPop.document.write(str);
oPop.print();
oPop.close();
}
});
}
页面打印pdf格式文件的更多相关文章
- JSP页面导出PDF格式文件
JSP页面导出PDF格式文件基本在前端页面可以全部完成 <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/ ...
- 页面打开pdf格式文件的方法
<embed width=500 height=300 fullscreen=yes src="1.pdf" />
- 导出文本、表格、图像到PDF格式文件中(学习整理)
1.测试例子: 需要导入的外部jar包: 相关API http://www.coderanch.com/how-to/javadoc/itext-2.1.7/com/lowagie/text/pack ...
- winform利用itextsharp.dll实现图片文件转换PDF格式文件
1.利用itextsharp.dll实现单个图片文件转换为PDF格式文件, 可以使用以下类: void ConvertJPG2PDF(string jpgfile, string pdf) { var ...
- confluence导出PDF格式文件不显示中文解决
由于confluence导出PDF格式文件需要应用字体文件,下载字体文件在confluence管理员界面安装即可. 我这里使用从simhei.ttf楷体,可以从windowns主机里下载(c:/win ...
- [R] venn.diagram保存pdf格式文件?
vennDiagram包中的主函数绘图时,好像不直接支持PDF格式文件: dat = list(a = group_out[[1]][,1],b = group_out[[2]][,1]) names ...
- Magento订单打印(pdf格式)
Magento自身包含有:打印发票单,打印装箱单,打印退款单.这些都是基于西方国家的习惯来布置的.公司有个需求就是打印订单的四联单,PDF格式的,要一周内完成.刚接到这个任务时,觉得头大,因为对于PH ...
- 前端实现docx、pdf格式文件在线预览
theme: vuepress highlight: atelier-heath-light 介绍 在业务中,如果遇到文档管理类的功能,会出现需要在线预览的业务需求,本文主要是通过第三方库来实现文档预 ...
- Arch Linux PDF格式文件无法显示中文
From: http://blog.sina.com.cn/s/blog_5e54bc6801012gfg.html $ sudo pacman -S poppler-data
随机推荐
- android-基础编程-democoderjoy-架构篇
设计这个demo很简单,针对每个控件放到一个listitem中去,主activity继承之listActivity,这样再override其单击效果进入到每个控件. 主界面流程 1.继承 MainAc ...
- day21(Listener监听器)
监听器只要分为监听web对象创建与销毁,监听属性变化,感知监听器. 1.监听web对象的创建与销毁 servletContextListener 监听ServletContext对象的创建和销毁 ...
- POJ3104--Drying(Binary Search)
It is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She ...
- 第78讲:Type与Class实战详解
今天来学习下type与class解析 让我们先来看看代码 import scala.reflect.runtime.universe._ class Sparktrait Hadoopobject F ...
- hdu 5050 大数
http://acm.hdu.edu.cn/showproblem.php?pid=5050 大数模板最大公约数 信kuangbin,能AC #include <cstdio> #incl ...
- 种类并查集——带权并查集——POJ1182;HDU3038
POJ1182 HDU3038 这两个题比较像(一类题目),属于带权(种类)并查集 poj1182描绘得三种动物种类的关系,按照他一开始给你的关系,优化你的种类关系网络,最后看看再优化的过程中有几处矛 ...
- shell 命令 --ps aux | grep
ps aux | grep 要查询的进程名 查询当前进程,如 ps aux | grep python 确认过需要查询的进程,就可以进行 kill -9 进程号等操作了.
- day06_雷神_面向对象初识
day_06 递归函数 自己用自己.一般递归100多次,都没有解决的问题,放弃递归. count = 0 def func1(): global count count += 1 print(coun ...
- htpasswd建立和更新存储用户名、密码
htpasswd建立和更新存储用户名.密码的文本文件, 用于对HTTP用户的basic认证. # /usr/local/apache/bin/htpasswd --help Usage: htpass ...
- 拟物设计和Angular的实现 - Material Design
Material Design是Google最新发布的跨平台统一视觉设计语言.直接翻译是物质设计,但是我更倾向于使用"拟物设计"更为准确. 据谷歌介绍,Material Desig ...