【发布时间】:2012-09-28 18:50:58
【问题描述】:
我有以下功能,可以让我遍历多页单 tiff 文件中的每一页。
// This function will iterate all pages, one at a time. //
protected void PrintAll_Click(object sender, EventArgs e)
{
// counts number of pages in the fax document.//
int number = _FaxPages.Count;
// for loop to iterate through each page. //
for (int i = 0; i < number; i++)
{
string _FaxId = Page.Request["FaxId"];
_PageIndex = i;
imgFax.ImageUrl = "ShowFax.ashx?n=" + _FaxId + "&f=" + _PageIndex + "&mw=750";
PrintAll.Attributes.Add("onclick", "return printing()");
}
}
我想知道如何在 for 循环中动态创建单独的图像标签...这样我就可以使用这些图像打印 tiff 文件中的所有页面。
现在如果我在我的 javascript 中使用 window.print().. 它会打印整个网页以及按钮、链接、文本框、复选框等。我只需要能够打印里面的图像传真文档,它是具有多页(帧)的单个 TIFF 文件。
请帮忙。
【问题讨论】:
-
如果您有一个网页,从该页面中提取所有图像会更容易,然后加载一个带有这些提取图像的新页面,并在该新页面上调用
window.print()。 -
你能告诉我一些如何做到这一点的代码吗?请
标签: c# asp.net image printing tiff