Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I have a task to convert the word document to PDF file. I need some process which could be done for free.Could any help me the process of converting the Word to PDF file for free with out Microsoft Interop ?
The sad truth is that you proberbly can't.
If it is a simple document with little styling and simple tables, or even less, then yes, you can proberbly find a free solution.
The paid solutions don't really work well either unless it's a somewhat simple document.
I was involved in a project where I made a document-generating system that had to prepare around 24.000 word documents in .docx and .pdf every day, and believe me we tried everything.
The free solution that almost kinda worked when the document did not contain any advances plots or tables was a java solution, docx4j.
We tried using Apose, Gembox and a bunch of others, but none of them could transform the advanced documents to a proper pdf without messing up the formatting.
Try converting something like this: example without using word. It won't work. Or at least it wouldn't approximately a year ago.
We ended up with setting up a dedicated document-server that hosts a very much abused Microsoft Word process that does nothing all day except generate and convert documents.
I would be very happy to discover the presence a decent free (or paid) alternativ. But my experience is that as soon as your document gets very complicated (see the example) no one knows .docx like Microsoft. And it sucks that they can't/won't just make a proper .dll you can include in your project for conversion, but that is the way it is.
If you have only small doc and docx files, you could use the free version of: GemBox.Document
If you want to convert your documents with all styles and so on, i think you have to buy a component. I've spent a lot of time searching for an open source solution, but could not find anything. GemBox.Document has a really good price/performance ratio.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I am trying to convert a docx into a pdf file from an ASP.NET MVC application. I have been using Microsoft interop saveas command til now but it sometimes (not always) fails with the error "command failed". I have seen that it is already deprecated and not supported by Microsoft anymore and Microsoft says it is not recommended to use it anymore from an ASP.NET application so I am trying to get alternatives.
I have seen there is a good one, that is, aspose.words but it is not free. I am interested in a free one. So nowadays is there any free alternative out there that is compatible with Microsoft docx documents and capable to convert into pdf without problems?
I am interested in a free one
There isn't one. Office/Word's .docx file format is incredibly long and complicated (see below), so writing a program that can fully parse a Word document alone is a mammoth undertaking, alone the as-important task of generating a visual-formatting model representation, and then convert that visual model to a PDF file by generating PostScript/PDF commands from it.
This is what OOXML specification looks like when it's printed out:
(Source: https://fussnotes.typepad.com/plexnex/2007/05/ooxml_more_than_1.html )
Then consider all the features and edge-cases present in the Word formatting model: tables, headings, drop-caps, captions, (don't forget embedded and external content using OLE!), floating textboxes, WordArt, and so on.
Non-visual processing of the XML representation of a Word document is actually trivial and can be done with any XML library - though you should use an OOXML-schema-aware library so you process the Word document correctly (so you don't end-up inserting a paragraph into a header, or a caption that fills the page).
Everything else is the difficult (and expensive) part of the problem. This is why, even today, almost 40 years after Word was first released and 15 years after the OOXML format specification was released, third-party software like OpenOffice (nee StarOffice) and Apple iWork still cannot fully and correctly import or render Word documents.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Our C# source code is comprehensively documented using the usual Sandcastle/XML notation. We use SHFB to compile this into a MSDN-style documentation website.
We now need to*1 compile the documentation into a printable form. Ideally, we would like a PDF document but the specific format is less important than its printability. It is important, but not critical, that the documentation looks relatively professional and can be branded with the corporate logos, etc.
Is there a mostly pain-free way to do this? I don't think individually printing every page of the documentation website is a practical choice. The intermediate XML documentation files can, in principle, be transformed into a useable format but maybe there is already a viable and maintained solution for this task?
*1 - for reasons that I don't fully comprehend.
Is there a mostly pain-free way to do this?
No, DO not do it. It makes zero sense for a class level documentation - noone will ever read it. TAll hyperlinks do not work, would have to be changed to page references.
Our C# source code is comprehensively documented using the usual Sandcastle/XML notation.
No, it is not. It is documented the normal XML documentation notation. Sandcastle did not invent it.
NOw, if you really have to do it:
http://www.innovasys.com/products/dx2011/csdocumentation.aspx?cpid=gawdxcs&gclid=COiJq5To8qwCFQGHDgod900o0g
is pretty much the best you can get to. The are specialized in exactly that (multi target stuff). They also handle the additional pages etc. which is needed - the pure clas reference, without index, jsut printed, with hyperlinks instead of page references is basically tree destruction without any sense.
Apparently Help and Manual can import Sandcastle projects directly and then output them in various formats (including printable ones).
I haven't tried this myself, though. I'd be interested to hear experiences from anyone who has.
Ndoc has a Latex documentor plug-in. NDoc supports all documentation tags supported by Sandcastle, so that should be able to compile the documentation into a Latex file. This can then be used to create, for example, a Postscript document for printing.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm now working on a .net/c# project requires to generate a contract pdf file (for printing and browsing purpose) based on some info traced from database.
The file also concludes several pages content which is fixed. It seems that crystal report does not deal well with multiple pages files. I also did research online, someone said use iTextSharp.
The question is the format of the file can be complicated. iTextSharp is kinda of not efficient on this issue.
Anyone has an idea?
PDF Sharp is an excellent library for this. They also have Migra-Doc which allows you to write documents to pdf, xps and rtf. The API is robust and based on GDI, pages shouldn't be a problem, you can even draw tables and stuff.
Quick Samples are here but download the project source, they have a hoard of good samples.
Please take a look at Windward Reports (I'm the CTO at Windward). With Windward you design in Word, Excel, or PowerPoint so anything, no matter how complex, that you can layout in Office, we can then render with data in PDF.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I would need to edit a pdf at runtime in C#.NET. Is this possible? Like copying things in the pdf, editing textfields, ...?
Look at iTextSHARP. It's a .NET library for manipulating PDFs.
It is definitely possible, but not with what is built-in to .NET (unless you are a PDF format guru and can roll your own). I've mostly used Aspose for manipulating PDFs, but there are a lot of toolkits out there. Personally, I think Aspose is a little rough around the edges but not moreso than other kits.
Well there's iTextSharp : http://sourceforge.net/projects/itextsharp/ with which you can write pdf files, but I don't think it has editing (reading pdf) capabilities, or they will be limited.
I've never found a way to edit PDF's, unless you buy some third party tool ...
Look at this
iText# (iTextSharp) is a port of the iText open source java library for PDF generation written entirely in C# for the .NET platform.
Docotic.Pdf library may be used to edit PDF files. You can fill forms, import and export forms data, extract text, append documents and so on. Please take a look at samples for the library.
Disclaimer: I work for Bit Miracle.
It can be done, have a look at iTextSharp.
ITextSharp is good for adding things to a PDF.
These PDF components are also pretty good: www.tallcomponents.com
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Does anyone know of source code, ideally in C# or similar, for reading .DXF files (as used by AutoCAD etc)? If not code, then tables showing the various codes (elements / blocks / etc) and their meanings?
I am writing a reader myself, and have dead tree documentation detailing the format, but am trying to avoid writing e.g. a converter from each of the 255 ACI colours to RGB... Thanks!
I have work a couple of years at developing my own DXf-Viewer in java (you could drop your own DXF file or an URL on the viewer) for 2D drawings. The published information from AutoCAD is a good base but doesn't explain how it works. Becoming member of the Open Design Alliance, will give you the possibility to convert several CAD formats to DXF. It may be a good idea if you are developing a commercial product.
There is a german book (http://www.crlf.de/Verlag/DXF-intern/DXF-intern.html) about DXF which really explain this format. It's expensive, but could save days of search.
The colors in the DXF Format are indexed, you must have a converter from ACI to RGB. Be careful with values 0 and 1 which having a special meaning.
Regards.
Cadlib from WoutWare have I been using for a couple of projects with good results.
Update in case someone is still looking...
It's the same library, just including both links.
https://github.com/haplokuon/netDxf
https://www.nuget.org/packages/netDXF/
Fortunately AutoCAD publish the DXF format information here: DXF Formats
You may want to try the Open Design Alliance. It's a while since I looked at it myself, but they had a load of C libraries for dealing with various AutoCAD files.
Here is a link to a CodeProject dxf reader; it seems very limited (and not particularly well done) though.
Here is another open source dxf reader, in Java. Buggy however!