如何在jepg证书上的特定位置打印数据 [英] How to print data on a specific location on the jepg certificate
问题描述
您好,
我正在开发一个应用程序(带有C#4.0的ASP.net),我需要打印数据(例如,员工姓名和在我的解决方案文件夹中已经存在的已保存的jepg证书上的特定位置。
当用户点击打印按钮时,它应该从根文件夹中读取jepg证书文件并打印名称&在特定地点的日期。
请同样告知。在此先感谢。
我尝试过:
我是试图获取jepg文件我的根文件夹并在其上打印数据,但无法在其上找到数据。
尝试:
< pre lang =c#> 使用(Image im = Image.FromFile(pathToImageFile))
{
使用(Graphics g = Graphics.FromImage(im))
{
g.DrawString( 要添加的文本,Font,Brushes.Red, 100 .0F, 100 跨度> .0F);
im.Save(outPath,System.Drawing.Imaging.ImageFormat.Jpeg);
}
}
Hello,
I am working on one application( ASP.net with C#4.0), in which I need to print data (eg-Employee name and date) at specific location on a saved jepg certificate which is already available in my solution folder.
When User clicks on print button it should read the jepg certificate file from root folder and print name & date on a specific location on it.
Please advise on the same. Thanks in Advance.
What I have tried:
I AM trying to get jepg file my root folder and print data on it, but unable to locate data on it.
Try:
using (Image im = Image.FromFile(pathToImageFile)) { using (Graphics g = Graphics.FromImage(im)) { g.DrawString("Text to add", Font, Brushes.Red, 100.0F, 100.0F); im.Save(outPath, System.Drawing.Imaging.ImageFormat.Jpeg); } }
这篇关于如何在jepg证书上的特定位置打印数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!