无头Linux服务器的C#PDF库

时间:2010-08-18 10:34:06

标签: c# pdf-generation mod-mono

我目前正在尝试查找一个没有正在运行的X服务器的PDF库。我已经尝试了以下......

  1. Migradoc / PDFSharp(需要X)
  2. ITextSharp(需要X)
  3. SharpPDF(可能有效,但我正在寻找具有更多功能的东西)
  4. 必须是开源或免费的。

    我的解决方案在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();
            }
        }    
    }
    

1 个答案:

答案 0 :(得分:0)

由于没有人给出该线程的明确答案,我正在关闭它。

我选择使用sharpPDF方式,因为它是我服务器上唯一支持的方式。我只需要实现我的项目所需的东西。

感谢目前为止所获得的帮助:)