I would like to convert Word Document to PDF on my local intranet Server for my company. It Is a good idea to use microsoft.office.interop.word on my project instead of buying very expensive tools that don't support Arabic at all.
I will be happy to hear an expert opinion about this case :)
it depends on your need, Third party libraries would give lots of out of the box features whereas you would need to write a lot of code to achieve the same with PIA. But if you need simple word doc to pdf conversion then PIA should do it for you.
But i would strongly recommend you to go for a wrapper assembly which would help to over come the disadvantages of using PIAs such as,
They are limited to a version, i.e. they only work with one or
certain versions of Office
They cause problems while transferring or installation on other
systems
They offer no protection mechanism in the management of COM proxies
in a nutshell, if you are a using PIA your code might not work for different version of office whereas these wrapper assemblies manage multiple office versions using Late Binding.
You can use NetOffice which I have been using in projects for some time. some of the features of NetOffice are,
Office integration without version limitations
All features of the Office versions 2000, 2002, 2003, 2007, 2010,
2013 are included
Syntactically and semantically identical to the Microsoft Interop
Assemblies
I would not go as far to say that I am an expert here, but I can at least share my journey in hopes that it would save you time and energy.
This can work fairly reliably in limited scenarios, but Microsoft will tell you up front that:
[InterOp on a Server] is not supported and will not scale well
I agree, but for simple stuff... meh.
Your first hurdle is having the correct rights to run interop. Where
to run interop is a challenge for some companies. IMHO, I would not
run it on my intranet server unless I could contain the process with
limited rights (and yes that's doable).
Your next challenge will be with virus's and the vulnerabilities of
MS Word. MS Word must be kept up to date, customers must be able to
deal with documents not getting converted (due to potential virus or
bad macros in the file).
The approach that I use is to run MS Word interop in a service or as a workflow. You need to expect to queue these requests and write your app as such. The service would work in the background and have limited rights other than to run MS Word, open a file and "Save As" PDF format (plus what ever other business logic you require). You would scale by adding more services/workflows on new servers (one interop service per machine)
When run in this manner, I have rarely had issues. I hope this helps.
Related
Is there a possibility of having a general addin for Microsoft office and the same addin is visible in all Office solutions such as EXCEL, WORD, POWERPOINT etc. We can create individual addins for these applications separately but having a common solution would serve my purpose e.g. if I need to tag some information to all of my documents to be printed.
Any sort of information is highly appreciated.
Thanks.
Is there a possibility of having a general addin for Microsoft office and the same addin is visible in all Office solutions such as EXCEL, WORD, POWERPOINT etc.
Yes
There are two types of Add-In
VSTO Add-Ins (I will use VAI for short in describing them below)
Shared Add-Ins (I will use SAI for short in describing them below)
VAI are application-specific viz, MS Excel, MS Word etc. On the other hand SAI can be written for more than one application i.e can be shared between MS Excel, MS Word etc. Also I am sure that you are aware that VAI has only two main methods. One for startup and the other for shutdown. However SAI has to implement different methods for connection, unconnecting, startup and shutdown.
Another thing that is important to note is that since VAI is application specific there is not too much of code involved as compared to SAI. The reason being SAI work across different applications and hence you need to extra code to distinguish which application is currently calling your Add-in.
I prefer VAI because it lets me use additional programming "shortcuts" and useful objects not available in a Shared Add-in. Not that these are cannot be used in SAI but then you will have to specifically create them. An unnecessary added work if I may say so.
And the last that I can think of is the deployment. They both have a different deployment method.
Hope this clears the concept of a VAI and SAI
I've recently been given a task to populate a Word 2007 file with information retrieved from Rhapsody using the Rhapsody API. I'm not super familiar with Rhapsody, but I'll learn. I'm having difficulty tracking down a good way to write a program that can write to a formatted (read: tables) word document. I'm best at java, but I'm capable of using C#, C++, or VB. The problem seems to be that all options for java require the use of 3rd party libraries, and I'm not sure if I'm comfortable using them. All of the languages available in the Microsoft Visual Studio seem to have options for writing out to a Word Document, but I can't seem to figure them out. What would be my simplest option in attempting to tackle this task?
Aspose words does a really good job integrating C# with MS word.
http://www.aspose.com/categories/.net-components/aspose.words-for-.net/default.aspx
I am not sure if you already tried all features of Rhapsody Reporter Plus (in built) and Rational Publishing Engine (additional licenses might be required). With them you can produce html, pdf, word documents...
If this is not your use case and you need your own plug ins in java, we have good experiences with Apache POI, which I could recommend.
I don't understand why you might have issues using 3rd party libraries, when you write everything by yourself you might end doing such a similar library, expending of course "some" time and "some" headaches until having it ready...
I'm looking for some tool that can be used to create .chm (or something else that works with .NET) help files for my .NET application. I realize that Microsoft offers a free product that works perfectly fine, but here is the caveat: I work for a contractor that gets it's money from the gov't. As you can imagine, we have certain processes in place that are simply there to waste time and money. One of these is our process for approving "Free and/or Open Source Software." Given that this microsoft tool is free, program management wants nothing to do with it..they'd much rather find one that they can buy and get a license for to remove any ambiguity about our legal rights to use it. So yes, even though there is a perfectly good, free tool available, to satisfy management who doesn't want to deal with stupid, expensive, time consuming processes, I'm looking for something (that is probably less capable) that costs us money and will accomplish the same/similar thing.
I use Help & Manual which is extremely capable. It provides multiple outputs - chm, pdf, hlp and others. It is easy to use; can take very large help sources; and supports multiple languages and external translators; and can be used to generate application help (tool tips, etc.) I have no connection with the product or company, except as a very satisfied user. I do believe that its capabilities far outstrip Microsoft's free tool, though it is some years since I used the MS tool.
We need to have documents shared between clients (CRM-like functionality). Users need to be able to:
Edit the documents and save them again
Attach new documents
Our application is coded in WPF with WCF for data-transport and NHibernate/SQL for data on the server.
what we're thinking is to use SVN and have the app create a local check-out of parts of the repository (when they click a document, it is checked out by SVN in the background and opened from the local path) - When saved it will silently (using monitoring of the path) be committed back to the repository.
Question: Is this feasible - or are there better solutions to this?
EDIT 1:
Summary so far:
I'll look into using Git/Mercurial instead of SVN
Document size (revisions) might be prohibitive pending tests
SharePoint is an option (although not viable in my case as the cost alone is prohibitive) - I will look into the alternatives for SharePoint, tho.
Not much experience out there about using repositories for many users although it works for small teams..
Wiki software might be an alternative to SVN.
Thanks for all the feedback - I'll keep it open a bit longer.
EDIT 2:
Summary after a few days of work - I have a client working - see my progress here.
Based on the heavy .NET references, are you all set up with MSDN? Perhaps you can make use of SharePoint...which may already be included within your MSDN account.
You might also want to consider using a Wiki for document management - I've seen this done and do it myself for my own organisation. We're using Atlassian's Confluence Wiki. Confluence provides for the versioning and general management of documents.
I wouldn't use SVN for this, SVN is not very efficient when dealing with binary files. By using SVN as a back channel for some content in your application you just complicate things by adding another technology and dependency, but you will not use much of its real potential.
I would store the documents as blobs in the database and get/store them through WCF.
Generally I don't think that SVN or any version control system is a good thing to use for sharing documents. Main disadvantage is the diff system on binary files... Your SVN repo will grow rapidly..
Maybe you should try using some of the commercial tools designed for document sharing (eg. Microsoft Sharepoint). Or some Open Source alternatives... Perhaps you should read this post...
It depends on the kind of documents you are using. If you have lots of changing, compressed binary files, then don't use it.
However, if the documents are in an open format like a Wiki language, (X)HTML, LaTeX or uncompressed ODF, then using a version control system makes absolutely sense. Also, a bunch of compressed ODF files or PDF files are handled very well, especially if the files are mostly smaller than 5 MB or so.
In addition, make sure to check some more recent version control systems like Mercurial and Git before sticking to the conceptually outdated SVN. In your scenario, you won't profit much from the "distributed" part of Mercurial and Git, but they are nevertheless easier to setup - at least to my experience. And they provide very advanced version control features which can save your day in the rare cases when you need them.
In case you stick to SVN, and if your client software runs under a modern Unix system, you can also try SVN-FS. This is a filesystem that uses a remote SVN server. Each read goes to the latest revision. Each write creates a new commit. This seems to be exactly what you wanted to build around SVN.
I think that using ready made and proven tech is great idea. Would like to see it's progress if you really go that way.
I would strongly go AGAINST SharePoint - you'll tie yourself to Microsoft in manners that are hard to describe here. From my point of view, SharePoint is a tech that needs taking care of just for itself.
I got the requirement to output some reports as Excel 2002 spreadsheets.
Normally a job for reporting services - however - that's "not great IMO" and I hate it so for this project I used ExtJs - which doesn't do any excel output - not really - but does do the UI really, really well.
The reports will need to have outlining, grouping summaries and all sorts of formatting not available if I use the plain XML formatting. This is the one thing Reporting services does do really well. Gutted.
So... Does anyone have any suggestions for alternatives to reporting services and definitely not installing Office on the server? Crystal reports are just as "not great IMO" as RS so not that either :)
I have looked at aspose et al but they're a bit expensive and I'd like to find something open-source, if possible - such as perhaps using open office -, if I can find a way of using OOo on the server without actually installing it.
Any ideas?
If your reports are not very large perhaps you can get away using the free version of Gembox Spreadsheed?
The Perl module Spreadsheet::WriteExcel works very well at generating reports in Excel format.
SpreadsheetGear for .NET can do it and requires only ASP.NET 2.0 on the server (no reliance on Excel or any other libraries).
You can see live ASP.NET (VB and C#) Excel Reporting samples here.
If performance is important at all, I would suggest running your own performance tests with your actual data and formatting as you compare your options.
Disclaimer: I own SpreadsheetGear LLC
I ended up going the OpenXml SDK route - which is a bit of a PITA in some situs but good in others - once you get the hang of it...
The answer to this depends on budget, time and whether r not you're allowed to install coms on the server -
for us all of the above were negative,
we needed the follwing:
export of generic data
grouping of certain columns
sumarisation of certain columns
template based output
sql server reporting services offered all of this if - and only if you adhered to their rules.
what we have now is near as damn it ad-hoc reporting - using extjs for the ui, nhib for the domain castle windsor for the binding, and ooxml sdk 2.0 for the export.
if you need the code for the ulti level grouping excel output give me a shout :)
w://
I am working on (right now) a windows service that does Excel and PDF generation and merging on the server, unattended, using the SyncFusion XlsIO components.
So far this has been effective. The only limitation I have run into is the ability to read some 'legacy' html/xml based Excel formats.
Not Open Source, or free unfortunately but it is a workable option.