我想使用xepOnline.jqPlugin.js插件生成PDF 文件。
我有一个图像(在“背景”上)和图像下的HTML文本。 我能够生成PDF文件,但有两个不同的元素:图像和图像之后(而不是图像下)的文本。
<!DOCTYPE html>
<html>
<head>
...
<script src="xepOnline.jqPlugin.js"></script>
</head>
<body>
<div id="page-show">
<div class="image">
<img src="img/Card.png" >
<h3>TEXT</h3>
</div>
<button id="PrintButton" onclick="return xepOnline.Formatter.Format('page-show',{render:'download'});"/>
</div>
</body>
</html>
相关元素的CSS如下:
#page-show{
/* The main container div */
width:355px;
margin:90px auto 0;
}
div.img {
height: 165px;
text-align: center;
}
div.img img {
display: inline;
}
.image {
position: relative;
width: 100%; /* for IE 6 */
text-align: center;
}
h3 {
position: absolute;
top: 164px;
width: 100%;
font-size: 16px;
}
是否可以生成包含文字的图像的PDF文件? (格式与HTML页面中显示的格式相同)