We put these in a small clear plastic wallet attached to the routers we ship.
They contain the login details for the line, the router and wifi. We have gone for a single sided design this time.
This should have been a simple job!
First off, I thought why not include a 2D bar code that has the WiFi connection details. It seems many phones will now read these and pick up the SSID and password from them. I already have an IEC16022 (Datamatrix) encoding app I wrote many years ago. Simples!
Except it turns out the code has a bug. Even though published long ago and used by many people, it does not code EDIFACT correctly. In the case of the upper case characters and punctuation used in the WiFi password data, EDIFACT was the best coding, and it just made gibberish. So that wasted an hour or so fixing it.
The rest was easy, but when I had finished some bright spark (Steve, I think) suggested that we could put a union flag on the card as it is the jubilee. Fair enough. How hard can it be?
Uncharacteristically, as it was a gimmick and cosmetic, I just made something that looked like the union flag. Of course, and quite rightly, I was immediately slated for this by the denizens of irc. Sorry everyone... What was I thinking?
So I went off and found the 2:1 ratio union flag design, and put that on. It kept them happy. However, I thought I should dig a bit deeper. Thanks to this site.
Interestingly the union flag design is specified in such a way as to allow any ratio of flag, even square. I never knew this, but it is not just one design that you stretch to fit. It is different when drawn in different ratios. In the case of this card the ratio is not 2:1 (or 3:2 or 5:3 or one of the common variants) but was around 200:127 as that is the space I had. Actually the ratio is dependent on the left margin I set, and can be changed easily in the design now.
All of the sizes are based on the height (or as I believe it is called, the width where what we would call width is the length). The top to bottom distance, OK!
Postscript is really good at this stuff, and makes it very easy.
First, we define w and h as width and height, and make some derived values. d is diagonal distance; a is angle of diagonal; u is a unit which is 1/30th of the height h.
/a h w atan def
/u h 30 div def
We make the rectangular area as a clip area for the drawing:
0 0 102 256 div setrgbcolor % blue
Then the white diagonal cross which is 6 units thick and from corner to corner:
0 0 moveto w h lineto 0 h moveto w 0 lineto
u 6 mul setlinewidth stroke
Then the thin red diagonals which are 2 units thick. We need to rotate to do this right:
u 2 mul setlinewidth
gsave a rotate 0 u neg moveto d 2 div 0 rlineto 0 u 2 mul rmoveto d 2 div 0 rlineto stroke grestore
gsave 0 h translate a neg rotate 0 u neg moveto d 2 div 0 rlineto 0 u 2 mul rmoveto d 2 div 0 rlineto stroke grestore
Then the England cross white border:
w 2 div 0 moveto 0 h rlineto 0 h 2 div moveto w 0 rlineto
gsave 1 setgray u 10 mul setlinewidth stroke grestore
And finally the red cross (we gsaved it above):
u 6 mul setlinewidth stroke
Job done. Flag poll assumed on left.
Oh, and add some text to explain why on earth we have but a flag on there in the first place :-)
Note: You probably want to wrap this all in a function with gsave/grestore, etc.
And in different ratios, it looks like: