有人知道在 Asp.Net 1.1 中将多页 tiff 转换为 pdf 的免费工具或库吗?
7 回答
PDFSharp或 iTextSharp怎么样?在寻找免费图书馆时,我通常先搜索 sf.net。
使用ImageMagick。
convert screenshot.tiff screenshot.pdf
LibTiff.Net 库和tiff2pdf 实用程序(与库一起提供源代码)可用于将 TIFF 图像转换为 .NET 中的 PDF 文档
该库和实用程序使用 .NET 2.0,但您可能无需修改即可构建 .NET 1.1 版本。该库和实用程序是免费和开源的,它们的代码不使用泛型和 .NET 1.1 中没有的其他东西。
免责声明:我是图书馆的维护者之一。
Persist 软件的 ASPPDFlib.dll 可能会对您有所帮助。http://www.asppdf.com/download.html
查看 PDF Creator http://www.pdfforge.org/products/pdfcreator
我知道您可以编写脚本,但我不知道您是否可以通过 ASP.NET 对它执行任何操作。无论哪种方式,看起来都不会伤害。
我以前必须在 asp.net 中执行此操作(实际上是 JPG 到 PDF,但足够接近……)我使用 ImageMagick 并对其进行了处理。我知道它不是本机 c# 代码,但它是免费的,而且运行良好。只需运行这样的命令行:
cmd /c 转换 "c:\blah\original.tiff" "c:\blah\destination.pdf"
我使用 'cmd /c' 的原因是没有它,我会遇到 System.Diagnostics.Process.Start 弄乱参数的问题。
使用 PdfFoucs dll 只需 4 行代码即可将 PDF 转换为 Image、Word、Text 格式。无需为此安装任何 exe。
MultiTiff 图像中的转换代码:
SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
f.OpenPdf(FilePath);
if (f.PageCount > 0)
{
f.ToMultipageTiff(FilePath);
}
PDF中有基于homany页面在Tiff Image中转换的代码:
SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
f.OpenPdf(FilePath);
if (f.PageCount > 0)
{
for (int i = 0; i < f.PageCount; i++)
{
f.ImageOptions.Dpi = 200;
System.Drawing.Bitmap bmp1 = (System.Drawing.Bitmap)f.ToDrawingImage(i + 1);
bmp1.Save(Server.MapPath("~/FileUpload/") + filename + "_" + (i + 1) + ".tiff");
}
}
Word中的转换代码:
SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
f.OpenPdf(FilePath);
if (f.PageCount > 0)
{
f.ToWord(FilePath);
}
只有您需要在应用程序中添加 DLL。sautinsoft 网站上提供试用版和许可版