Hi we recently integrated Words for .net into our applications to allow the app to convert uploaded word (and other file types) from word to pdf. This was integrated simply on all SINGLE docs. We have a batch load processor which allows us to process multiple files, typically word docs contained within a zip file (some pdfs will also often be included in any zip file of docs for processing) into the application dbase, usually during the initial new customer data migration phase. We now need to simply integrate aspose into our batch loader to allow us to convert mulitiple docs to pdf as we batch process. Can anyone advise how to do this? and or point us to any user guide or docs with code examples? best regards…
Hi
Thanks for your inquiry. If the input is a ZIP archive that contains bunch of MS Word documents and you need generate output as ZIP archive that contains these documents converted to PDF, then you can easily achieve this.
What you need just unzip the input archive convert each document to PDF and then zip them again. You can use some third-party tool to work with archives (SharpZipLib for example). Using this library, you can extract each document as stream, and then you can open this stream as a Document using Aspose.Words and save into another stream as PDF. After this, you can put PDF streams into new archive and send to the end user.
Best regards,
Alexey
Hi and thank you. This is one simple approach but not what we are seeking. I think I did not make my question very clear. We take files of docs in a zip file and export/process them directly into our application/database using our own batch processor, what we want to do is to integrate aspose into our batch loader app to do this PDF conversion as part of this process in one automated step/process. Not as you suggest which is to convert all files to PDF within the zip create a new zip than batch process them. Is this a beget description?
Any more ideas or pointers to docs or people who have done this?
Kind regards
Hello,
Thank you for your inquiry.
Not quite clear what is the difficulty?
Your loader does not open archives? You load the archive files directly into database? Or you retrieve documents and save them separately?
In the first case you will need to retrieve documents from the archive, as suggested by Alexey. In the second case you can just take a stream and convert it to pdf.
Hi
Thank you for additional information. If what you need is just convert several documents simultaneously in multiple threads, then you can easily achieve this. Aspose.Words is multithread safe as long as only one thread works on a document at a time. It is a typical scenario to have one thread working on one document. Different threads can safely work on different documents at the same time. So you can open and convert each document in the bunch in a separate thread.
Best regards,