我目前正在寻找一个PDF库,它将在没有运行X服务器的情况下运行。我已经试过以下方法..。
库不需要开放资源或免费的。
我的解决方案运行在Apache2.2 mod_mono上。
有人知道这样的图书馆吗?
编辑
下面列出了用于itextsharp的测试代码,它在我的测试服务器上产生错误( Migradoc和SharpPDF的代码也一样简单):
using System;
using sharp=iTextSharp.text;
using iTextSharp.text.pdf;
using iTextSharp.text.xml;
using System.IO;
namespace pdftester
{
public static class ITextSharpTest
{
public static void HelloWorld(string filename)
{
Stream stream = new FileStream(filename, FileMode.Create);
sharp.Document document = new sharp.Document();
PdfWriter.GetInstance(document, stream);
document.Open();
document.Add(new sharp.Paragraph("Hello world"));
document.Close();
}
}
}发布于 2010-08-27 15:04:00
因为没有人给出明确的答案,所以我要结束它。
我选择了sharpPDF方式,因为它是我的服务器上唯一支持的方式。我只需实现我的项目所需的内容。
(谢谢你到目前为止得到的帮助:)
https://stackoverflow.com/questions/3511128
复制相似问题