Monday, September 10, 2012

Concatenating PDF files using Windows Shell Add-ons

I was tasked with finding a good utility that would allow me to highlight a number of PDF files in the Windows Explorer, and then right-click to concatenate (combine) the files together to form one large PDF file.

PDFTk, the PDF toolkit, does this very well from the command line; however, the prospect of using a command-line tool is daunting to the average user.

I found a FANTASTIC tool called pdftk4all. It functions as a very easy-to-use front end to pdftk. Plus, it integrates a plethora of common features into a series of logical, easy-to-use contextual menus. As a programmer, one of the best features of this program is that its source code includes a very simple example of how to create cascading contextual menus for the Windows Explorer shell.

As best I can tell, there is truly no reason to purchase Adobe Acrobat.

Thank you to Maarten Veerman for PDFTK4ALL!

Sunday, September 9, 2012

A requiem for SharedCopy

The Internet did not shed a single tear this week at the demise of one of my favorite websites. I found Chew Choon Keat's SharedCopy to be incredibly useful, but it is now dead -- the website has disappeared, without a trace. I've scoured the search engines looking for information about the fate of, but nobody has said a peep. Along with the death of this website comes the disappearance of any information that I had saved using their excellent web annotation software.

This is yet another argument for using locally-developed, open-source tools to manage your own data, rather than using "the cloud." When will I learn?

Saturday, September 8, 2012

Getting spellchecking to work in LibreOffice / FreeBSD

I recently recompiled the LibreOffice port in FreeBSD and discovered that spell checking was not working. I installed textproc/en-hunspell and textproc/en-aspell and all was well.

PC-BSD 9 -> FreeBSD Notes

I've been using PC-BSD 9 for a while, and I got sick of having only PBI (push-button installer) software installed, opting for a more traditional BSD experience of dependency hell. Here are a few tips for the uninitiated (notes for noobs) -- to help you get away from PC-BSD PBI updates and into FreeBSD source-centric happiness.
  1. Use portmaster to upgrade packages. It's really the way to go. In order to get portmaster, you can use the command: portupgrade -PN portmaster
  2. The first time you upgrade your packages, browse /usr/ports/UPDATING. When you update your packages, this is the first place to look when something doesn't compile. After you finish with your update, NOTE THE DATE OF THE UPDATE somewhere. That way, the next time you upgrade packages, you don't have to look through the entire /usr/ports/UPDATING file.
  3. Accelerate your life. Tell FreeBSD to find and use the fastest mirror site:
    1. portmaster ports-mgmt/fastest_sites
    2. /usr/local/bin/fastest_sites > /usr/local/etc/ports_sites.conf
    3. echo '.include "/usr/local/etc/ports_sites.conf"' >> /etc/make.conf
  4. PERL updates are funky. When updating PERL, you'll need to update the many PERL packages that are already installed on your system. The p5-XML-SAX- packages are temperamental because p5-XML-SAX-Expat modifies a file that is contained in p5-XML-Parser. I haven't bothered to understand the problem well enough to write a definitive tutorial here. You'll also need to update all p5- ports, as well as print/foomatic-db-engine because it, too, contains a PERL package.

  5. Make your fonts pretty. Everyone uses LCDs these days, so go download some patches to better support your eyeballs. The patches at allow FreeBSD to use subpixel antialiasing. The only port that I needed to patch in order to make both Firefox and LibreOffice look beautiful was the freetype2 package.
  6. Update your kernel for the latest fixes. If you decide to update your kernel (at this point, there are lots of bugfixes in 9-STABLE), try SVN: 
    1. svn checkout svn:// /usr/STABLE
    2. mv /usr/src /usr/RELEASE
    3. ln -s /usr/STABLE /usr/src
  7. Do all your configs at once. When using the Makefiles in /usr/ports/..., all you need to do is make config-recursive. portmaster apparently does this by default; I haven't yet figured out how to cause the tool to prompt with all of the configs (maybe using the -P option has something to do with this).