1

I need a API to support changing header/footer of doc, docx, xls, xlsx. I have a huge code written for libreoffice, but the problem is the final document is with broken style and that is a big issue. Similar results are obtained with other open source projects so i am looking for some paid version probably like Aspose but could you give me alternative soltutions as well.

The other aspect of the problem is that i need a convertions from any office document, mail, msg to pdf.

I am looking also for solutions including C# but most probably it will be run under linux so java is preffered.

JasonPlutext
  • 15,352
  • 4
  • 44
  • 84
hackyou
  • 21
  • 6

5 Answers5

2

With Aspose Java components, you can update the header/footer of documents and convert all supported file types (doc, docx, xls, xlsx, eml, msg etc) to PDF. We try to keep the format of PDF same as the original document.

You can try exploring PdfSaveOptions class yourself or post the problematic files in Aspose forums, the technical support will try to solve the issues.

PS. I am a developer/evangelist at Aspose.

Saqib Razzaq
  • 1,408
  • 1
  • 10
  • 10
1

Using C# I know for a fact you can access the microsoft word com object. If you are loading all of these in the newest Microsoft word, you can tell it to convert to pdf right there and be done with it How do I convert Word files to PDF programmatically? this is what i used to get me up and running with C#. Apache POI, I have had nothing but problems with. Open Office and its UNO Api I have found to work for me in most cases, sometimes the docs do come out funky. So all in all I found C# the best. I hope this helps!

Community
  • 1
  • 1
Joshua
  • 222
  • 1
  • 5
  • Thanks Joshua i have the same observations. This process is done on server side, so can you suggest any api to manipulate docs with c# as command line – hackyou Apr 16 '13 at 13:43
  • So basically we wrote our own command line utility to convert documents over. As long as you are in .net all of the interop with microsoft word is covered. Again if you are using the newer versions of Microsoft word (2007 and up) its very easy to to open a document and tell it to convert(in code) 2003 Theres a hack way that doesnt work so well. [Here](http://msdn.microsoft.com/en-us/library/office/bb412305(v=office.12).aspx) is what I used as a code example and it seemed to work for me. But again you will have to make the executable yourself. – Joshua Apr 17 '13 at 15:14
0

According to your requests i can only think of Aspose and IText, you can take a look at some sample code maby this will help you make your decision:

Community
  • 1
  • 1
CloudyMarble
  • 36,908
  • 70
  • 97
  • 130
  • I need to manipulate them without any regression or format change. I have done some tests and aspose and is working correctly but not in all cases, so i am looking for another solution to check – hackyou Apr 16 '13 at 13:30
0

docx4j can do a lot of what you want.

It supports docx, pptx, xlsx.

For legacy binary docs and xls, you'd convert them to docx/xlsx format using LibreOffice or OpenOffice via JODConverter.

docx4j can convert a docx to PDF. The fidelity continues to improve post 2.8.1, so you should try a nightly build.

JasonPlutext
  • 15,352
  • 4
  • 44
  • 84
0

Problem with poi api, please use 3.10 final api and this bug is fix in this api. Check this post

In this post this problem is resolved.

Community
  • 1
  • 1
jawed nazir
  • 33
  • 1
  • 3