hazelchaz: (Default)
[personal profile] hazelchaz
I just whipped up a little program to take care of a little detail that's been bothering me... It goes something like this.

I've got a nifty color sign that I've printed up for my room party at the convention I'm going to. I left a place blank to write in the room number as soon as I learn what it is.

But wouldn't it be nice if I could have the room number printed there too?

I could bring along a portable printer; I'll start doing that for the Fan Gallery one of these days. If I had a printer with me I could print my signs on-site.

But that's a risky chance to take -- what if something goes wrong with the printer setup? I don't want to be stuck with some blank paper instead of signs that I could finish with a black Sharpie marker.

I could bring along the ones with the space for the number, and use the printer to fill in the number. But how will I get the number to print in exactly the right place?

So what I've done -- using the immensely handy C library GD and a little tool I whipped up myself -- is create a grid to determine where to locate the number, then tell my little program to print the number in exactly that spot on the page.

It's pretty slick -- it scales the point size up or down to neatly fit the space, it can use a font I specify (or defaults to Arial Black). And the really cool thing, in my book, is that I don't need to measure carefully with a ruler and then hope that my printout faithfully goes to the right place. All I have to do is print the reference grid with the same print setup I'd use to overprint the number, and it'll always line up where it should...

Well, I thought it was cool, anyhow. I'm considering making it a CGI program on my server that'll let you generate the overlay number output -- would any of you have a use for that kind of thing?

Date: 2005-12-10 03:38 pm (UTC)
From: [identity profile] drakkenfyre.livejournal.com
That is way cool. I think that they overlay is a great idea, although I would personally never have a use for it.

Profile

hazelchaz: (Default)
Chaz Boston Baden

June 2019

S M T W T F S
      1
2345678
9101112131415
16171819202122
23 242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Apr. 30th, 2026 05:05 pm
Powered by Dreamwidth Studios