How to export csv file in adobe air? - air

I am working on Adobe Air technology.
Getting some issue when i export CSV file into Chinese language, after exporting when i open it into Microsoft Office Excel sheet not getting records/data properly.I am using traditional Chinese language.
When i am using Kingsoft Office software (Excel sheet) got the correct result.
But when i use Microsoft Office getting random data like ?(question mark) signs.
IS there any language setting in Microsoft Office for set traditional Chinese language properly?
Thanks

You need to export csv file as bytearray file using FileStream via writeMultiByte where you can setup your language charSet.
I had the same issue with Russian language.
Start from here http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/ByteArray.html#writeMultiByte()
Don't afraid this bytes :) There is not more than 8-11 small lines of code.

Related

How to create an Excel file in VB

I need to write a VB class that will create an Excel file and pass into this file a list of variables.
Afterwards I need to be able to convert the program to a .dll so that it can be called by a program.
Its been a while since I have written any code so thought that VB would be a good refresher but all the example I can find all start from within Excel. I need the call to create the file to be from outside of Excel.
I would recommend you look at the OpenXML SDK For Microsoft Office. Unlike many of the examples you'll find that use Microsoft.Office.Interop, this approach does not require Microsoft Office to be installed.
OpenXML SDK 2.0 for Microsoft Office
OpenXML SDK 2.5 for Microsoft Office
There is a complete how-to on MSDN for generating Excel workbooks.

Is it possible to convert a Microsoft Word document to PDF with ColdFusion?

The above question says it all. I know you can create a PDF from an image file or HTML in ColdFusion 8 using CFPDF, but I'm wondering if it's possible to create a PDF from a MS Word document directly - in CF8 or CF9.
Could you import the Word document and convert it to HTML or an image file, and then do the conversion? Or is there a shortcut?
see Doc: Office file interoperability - Using cfdocument
ColdFusion 9 supports OpenOffice, which uses the cfdocument tag to convert a Word document (.doc format) to PDF.
<cfdocument
format="pdf"
srcfile="C:\documents\MyDocument.doc"
filename="C:\documents\MyDocument.pdf">
</cfdocument>
In CF8, you could probably do something with COM object integration or POI integration, but it would not be simple/straightforward.
Converting it to HTML using Word's save as feature is probably the simplest route using CF8. I'll suggest that Henry has the right idea, though, upgrading to CF9 to take advantage of OO.O integration.
Edit: Thanks to #jarofclay, I now know that the POI CFC wrapper has been updated to include Word docs. I remembered it only supporting Excel, but that's clearly changed. Um, is it too late for me to change my vote for how to do this in CF8?
I am not at all familiar with CF, but if you can make web service calls from it then try this product. It relies on MS-Office rather than Open Office so provides much better conversion fidelity. It also supports additional formats including Infopath, Excel, PowerPoint etc as well as Watermarking support.
Please note that I have worked on this product so the usual disclaimers apply.

PDF conversion service

I need to develop a service able to convert MS Office and Open Office documents to PDF. And the PDF`s also need to be commentable when opened in ADOBE Reader.
I have used a piece of software from www.neevia.com. And it does the conversion, but is not able to make the PDF´s commentable and is therefore useless in my scenario.
Ideally I would like a piece of software that is monitoring a directory, and when a file is commited to that directory, the software detects this, fetches the file, converts it, and puts it in another directory. This way I can programmatically put the file I want converted in the IN folder and monitor the OUT folder to fetch the file when converted.
So do anyone know a piece of software capable of converting MS Office and Open Office files to commentable PDF`s?
It sounds like you're after the "Extend Features In Acrobat Reader" document rights feature that's part of Acrobat Professional. If you want a programmatic way of doing it then Adobe LiveCycle is the only game in town. This is one of the features that Adobe keeps for itself and no third party is legally allowed to provide it.
You could programmatically, using office automation, print documents to a postscript printer driver to get a postscript file, then use GhostScript to convert the PS file to PDF. Not sure of the commentable features supported by Adobe Reader as opposed to the full version of Acrobat, but it should create a reasonably well supported PDF file.
A-PDF may do what you want, it's web site claims it can convert office docs into PDF including batch convertion with watching a folder.
Both Office 2007 and OpenOffice can save directly to PDF, so you could automate that process.
However, changing the "document rights" of the PDF to allow commenting is something that only Adobe Acrobat can do. (This is Adobe's way of selling more product). There are other 3rd-party tools out there that claim to be able to do it (google change pdf +"document rights"), but I can't vouch for any of them.
I believe the commentable features are part of the PDF software, and not the file. Adobe Professional will allow to add comments, while the reader has less capabilities.
Hmmm, you can develop your own or just buy it off the shelf. My company (shameless plug) has a product that does server based PDF Conversion for common Office formats and can be invoked via a web service.
Blogged about it here. Making office work reliably on the server (32bit/64bit, Win2K3/Win2K8) is challenging to say the least.

Tools to manipulate doc file and convert them to pdf

I am looking for some good tools (free or paid, though free tool is always preferred)
for doing following operations on word doc files:
Manipulation of doc/docx/text files (like replacing some placeholders with DB values) as well as
converts doc files to .pdf
Because, I will be using this tool in my WCF service library,
So I am looking for a code library and not for a GUI based product.
Please share your experience regarding same.
Thank you!
Aspose has a decent collection of MS Office and PDF manipulation libraries.
Aspose Homepage
On the off chance that you're only looking for PDFs for viewing or archival purposes, you could also setup a PDF print driver and print your office files into a given location using Automation. You could also edit Office files through Automation although this may be tedious.
VSTO would give you access to the save as PDF from the Office applications.
Please see my answer to a related question on SO where I recommend a number of ways to convert your Word document to a format that is more easy to manipulate programmatically (using XSL-FO).

How to convert Word and Excel documents to PDF programmatically?

We are developing a little application that given a directory with PDF files creates a unique PDF file containing all the PDF files in the directory. This is a simple task using iTextSharp. The problem appears if in the directory exist some files like Word documents, or Excel documents.
My question is, is there a way to convert word, excel documents into PDF programmatically? And even better, is this possible without having the office suite installed on the computer running the application?
Office 2007 allows for this. I have found PDFCreator to be good, the VBA is included in sample files, and have heard that CutePDF is also good. PDFCreator and CutePDF are free.
To work without Office, you would need viewers, as far as I know:
http://www.microsoft.com/downloads/details.aspx?FamilyID=c8378bf4-996c-4569-b547-75edbd03aaf0&displaylang=EN
http://www.microsoft.com/downloads/details.aspx?familyid=95E24C87-8732-48D5-8689-AB826E7B8FDF&displaylang=en
I needed to do this myself, but managed to get it done with .Net and without 3rd party tools:
MSDN: Saving Word 2007 Documents to PDF and XPS Formats
Pretty simple, about 50 lines of code. However I think you will need Word 2007 installed on the machine as well as the ability to Save As PDF
To convert Word documents to PDF, take a look at jWordConvert, a java library that can do exactly that. This will not work with the Excel files though, only with the Word files. The language is not Sharp, it's Java but you could switch to use IText (which is java) instead of ITextSharp.
You can also use a component like activePDF's DocConverter to convert a lot formats to PDF.
Use PDF maker that comes with adobe 7- 9
I just used this code Covert Doc to PDF
I'm surprised Aspose wasn't mentioned here, it's easy, simple, and reliable. Downside is that it is not free.
I've used iTextSharp in the past, it's really good, easy to install (one DLL I believe), the merge takes a bit of tindering so it's not as easy to use as Aspose, but hey, it's free so that is the best part.
TallPDF.NET (comes with a hefty price tag) allows you to serve dynamic PDF from any .NET application including ASP.NET pages and web services.
PDFEdit (free and open source) is an editor for manipulating PDF documents. It has a GUI version and a command-line interface. Scripting is used to a great extent in the editor and almost anything can be scripted. It is possible to create your own scripts or plugins.
The most common way to convert files to a pdf is to print them to a pdf printer driver. There are a number of such drivers, one that i know of that will do the job is Black Ice.
Another is to use Adobe Acrobat's SDK. from memory its very expensive.
Its been a while since i have actually done any work with converting pdf's and the landscape may have changed.