Subscribe to Alvin Poh's Blog by RSS reader
Subscribe to Alvin Poh's Blog by Email
Gadgets, Technology, Public speaking and IT from an undergraduate's perspective.
How To Solve “No available system font while editing PDF in Adobe Acrobat” Problem
If you’ve tried editing PDF documents using Adobe Acrobat (using the Acrobat Touch Up Text Tool), then you’ve most probably come across this problem that says “No available system font”. Bummer.

Now some of you might legitimately have the font when you created the PDF, but might have switched computers, went through an upgrade, or anything of that sort that caused you to not have that particular system font now.
The conventional way was to go out there and buy that font again, so that you edit your PDF document in Adobe Acrobat right? Well — that will work, but it’s not a very scalable solution. Imagine having multiple fonts that you had to buy, or perhaps you only had to edit the document, and having the exact same font didn’t matter at all to you.
That was the problem I faced — the fonts that I used were pretty, but it wasn’t crucial that I continued using them. In fact, I would have been happy with just Arial or even Times New Roman. So the main thing is to get the editing operation to work.
So I gave it some thought, and I realised that I could actually masquerade some fonts as the required fonts by Adobe Acrobat. However, it wasn’t as easy as I thought. I discovered that just changing the font’s filename wouldn’t work, so I searched around this software download site for a solution, and found it in the form of FontCreator, a font software created by High-Logic.
FontCreator is, in essence, a very powerful font-creation tool that even professional typographers and graphic designers use. But it’s simple and user-friendly, and best of all, affordable enough for home users to buy.
The font editor allows you to easily select and modify the entire character set of any TrueType® font and fonts based on OpenType® font technology. You can even convert images to outlines! I tried scanning in my signature, and made a font with my own signature. Then I tried the same process with my handwriting! So now I can select “My Handwriting” as the font in any application (such as Microsoft Word), and have my documents written in my signature, digitally!
Most importantly though, it allowed me to edit the property of an existing font. So I made a copy of an existing font in my system (I can’t remember which!), and then used FontCreator to change the name of the font to the one that was embedded in my PDF document. Next, I opened up Adobe Acrobat again to edit my font, and viola! IT WORKED.
So if you’re looking for a long-term solution that’s infinitely more scalable than always having to buy individual fonts again and again, try out FontCreator. It’s a great piece of software to add to your collection, and you get to have added functionality like creating a customised font to mimic your handwriting!
Update: Ah! I found a coupon for 10% off…but only after I made my purchase!
If anyone wants the 10% discount coupon for FontCreator, it’s “VGHK-D515″ (without the quotes).
Subscribe to my blog:
RSS reader
Email
Recursively Delete Selected Files or Folders In Windows
I was looking around for a way to recursively delete files and folders of a specific name in Windows. For example, imagine having “/folderA/folderB/file1.doc” and “/folderA/folderC/file1.doc”, and I wanted to remove all instances of file1.doc. Now imagine this file1.doc being presented in hundreds of folders. Deleting each file manually would drive anyone crazy.
I know Unix has a more powerful commandline interface, so operations like this should be a snap, but I was certain Windows had a similar functionality too. So I went about searching for a simple solution to do so. I was so intent on finding a simple batch file or DOS command that would do the recursive delete that I didn’t think of anything else until it suddenly slammed into me like a bullet train.
I could just use the search function in Windows! Yes that’s right — the normal Windows search is already a powerful enough function that accepts wildcards and does recursive searching. So I went to Windows search, specified my folder, and put in my filename. Sure enough, all the hundred or more instances of that file popped up almost instantly. From there it was just a matter of selecting all of them and deleting them. Everything took less than 10 seconds!
Subscribe to my blog:
RSS reader
Email
How to Learn and Use Regular Expressions (Regex)
Whoever would have thought that something that looks like gibberish would actually have such powerful usages. Look at this example:
\d\d[/]\d\d[/]\d\d[ ][-][ ]
Would you believe that it’s actually an expression that matches anything of the format of “12/06/08″? Amazing.
I’ve been putting off learning about regular expressions (regex) for the longest time because it seems overly complicated — but I was forced to learn more about it after a recent application demanded of it. And boy was I glad to have finally jumped into it — it’s simply one of the best ways to search for any text pattern.
With regular expressions, you can search for any number of characters, specify whether it’s a number or letter, and even specify a range, like only accept alphabets between B and E. Or only numbers from 1-5.
So if you think about it, the sample regular expression string up there can actually be improved upon. For instance, since the date format is dd/mm/yy, we know that dd can go higher than 31, nor can it go lower than 1. And similarly, we know that for mm, it’s between 01 to 12. The tricky part is yy, because it can vary, depending on how you’re going to use this date. If your application’s more geared towards the future, then keeping the first digit to 0 or 1, and the 2nd digit from 0 to 9 should be just fine.
So as you can see, if you’re a developer, then regular expressions (regex) should be something that you are very familiar and comfortable with, because it makes your life so much easier!
Subscribe to my blog:
RSS reader
Email
How do I create and remove a symbolic link?
I was fiddling around with symbolic links in my unix box and realised how cool they were. Basically symbolic links (or symlinks) create a virtual copy of the master file. This virtual copy has almost 100% of the master’s functionalities and characteristics (you’ll need to play around with the owner and file permissions sometimes though), and the really good thing about symlinks is that if you update the master files, your symlinks automatically get updated too!
Here’s the Code for Creating a Symbolic Link (Symlink)
ln -s [TARGET DIRECTORY OR FILE] ./[SHORTCUT]
For example:
ln -s /home/user/public_html ./user
This points a symbolic link “./user” to /home/user/public_html”. If you want to create symlinks to the directory’s contents instead, add an asterisk to the end, like so “directory/*”. That will tell Unix to create the symbolic links to point to everything contained in the folder.
Here’s the Code for Removing or Deleting a Symbolic Link (Symlink)
rm directory
You can also use unlink, like this:
unlink directory
One thing I’ve realised is that you shouldn’t leave a trailing slash, because that denotes that the target is a directory, and Unix will complain.
Subscribe to my blog:
RSS reader
Email
How To Resolve 500 Internal Server Error
The part about developing applications that I hate most is the troubleshooting part because it is the most tedious and the largest timesink. Unhelpful error messages and a lack of logs make it worse. If you develop applications then one of the first things you’d want to do is to have a proper logging system because only then will you be really able to track down what went wrong and fix it.
The worst kind of errors are those generic errors, which don’t even tell you what sort-of went wrong. No line numbers, no exception triggered in particular, etc. If you miss out a curly brace in JSP for instance, you get a try-catch exception error that will totally veer your troubleshooting efforts in the wrong direction unless you’re pretty clear with your code.
Speaking about web applications, the 500 Internal Server Error is a dreaded error message too.
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server administrator, webmaster@yourdomain.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
If you get a 500 Internal Server Error, don’t go poking around your source code as yet. It might be something else, like a misconfigured web server, or simply the wrong file permissions, or the wrong web user or file owner. That’s what happened to me — I spent a good 15 minute or so looking through the file’s sourcecode before it hit me that it could be something else entirely.
I should have thought about that earlier because nothing changed, code-wise. It turned out that the folder that the script resided in had the wrong user/owner assigned. So I deleted that folder, and used FTP to reupload it, and viola — it works!
Subscribe to my blog:
RSS reader
Email
Recursively Delete Files and Retain Folders in Windows
I was trying to delete all files in the current directory and all subdirectories, while keeping the directory structure intact. I found that I could use the following DOS command to recursively delete files, and NOT touch the directories:
ending in .doc
del /s *.doc
Do note though, that ALL files with the extension doc will be deleted. You can change .doc to something else, .mp3 .pdf .wav .am .rm .txt, it’s all up to you. If you require confirmation before deleting, you can have the del command prompt for confirmation before deleting each file by modifying the command slightly:
del /s /p *.doc
Subscribe to my blog:
RSS reader
Email
Bookmark Bridge Review and Screenshot

I use both Firefox and Internet Explorer, and one of the pet peeves that I have is that both of them don’t share bookmarks / favourites. This is a problem because when I save a site in Firefox, I want to be able to access it in Internet Explorer and vice versa.
Well, here’s the solution, it’s called Bookmark Bridge, and what it does is that it syncs the bookmarks between Firefox and IE. Very straightforward application, and does what it’s supposed to do perfectly!
Visit the Bookmark Bridge website, it’s open-source software that runs on Linux and Windows!
Subscribe to my blog:
RSS reader
Email
17 Feb 08 | 


