![]() ![]() When you initialize JavaLoader you pass in an array of JAR files. The first thing I want to do is get JavaLoader initialized with the JAR files from POI. I downloaded JavaLoader and extracted the code to a folder named javaloader under my web root.Īlright, so let's look at some code. By using JavaLoader, we can make sure everything comes directly from the JARs in play. ColdFusion itself makes use of POI (you can see a few POI jar files in the lib folder) but the version bundled is older than what we need to use to extra our text. It also helps with another problem - class conflicts. JavaLoader is a much simpler way to handle this. Normally you have to copy new JARs to a specific location under your ColdFusion install and you have to follow this up with a server restart. This code lets you load any random JAR file on the fly. JavaLoader is a ColdFusion project created by Mark Mandel (the creator of Transfer). I copied these to a folder called 'jars' under my web root. I had trouble playing with this so decided to focus on the non-OOXML version.Īfter you download the zip, open up the archive and copy the 3 JAR files you find in the root. For OOXML you can use POI 3.5, which is in beta. I downloaded the latest 3.2 version which provides support for Office formats from the old 97 versions up to the Office 2007 release. Our use of the library will be fairly simple - just reading. This is a set of Java libraries that allow deep integration into Office documents, both reading and writing. Our code will make use of two open source products. You can't ask Verity to make a copy of the complete text. Verity sucks in the text and stores it in it's own format. Now you may ask - doesn't the built in Verity engine do this? It does, but if you have any other need for the text, you are out of luck. You can use this code to allow users to upload Word documents and provide basic search features against the actual contents of the documents. I'll be focusing on retrieving the text of the documents only. NOTE: This method must be placed in front of Split() and Merge().Have you ever needed to get information about Office documents with ColdFusion? In this blog entry I'll talk about how we can use some open source tools along with ColdFusion to read from various types of Microsoft Office documents. Set valid license key to unlock ActiveX DLL. >0 (Greater than zero): Number of pages of pdf document. LONG GetPageCount(String pdfFile, String password) Must be a multiple of 90 degrees (90, 180, -90). RotateDegrees: The number of degrees to rotate the page by. If need rotate all pages, just pass a empty string "". ![]() For example, "1, 3-4, 8", the output pdf will be rotated of the 1, 3, 4, 8 page of inputPdf. RotateRanges: Ranges is defined by page ranges. LONG Rotate(String inputPdf, String Password, String rotateRanges, Integer rotateDegrees, String outputPdf) "1.pdf?1-2|2.pdf?3-4" can be used to merge the 1-2 and 3-4 page of the 1.pdf and 2.pdf. For example, "1.pdf|2.pdf" can be used to merge the two pdf files. For each file, a range can be specified too. The files are separated by character "|". Merge several pdf files into a big pdf file. LONG Merge(String inputPdfs, String outputPdf) 4: The source pdf file could not be read or processed. ![]() 3: Destination directory does not exist. The name could be "output%d".pdf or "%d.pdf", the component will automatically replace the "%d" with the number of output pdf file in those strings. ![]() OutputPdf: output pdf is named with numbers. "1-2,2,3,4,1-4,3-4", the fifth output pdf will be made up of the 1, 2, 3, 4 page of inputPdf. For example, "1,1,1", will generate three pdfs which contains the first page of the inputPdf. Each range of pages will be split into a new output pdf. SplitRanges: Ranges is defined by page ranges. If no password, just pass a empty string "". Split pdf into several PDF files by page range. ISplitMergeLib Interface Reference LONG Split(String inputPdf, String Password, String SplitRanges, String outputPdf) No limits on the number of applications.Royalty-free, Use PDF Split-Merge ActiveX DLL in your applications without needing to pay any royalty fees for distribution.More demos in other languages on request.Support many development languages, such as VB Script, Javascript, Perl, Php, Python, ASP, ASP.Net, VB.Net, C#, VB6, Cold Fusion, Delphi, VC++, Java, etc.Standalone, doesn't depend on Adobe Acrobat or Reader.Rotate PDF pages to 90°, 180°, or 270° degrees.Split PDF files into multiple files by the range specified. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |