Options

Printing barcode with bars of 1.5pixels width

Mathias_HansenMathias_Hansen Member Posts: 4
Hello.
Im trying to make a specific barcode system using a custom-made C# program with Navision.
The problem is, that I need the thin bars to have a with of 1.5pixels???

My solution is to make the bars 3.0pixels and scale the barcode 50% on printing.

Now the question is...
Can I scale the printing from navision?...
Or is there a way I can write a C# program temporarily setting the printer to do this?

Comments

  • Options
    couberpucouberpu Member Posts: 317
    Hello.
    Im trying to make a specific barcode system using a custom-made C# program with Navision.
    The problem is, that I need the thin bars to have a with of 1.5pixels???

    My solution is to make the bars 3.0pixels and scale the barcode 50% on printing.

    Now the question is...
    Can I scale the printing from navision?...
    Or is there a way I can write a C# program temporarily setting the printer to do this?

    Can you use fontsize?
  • Options
    Mathias_HansenMathias_Hansen Member Posts: 4
    ... Do you mean set the fontsize in navision? Yes...
  • Options
    martin2008martin2008 Member Posts: 10
    So it sounds like you're creating a barcode bitmap dynamically and printing it? .NET has a SetResolution(x_dpi, y_dpi) method for the Bitmap class. Did you try it? Set the resolution to 300 x 300, and the total pixel size to x_inches*300 x y_inches*300.
  • Options
    Mathias_HansenMathias_Hansen Member Posts: 4
    Impressive!

    image.SetResolution(###, ###);
    This does the trick!

    I already tried this, but failed because my mind was too set on the 1.5Pixels-problem.
    The width in pixels doesn't change, but the actual width when printing is.

    Thank you sooo much.
  • Options
    hongdidahongdida Member Posts: 1
    I need to enlarge the barcode image so I wonder where I can change the resolution of target created barcode image. :roll:
Sign In or Register to comment.