I'm running NodeJS and MongoDB on a linux cloud server.
I need to give my users data in a variety of formats:
Shapefile (shp)
Autocad (dxf)
Excel
(xls/xlsx)
It would also be nice to be able to generate Word (.docx/.doc) files.
Any suggestions?
For an AutoCAD API, http://www.opendesign.com/ is the cheapest way. There may be other DXF libraries out there but I doubt they are as refined as the ODA or the official AutoCAD SDK.
Search the AutoCAD tag for more Q&As on DWG & DXF SDKs.
Related
I want to take a .DOC or .DOCX file and convert it to another file format; e.g. PDF or HTML, etc. I don't have MS Word loaded on the local machine nor do I have an Office 365 account.
Will Microsoft Graph provide a way to do this programmatically, or am I barking up the wrong tree?
Thanks in advance for any insight or ideas!
You can do this in various ways in Office365/Graph:
Do a http GET to the drives API in MS Graph. Example:
GET /drive/items/{item-id}/content?format={format}
This also works for files in SharePoint.
See:
https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_get_content_format
Via the Convert File action in Microsoft Flow. See John Liu's blog on this.
Essential DocIO is an option to consider. The library can convert from Doc and Docx to PDF and doesn't rely on Microsoft Office.
The entire product is available for free with no limitations through the community license if you qualify (less than 1 million US$ in revenue per year).
Note: I work for Syncfusion
Today the Microsoft Graph doesn't provide this functionality, but it's a reasonable request. You might want to raise it over at uservoice here.
Microsoft Graph (https://graph.microsoft.io/) can't be used to convert your .DOC or .DOCX files into another format, especially if you don't have MS Word or Office365. Microsoft Graph is basically 'just' an interface to access your data/objects stored in your Office365 tennant.
Without MS Word your only option (besides third party tooling) to convert would be to use Office Open XML, but even so that wouldn't suit your need as .DOC files are not based on the open XML standard. Also rendering to PDF is also not part of the Office Open XML specifications so you need to find another service to do that if you don't want MS Word to do that for you.
So in short, to answer your question ... no you can't use Microsoft Graph to convert MSWord documents to other formats.
I have an Excel sheet with fields such as [name][url in folder][keywords] ... I am trying to find the best way to write IPTC metadata keywords to my 60'000 TIFF images in order to be able to search through them (with Adobe Bridge) from this Excel file. I have tried exiftool.exe but "Adobe Bridge" cannot read the rendering keywords. I have seen that it may be possible in PHP, but I would like to know if code or software already exists.
Any IPTC library can do it for you. I use Python so for example http://tilloy.net/dev/pyexiv2/ would be my tool. Look at the tutorial on http://tilloy.net/dev/pyexiv2/tutorial.html
I have to make a MySQL database from a Clarion database. The tables are .tps files.
I don't know how to do it, for now I only found applications that work with .dat files.
I made an open-source bulk tps-to-csv conversion utility.
Its based on reverse engineering the TPS file format, so make sure you double check the results. The source (Java) can be found is available on github.
If you have a copy of Clarion, you should have the topscan.exe utility. It has an export feature.
At the moment, we use MS WORD and MS EXCEL to mail merge documents that needs to be sent to multiple recepients.
For example, say there is a complaint form where the complainant needs to fill in his/her name, address, etc. So we have a .doc file set up with the content and the dynamic entities set up for mail merging, with the name and address details put in an excel file, from where we can happily mail merge to generate all or just the necessary forms/documents.
However, I would like to automate this process, like a form in a website where the complainant can fill in his/her name, address and other details, and we could use that to generate the complaint form automatically and offer it to be downloaded (preferrably as a pdf).
Now, the only solution that comes to mind, is Latex, so that I can just replace the needed entities and just compile to PDF. However, that bit has to be negotiated with the webhost, if they are offering Latex or not.
Is there any other solution? Any other way we could get this done, with something that shouldn't be a problem for most webhosting solutions to offer?
EDIT: I would prefer a non .NET or rather non microsoft solution since, the servers are running linux and while mono might be capable of getting the job done, none of our devs know any .NET languages. However, if required we might have to dwelve into it.
Generating PDF using an XSL. Check the following: Apoc XSL-FO
You will need to create an XML file with the required fields and transform that with this tool.
If you wish to avoid .NET then XSL-FO is worth a look. Try the FOray project.
XSLT can be a steep learn if you do not have experience already. Also users will not be able to change the templates without asking the XSLT guru to do it.
If your templates are already in MS Word and MS Excel then I would stick with generating MS docs on the server. These are now easy to work with from code since OpenXML - check out OfficeOpenXML and OpenXMLDeveloper
Apache FOP : http://xmlgraphics.apache.org/fop/
I suggest generating rtf on the server: it's easy enough to automatically generate using cpan's RTF::Writer, has converters generating good pdf, can be edited by hand in word, oo-writer & TextEdit, doesn't have any really bad compatibility issues between the main editing applications, and has decent text & resource extraction tools, with text extraction being rather better than pdf.
There's some support for moving between rtf & latex, although the best rtf -> latex converter, docx2tex, depends on the System.IO.Packaging .net module, whose mono implementation isn't yet rock solid.
Postscript — Not a recommendation: it's too much of an unwieldy sledgehammer for this job, but iText will generate the pdf directly from the form data. If you wanted to do fancy things like signed pdf, that would be the way to go.
Postscript #2 — If you break up the Word document into individual files using word's master document representation, then you can clobber one of the parts with hand-generated content. This makes it easy to do something approximating form-filling on word .doc files using just standard file-utils and some trivial rtf->doc tweaking.
I want to save an image in EXIF format using System.Drawing.Image.Save or a similar method in a C# application using .NET framework v3.5. The MSDN documentation lists EXIF as an option for ImageFormat. However, it does not seem to be supported - at least not without some configuration unknown to me. When I enumerate the built-in encoders via ImageCodecInfo.GetImageEncoders() EXIF is not included. (Built in encoders on my machine (Vista Ultimate x64) are: BMP, JPEG, GIF, TIFF, and PNG.) If I save an image using the ImageFormat.Exif property, I simply get the default PNG format.
How can I save an image in EXIF format using .NET 3.5?
EXIF isn't a image file format per se, but a format for meta-data found within JPEG images conforming to the DSC (Digital Still Camera) standard as specified by JEITA.
GDI+ (i.e. Microsoft .NET Framework) allows you to read/write metadata image properties via the Image.PropertyItems, however the EXIF properties exposed by GDI+ are pretty cumbersome and don't convert the values the way you would expect. A lot of work is actually needed to be able to natively read/write these values (e.g. you'd need to unpack binary fields containing specially encoded values according to the JEITA spec).
A straight-forward open-source library which implements all the standard EXIF properties can be found at http://code.google.com/p/exif-utils/ This is probably the easiest way to do this. See the simple included demo which reads in a file, prints out all the EXIF properties and then adds a property to the image.
Have you seen this: Lossless JPEG Rewrites in C#