【发布时间】:2015-06-29 07:16:13
【问题描述】:
我有一个名为 sample 的表。该表包含a href 标记内的数据。
我想将表格转换为 pdf 格式。我的代码是:
var toPDF = function(htmlId, config ){
if( $('#'+htmlId).length > 0)
{
reportParameters['reportString'] = $('#'+htmlId).html();
reportParameters['config'] = JSON.stringify(config);
window.open('url','Page');
}
else
{
alert('Invalid HTML ID');
}
};
function myFunc()
{
var conf = {
'headerCenter':'sample',
'pageSize':'A4',
'headerFontSize':18,
'headerLine':true,
'headerSpacing':2,
'footerLine':false,
'footerCenter':'Date: [date] [time]',
'footerRight':'Page[page]',
'footerFontSize':8,
'footerSpacing':1
}
toPDF('sample',conf);
}
上面的代码工作正常。但我的问题是,pdf 数据包含蓝色和下划线的链接数据。
如何去除链接颜色和下划线??
【问题讨论】:
-
a { text-decoration:none;color:#000;} -
什么是
toPdf?也许那里有文档 -
使用 madlin 的建议在 CSS 中删除它
-
@madalinivascu 和 Sato 你在哪里看到 CSS?
标签: javascript jquery html css pdf