|
-
Sep 9th, 2002, 10:02 AM
#1
Thread Starter
Addicted Member
Barcode Aspect Ratio and Positioning Help
Hello everyone out there, I need a bit of help. I'm having a problem with barcode ASPECT RATIO, POSITIONING on HP printer and CPI. A lot of things to start with. :-)
These are the requirements:
* BARCODE 1/4" from bottom of form
* ASPECT RATIO should be 3 to 1
* Characters per inch should be 6
If anyone has worked with HP printers you cannot print lower than 1/4". The positioning of the barcode is a bit too high. The barcode (not the numeric value of the barcode) should be 1/4". Any suggestions? Can I invert the numeric value to be placed on top instead of buttom so that I can print the barcode at 1/4"?
Any suggestions and sample would be greatly appreciated, thanks.
VB Code:
Sub PAYMENT_BAR_CODE()
'--- PAYMENT BAR CODE
Dim n As Integer
PaymentBarCodeFontName = "C39HrP24DhTt"
If Not installedFont(PaymentBarCodeFontName) Then
MsgBox "Payment Bar Code font not installed!" & vbCrLf & vbCrLf & getMsg("Payment Bar Code"), vbCritical, PaymentBarCodeFontName
End
End If
Printer.FontName = PaymentBarCodeFontName
Printer.FontSize = 36
Call PrintTxt(X, Y, getPaymentBarCode)
Printer.FontName = sFontName
Printer.FontSize = iFontSize
End Sub
VB Code:
Function getPaymentBarCode() As String
getPaymentBarCode = "*" & Trim$(UCase$(rsBillPrint!AcctNum)) _
& Format$(Replace(rsBillPrint!newtotaldue, ".", ""), "000000") & "*"
End Function
-
Sep 9th, 2002, 10:56 AM
#2
Frenzied Member
What barcode font are you using? Usually you can get two flavors of a given font - one with letter/numbers at the bottom, one without.
Get the one without - it may have come with the original font distirbution. Or the numbers may be coming from a TSR (terminate & stay resident) bit of code provided by the makers of the font. WASP does this. The TSR handles checksums and does the underprinting. Check your documentation.
Then you'll have to manually print the numeric values directly above the font.
The aspect ratio is an internal font property - kerning mostly.
You have to use a font editor to create a new .ttf file. We use Macromedia Fontographer. You can also print to a hidden pictureBox using the DrawText api, then use stretchBLt to squish the result. Then use BitBlt to send the output to the printer.
Since BitBlt will take a sub-rectangle of the source, you can use it to whack off the numbers at the bottom, as well.
Take your pick.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|