0

I simply want to convert an office document to a pdf file using c#. Office is not installed on my server.

My plan is to use the "Microsoft Print to PDF" printer, but I could not find any working solution for this. I just want to call the "Microsoft Print to PDF" without showing a dialog window.

How is this possible?

LaMiy
  • 103
  • 7
  • have you seen this SO thread? http://stackoverflow.com/questions/12874185/convert-word-to-pdf-disable-save-dialog ? and this ? http://stackoverflow.com/questions/607669/how-do-i-convert-word-files-to-pdf-programmatically – Aram Tchekrekjian Oct 30 '16 at 11:35
  • Yes, but this makes use of **Microsoft.Office** and Office is not installed on my server as I said in my post – LaMiy Oct 30 '16 at 12:29
  • This might be better on softwarerecs.stackexchange.com but the I think the answer is no. – paparazzo Oct 30 '16 at 12:35
  • 2
    Take a look at **docx4j.NET** here: http://www.docx4java.org/blog/2014/09/docx-to-pdf-in-c-net/ This is the .NET version of docx4j. it is an open source (ASLv2) Java library for docx/pptx/xlsx, has features such as PDF output. Let us know if it serves your needs. Nuget package found here: https://www.nuget.org/packages/docx4j.NET/ – Aram Tchekrekjian Oct 30 '16 at 12:42
  • @AramTchekrekjian This is really good. But I have a problem getting the right pdf file. There are comments like "#textbox#" in my pdf file. How can I turn this off? Is there more docu like the examples? – LaMiy Oct 30 '16 at 19:40
  • I am not quite sure if this is doable, but you can take a look at their official forums http://www.docx4java.org/forums/pdf-output-f27/ you might find more information or maybe you can ask anything you want in details. – Aram Tchekrekjian Oct 31 '16 at 07:25

0 Answers0