Wednesday, January 25, 2006

3rd Party Java API

PDFBox [pdfbox.org] - A library that gives you complete parsing control over PDFs. You can create documents from scratch, extract text, merge pages, change text/images/fields, populate forms, etc. With the use of PDFs in corporate environments on the rise, you just can't go wrong with PDFBox in your toolbox.

>> PDFBox does not scale, it's horrible for server applications that need high load. PDFBox is also a memory hog trying to scale images. I know this cause' I built a massive image processing server and get SLAMMED from using PDFBox during high load. I moved to a System.process ImageMagick native solution to solve this problem.
------------------------------
POI [apache.org] - Does your company use Office documents in any way, shape, or form? Then you need POI. Create spreadsheets and word documents from scratch, modify existing documents, create spreadsheet computers and reports on the fly. The possibiliies are endless, and your boss with thank you for not having to deaL with ANOTHER CSV file.
------------------------------
Is there a way to get a list of windows printers without using native calls?

Look up javax.print.PrintServiceLookup. More Info [sun.com].

Is there a way to print "straight through" to local or network connected printers in Java?

I haven't tried it, but supposedly you can change the DocFlavor to do what you want. In absence of a forced flavor, the system will auto-select the best method.

Is there a way for a java app to trap keypresses when the java app is out of focus, without using a native interface?

No. This is a huge security issue, and is unlikely to ever be included in Java. However, the java.awt.Robot class lets you do stuff like capture a screenshot, send events, etc.
------------------------------

Tuesday, January 03, 2006

Excel Tips

Entering Dates

To enter today's date in a cell of your Excel spreadsheet just hold the CTRL key and press ; to enter the time CTRL/SHIFT and press :

If you want the day's date to appear and change each time you open your spreadsheet, use the formula =now() formatting the cell to show a date. If you format the cell to show a time, it will show the time when the workbook was last opened.



Inserting/Deleting Rows

You can delete a row or column quickly in Excel. Select the row or column you wish to delete or use Shift [Space] to select an entire row; use CTRL [Space] to select an entire column. After selecting a row or column, use CTRL [-] to delete a row or column quickly.

To Insert a row or column, after selecting a row or column, use CTRL [+].

About Creating custom windows installation disks

This is from this /. discussion:
-----------------
Some of the time thats the fault of the OEM's. Some even come with (spy|crap)ware out of the box ffs. A friend of mine recently bought a cheap OEM machine which had SP2 installed just fine, but not a single hotfix since. Spybot S&D found several (albeit minor) issues straight away.

Worse still is most OEM's give you a rubbish recovery disc that restores this poor condition, with no Windows disc to be found. (I always use Magic Jelly Bean's keyfinder [magicaljellybean.com], to find the CDKEY used by the OEM, and burn off an XP OEM disc myself, with SP2 and all the post-SP2 hotfixes slipsteamed using nLite [nliteos.com]. For my friend I also made his disc as unattended as possible and included some useful batch files and drivers)