Results 1 to 2 of 2

Thread: Barcode Aspect Ratio and Positioning Help

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2001
    Location
    Miami, Florida
    Posts
    161

    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:
    1. Sub PAYMENT_BAR_CODE()
    2.     '--- PAYMENT BAR CODE
    3.     Dim n As Integer
    4.     PaymentBarCodeFontName = "C39HrP24DhTt"
    5.     If Not installedFont(PaymentBarCodeFontName) Then
    6.          MsgBox "Payment Bar Code font not installed!" & vbCrLf & vbCrLf & getMsg("Payment Bar Code"), vbCritical, PaymentBarCodeFontName
    7.          End
    8.     End If
    9.     Printer.FontName = PaymentBarCodeFontName
    10.     Printer.FontSize = 36
    11.     Call PrintTxt(X, Y, getPaymentBarCode)
    12.     Printer.FontName = sFontName  
    13.     Printer.FontSize = iFontSize
    14. End Sub


    VB Code:
    1. Function getPaymentBarCode() As String
    2. getPaymentBarCode = "*" & Trim$(UCase$(rsBillPrint!AcctNum)) _
    3.     & Format$(Replace(rsBillPrint!newtotaldue, ".", ""), "000000") & "*"
    4. End Function

  2. #2
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370
    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
  •  



Click Here to Expand Forum to Full Width