1

我们目前正在使用 SoftArtisans 来生成ExcelWord文件。我们需要扩展它以创建PDF文件。

OfficeWriter 目前是否支持此功能?

如果没有,是否有计划添加此功能?或者任何可用于将 Excel/Word 文件转换为 PDF 格式的开源库?

4

3 回答 3

1

据我所知, PdfSharp 和 Migradoc是最好的和最受欢迎的。Migradoc 是 PdfSharp 的高级封面。

于 2013-10-04T07:25:32.340 回答
0

Note: I work for SoftArtisans, makers of OfficeWriter.

OfficeWriter does not currently support converting Excel/Word files to PDF. We generally recommend a 3rd party component to convert to PDF. However, many of these components require having Office installed on the server, which Microsoft does not advise. Therefore, it is important that you choose a converter that either does not require having Office on the server, or manages it carefully

Here are a few solutions for converting Word to PDF that we’ve recommended to our users in the past:

• Word Services for Sharepoint – If you are using SharePoint Server 2010, then you can use Word Services to perform the format conversion. More information about this solution can be found at: http://msdn.microsoft.com/en-us/library/office/ff181518.aspx

• Rainbow PDF - rainbowpdf.com

• EasyPDF - pdfonline.com/easypdf/

For more information, please see our blog post: http://blog.softartisans.com/2011/08/05/kb-tools-to-convert-word-documents-to-pdf/

于 2013-10-04T13:53:04.693 回答
-1

PfgSharp 非常受欢迎。下面是一个CodeProject关于如何创建简单 PDF 以了解如何使用它的示例:

class Program
  {
    static void Main(string[] args)
    {
   // Create a new PDF document
      PdfDocument document = new PdfDocument();
      document.Info.Title = "Created with PDFsharp";

      // Create an empty page
      PdfPage page = document.AddPage();

      // Get an XGraphics object for drawing
      XGraphics gfx = XGraphics.FromPdfPage(page);

      // Create a font
      XFont font = new XFont("Verdana", 20, XFontStyle.BoldItalic);

      // Draw the text
      gfx.DrawString("Hello, World!", font, XBrushes.Black,
        new XRect(0, 0, page.Width, page.Height),
        XStringFormats.Center);

      // Save the document...
      const string filename = "HelloWorld.pdf";
      document.Save(filename);
      // ...and start a viewer.
      Process.Start(filename);
    }
  } 
于 2013-10-04T07:33:47.923 回答