Bohemian Blog

  1. About This Blog
  2. Archives
  3. Download Artwork
  4. Home

Archive for the 'Linux' Category

Create and Manage Professional Letters with OpenOffice and PDFTK

Friday, November 30th, 2007

I have slowly been learning the ropes of professional presentation for my freelance work. Design school taught me a thing or two about designing letterhead and the importance of looking professional and organized (sort of like flexing your muscles before a wrestling match). However, they certainly didn’t teach anybody how to actually put those designs into use in an organized workflow. Word-processing programs were the devil. As a result of their design program zealotry I have a lot of resumes, cover letters and general business letters that are Pagemaker, InDesign, QuarkXpress and Illustrator files. This isn’t what these programs were built to do.

These programs were built for carefully typesetting layouts

This problem makes the process of writing a letter too complex. I know what you’re saying. You think I’m lazy. You’re wrong. I have great powers of determination and focus, but usually I get distracted by details. Suddenly I’m typesetting a bill and not just writing up a bill. Before I know it I’ve shot the afternoon twiddling with letter-spacing on a 6 hour project billing.

The solution to this ease of distraction is to use the right program for the task at hand. A word-processor is a powerful tool and can save you a lot of time without compromising your concern for appearances. How do they save me time?

  1. Page Templates
  2. Style Sheets

“But my layout program has that and MORE!”, you say. Well, that’s my point. You don’t need more to write letters.

WYSIWYM

One of the cool ideas I came across in my Linux/Open-source self-education is the acronym ‘WYSIWYM’. We’re all familiar with WYSIWYG (What You See Is What You Get) and that applies to all of our layout and common word processing programs. WYSIWYM stands for ‘What You See Is What You Mean’. A subtle but important difference.

The program that is most popularly associated with this concept is called TeX (pronounced ‘tek’). If you’re interested in the history, check out Wikipedia. My introduction to TeX was actually through another program called LaTeX which simplifies the creation of TeX markup. In LaTeX you simply see the text with no formatting. All you see is a definition of document structure to the left of your content (this line is a Headline 1 format, that line is a blockquote). No nitpicking about what font and linespacing. Unfortunately, this program had a big learning curve and I don’t recommend it for most people. Plus, when it came to printing and generating PDFs I ran into a lot of missing elements that needed to be installed separately. Not easy to setup.

Okay, so, what’s that have to do with using a word-processor? Well, you can use a w-p in the same way via style sheets. Here’s what you do:

  1. Take an afternoon to design your letterhead in your layout program of choice.
  2. Figure out what the margins on your letter have to be to fit your letterhead format.
  3. Save a pdf of your letterhead design as though you were printing blank letterhead.
  4. Open a new document in OpenOffice (or MSWord if you must…) and set the margins accordingly.
  5. Now type out some example copy or use an existing letter to work out your stylesheet.
  6. Design all the styled elements that you foresee using in your letters. Take your time. Get the after-paragraph-spacing and typefaces all figured out so that it looks beautiful. Make sure that you are using the ‘Styles and Formatting’ palette or window and modifying those elements with your changes.
  7. Delete your test content and save this document as a TEMPLATE somewhere handy.
  8. Every time you want to right a letter just open a new document from this template and write your letter with a WYSIWYM state of mind using your preset styles

Now your letterhead is one file and all of your little letters, bills and requests can be saved in simple word-processor files. If you’re especially concerned about future-proofing your letters, check out OpenOffice and the Open Document Formats. From Wikipedia:

OpenDocument benefits from separation of concerns by separating the content, styles, metadata and application settings into four separate XML files.

So, worst case scenario: after the demise of OpenOffice twenty years from now you are left with an ISO-standard document format that will most likely be supported by any respectable word-processing program that exists at the time.

Actually, even worse: ODF isn’t supported at all so you are left with the option of opening the XML file containing only the basic text content of your letter which you will have to reformat.

Either way what’s the chance of your InDesign CS3 binary format file being accessible that far in the future? Good luck trying to pull the plain text content of your letter out of a binary file!

Merging the Letter with the Letterhead

On Linux there is a great command line program called ‘PDFTK’ or the PDF Took Kit. It does some cool things but my only use for it right now is to merge our Letterhead.pdf with our LetterToBob.pdf. It’s simple as pie, but I want to look into creating a simple GUI for it. A little dialog window can’t be that difficult to program, can it? :D

First install PDFTK via Apt-Get or Synaptic if you are on a Debian-based Linux distribution. Otherwise, get on Google and look into getting it. Sorry for the lack of support at this stage.

Once you have it installed, open a terminal window. For this example I am going to save my two PDFs to my desktop and then use PDFTK to merge them from there.

Go back to the Terminal, change to your Desktop directory (cd ~/Desktop if you don’t know) and type the following:

pdftk LetterToBob.pdf background Letterhead.pdf output LetterOnLetterhead.pdf

Break It Down!:

  1. First tell the terminal which program to use
  2. Specify your original PDF document by filename
  3. ‘background’ specifies the function of PDFTK to use
  4. Specify the background PDF document by filename
  5. ‘output’ tells the program what to name the product of the indicated action
  6. Specify the filename for the product of the PDFTK background action

Click enter and you will have a new PDF named ‘LetterOnLetterhead.pdf’ on your desktop shortly.

I don’t know, but I can only hope that Adobe Acrobat Professional can also merge PDFs in this way.

Now you have a professional letter on your own custom letterhead in PDF format for emailing or printing. The ODF files are simple to keep organized and your letter head is easy to keep track of on one layout file. This could be accomplished with layout tools as well, but this is how I do it and thought other people might benefit from hearing about it.

Find IP Address of a Website in Terminal

Thursday, October 18th, 2007

Here’s the magic word: nslookup

And here’s how to use it:

jasonG5:~ jason$ nslookup www.bohemianalps.com

after pressing ‘enter’ you will get feedback like this:

Non-authoritative answer:
Name: www.bohemianalps.com
Address: 12.34.56.78

Smultron Line-Ending Joke for Nerds

Monday, July 16th, 2007

Win line ending vs. *NIX line ending

On the left is the line-ending definition preference for Notepad2 on Windows and on the right is the line-ending preference for my favorite OSX text editor: Smultron. Pretty funny little detail I have overlooked ’til now. Enjoy.

Logitech MX310 and Ubuntu

Saturday, May 5th, 2007

Logitech MX310 Button Map

I spent some time setting up my Logitech MX310 mouse to work with Ubuntu and Beryl. The Beryl Settings Manager provides an amazing amount of customization IF you can find what you are looking for. Beryl is making a lot of progress in the interface, but it’s a very complicated mechanism they’ve built and there really isn’t any way to simplify it. So you simply have to get your hands dirty. However, I am hoping this post can help you out. With a little help, your MX310 will be invoking Beryl’s Window Picker (a lot like Expose in OSX) with the click of a button.

First, you have to know which button is which. My little drawing on the right illustrates how my system sees the MX310 buttons. This may be different for you depending on your X configuration. I can’t recall customizing my setup, so I’m hoping I have a default configuration. Note that the very top button and the scroll-wheel-click register as the same button. :(

Second, you have to go to the Beryl Settings Manager. I would start with disabling a few default settings that simply have no purpose and only create confusion when they are accidently invoked: Window Opacity and Window Saturation. It’s cool what Beryl can do with these features to create feedback, but being able to see the window below my active window via transparency is perfectly worthless. Let’s get started:

  1. Open Beryl Settings Manager
  2. Go to:
    General Options/ Shortcuts/ Keyboard and Mouse/ General Options/ Bindings.

    Increase Opacity Disable
    Decrease Opacity Disable
    Increase Saturation Disable
    Decrease Saturation Disable
    Hide All Windows And Focus Desktop <Control>Button2
  3. Go to:
    General Options/ Shortcuts/ Keyboard and Mouse/ Scale/ Bindings.

    Initiate Window Picker for All Workspaces Button2
  4. Congratulations You’re Set!

Let me know if this was helpful or if you have discovered a different configuration.

 

Beryl: OSX Exposé for Linux and a Whole Lot More

Saturday, March 31st, 2007

I posted a while back about ‘Skippy’ for acquiring that OSX Expose goodness in Linux. Well, since then I’ve had the luxury of using Beryl for about a month. It’s got a few bugs since it’s still developing, but very usable. Some of it is just eye candy, but things like the minimization of all of my active windows so I can find the one I’m looking for is very helpful. I use Expose a lot at work on OSX 10.4 and so having it at home makes for excellent consistency. Here’s a great video of every feature I can think of:

Beryl on Ubuntu via YouTube

And here a few screenshots from my desktop.

Application Switcher
Beryl-AppSwitch

Expose-ish
Beryl-Expose

Desktop Cube
Beryl-Cube

I hope you enjoy the pictures. I’m certainly enjoying the experience.