Check out this cool site (for Indonesian people).
BookPao adalah persewaan buku di Surabaya dengan konsep subscription/berlangganan,yang berarti bayar sekali setiap bulan dan sewa buku sepuasnya.Untuk informasi lebih lengkap, silahkan masuk ke website BookPao
Tuesday, November 18, 2008
Sunday, September 7, 2008
installing EPSON TM printer in Windows XP using USB to parallel port troubleshooting
It took me almost 3 days to solve this problem.
For background story, I have a EPSON TM-T88IV, and I want to install it to my new EEE Box. My EEE Box doesn't have any LPT port, so I bought a USB to parallel port cable.
I thought it would be as easy as plug and play. Unfortunately, it's not.
I won't tell long story about my struggle finding the solution.
So here's the solution:
- don't connect the printer (I don't know if this step is necessary)
- use WinXP driver (APD304E.exe)
- Install it
- After select module dialog appear, pick TM-T88IV Driver and select Port configuration. Select USB.
- continue install, and restart the computer.
- After restarted, connect the printer. Window will detect TM-P2.01, and want to install driver.
- Just press cancel.
- Open Control Panel -> Printers and Faxes
- Right click on the printer (T88IV) icon, and select properties.
- Select "Ports" tab.
- find the "virtual printer port for USB" in description.
- select it, and click apply.
- Test if the printer really connected to this virtual port. Unplugged the USB-LPT cable, and see printer icon in "Printers and Faxes" window. If it's connected, it should become "offline". and then plug it again, the status will be "ready". If it's not, well you can stop here, because I don't experienced this. If you have more than 1 virtual printer port, you can try it one by one.
- Uncheck "Enable bidirectional support" and "Enable printer pooling".
- Apply again.
- In "General" tab, you can test print. Click on "Print Test Page".
- And there you have it.
For background story, I have a EPSON TM-T88IV, and I want to install it to my new EEE Box. My EEE Box doesn't have any LPT port, so I bought a USB to parallel port cable.
I thought it would be as easy as plug and play. Unfortunately, it's not.
I won't tell long story about my struggle finding the solution.
So here's the solution:
- don't connect the printer (I don't know if this step is necessary)
- use WinXP driver (APD304E.exe)
- Install it
- After select module dialog appear, pick TM-T88IV Driver and select Port configuration. Select USB.
- continue install, and restart the computer.
- After restarted, connect the printer. Window will detect TM-P2.01, and want to install driver.
- Just press cancel.
- Open Control Panel -> Printers and Faxes
- Right click on the printer (T88IV) icon, and select properties.
- Select "Ports" tab.
- find the "virtual printer port for USB" in description.
- select it, and click apply.
- Test if the printer really connected to this virtual port. Unplugged the USB-LPT cable, and see printer icon in "Printers and Faxes" window. If it's connected, it should become "offline". and then plug it again, the status will be "ready". If it's not, well you can stop here, because I don't experienced this. If you have more than 1 virtual printer port, you can try it one by one.
- Uncheck "Enable bidirectional support" and "Enable printer pooling".
- Apply again.
- In "General" tab, you can test print. Click on "Print Test Page".
- And there you have it.
Thursday, June 19, 2008
Code 128 font (barcode) code in C#
I have problem using code128 barcode font.
When I use character 154 (& #154) in html it will be š but in C# its wrong.
š value will be 353 in C#.
So I make table for the character.
here's the codes:
When I use character 154 (& #154) in html it will be š but in C# its wrong.
š value will be 353 in C#.
So I make table for the character.
here's the codes:
readonly static string code128AsciiTable = "€!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~‘’“”•–—˜™š›œ";
private char Code128ToAscii(char c)
{
char res = (char)code128AsciiTable[(int)c];
return res;
}
private char AsciiToCode128(char c)
{
char res = (char)code128AsciiTable.IndexOf(c);
return res;
}
private char Code128CheckSum( string str, char startChar )
{
int result = 0;
for (int i = 0; i < str.Length; ++i)
{
result += (int)str[i] * (i + 1);
}
result += (int)startChar;
result %= 103;
result = Code128ToAscii((char)result);
return (char)result;
}
public string ConvertToCode128Format(string str)
{
char startChar = code128AsciiTable[104];
char stopChar = code128AsciiTable[106];
string convertedStr = "";
for (int i = 0; i < str.Length; ++i)
{
convertedStr += AsciiToCode128(str[i]);
}
char checkSum = Code128CheckSum(convertedStr, (char)104);
string FullConvert = startChar + str + checkSum + stopChar;
return FullConvert;
}
public void Test()
{
string testString = "156461003";
string code128String = ConvertToCode128Format(testString);
}
Subscribe to:
Posts (Atom)