1

We are currently using SoftArtisans to generate Excel and Word files. We need to extend this to also create PDF files.

Does OfficeWriter currently support this?

If not, any plans to add this feature? Or any opensource library that can be used to convert Excel/Word files to PDF format?

wonea
  • 4,783
  • 17
  • 86
  • 139
GeekzSG
  • 943
  • 1
  • 11
  • 28

3 Answers3

1

PdfSharp and Migradoc as far as I know are the best and the most popular. Migradoc is the higher-level cover for PdfSharp.

pt12lol
  • 2,332
  • 1
  • 22
  • 48
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/

  • Most of our customers have asked about Word to PDF conversion, so we have recommendations ready for that. We are currently looking at some Excel to PDF to recommend as well. - Note I also work for SoftArtisans. – AlisonB Oct 04 '13 at 13:56
  • The unfortunate part is that these tools don't come as add-ons with ExcelWriter license and we have to spend $$ on them too. – GeekzSG Dec 03 '13 at 02:46
  • Did you find any alternative that is free? Why not add this feature to your own library like Aspose.Cells? – GeekzSG Feb 06 '14 at 17:13
-1

PfgSharp is quite popular. Here is an example from CodeProject on how to create a simple PDF to get some feeling on how to use it:

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);
    }
  } 
Klark
  • 8,162
  • 3
  • 37
  • 61
  • This is only `Hello world` code. I tried both and I really doubt if someone uses directly PdfSharp. – pt12lol Oct 04 '13 at 07:44
  • This is just a hello world example. We are looking at creating professional PDF documents with images, tables, formatting, footer, etc. – GeekzSG Oct 04 '13 at 10:17