如何使用html将图像设置为pdf文档中的标题 [英] how to set image as header in pdf document using html

查看:112
本文介绍了如何使用html将图像设置为pdf文档中的标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生,



我想在pdf中添加图片作为标题,目前我正在使用html生成pdf,我可以将文字作为标题但是我不能给图像标题,所以请给我解决方案。



目前我使用下面的代码生成pdf



Hi sir,

I want to add image as header in pdf,at present i am using html to generate pdf in this i can give text as header but i can not give image header so please give me solution.

at present i am using below code for generating pdf

strHtmlString.Append("<tr><td colspan='10'></td></tr>");
                strHtmlString.Append("<tr><td colspan='2' align='left'><b>Exclusions</b></td><td colspan='8' align='left' >: Any other works not specifically mentioned in our scope of work</td></tr>");


                strHtmlString.Append("<tr><td colspan='10'></td></tr>");

                strHtmlString.Append("<tr><td colspan='2' align='left'><b>Kind Regards,</b></td><td colspan='3' align='left' > &nbsp;</td> <td colspan='2' align='left'><u><b>Approved by Client</b> </u></td><td colspan='3' align='left'>&nbsp;</td></tr>");

                strHtmlString.Append("<tr><td colspan='3' align='left'><b>&nbsp;</b></td><td colspan='2' align='left' > &nbsp;</td> <td colspan='2' align='left'><b>Signature:</b></td><td colspan='4' align='left'>&nbsp;</td></tr>");


                strHtmlString.Append("<tr><td colspan='5'></td></tr><tr><td colspan='5'></td></tr>");









提前感谢





thanks in advance

推荐答案

使用标签 img src =ImageNameWithPath />你的HTML中的标签然后可以创建如下:



img src =ImageNameWithPath width = 190height =100/>
Use the Tag img src="ImageNameWithPath" /> tag in your html then can create it like below :

img src="ImageNameWithPath" width="190" height="100" />


img src =ImageNameWithPathwidth =190height =100/>



如akhi所说,它会做....
img src="ImageNameWithPath" width="190" height="100" />

as akhi has mentioned it will do....


这篇关于如何使用html将图像设置为pdf文档中的标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆