| |
   
Morovia.com Home | Fonts | Components | Labeling | Library | Order | Forum
  Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
Barcode ActiveX Control
 Community Forum : Barcode ActiveX Control
Subject Topic: Adjusting barcode size Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
mhelal
Newbie
Newbie


Joined: May 25 2005
Posts: 2
Posted: May 25 2005 at 1:32am | IP Logged Quote mhelal

hello

 

I need to change the size of the picture of the bar code ocx, and it is not allowing me.

mvrBarCode1.Picture.Width and mvrBarCode1.Picture.height seem to be readonly, and they are too big for the bar code of symbology and parameters of my choice, and I need to reprint it on a label sheet, several ones on the same line, and several lines on the page,

 

how can I change the bar code picture size, to be able to print in less space,

 

thank you

Back to Top View mhelal's Profile Search for other posts by mhelal
 
glitch
Admin Group
Admin Group
Avatar

Joined: January 25 2003
Location: Canada
Posts: 280
Posted: May 25 2005 at 7:37am | IP Logged Quote glitch

To adjust the barcode size, set NarrowBarWidth, BarHeight properties (linear barcodes). For PDF417 and DataMatrix barcodes, take a look at PDF417ModuleHeight, PDF417ModuleWidth and DataMatrixModuleSize properties.

Back to Top View glitch's Profile Search for other posts by glitch Visit glitch's Homepage
 
mhelal
Newbie
Newbie


Joined: May 25 2005
Posts: 2
Posted: May 25 2005 at 10:07pm | IP Logged Quote mhelal

Hello,

Thank you for replying, I am using EAN13, and trying the  NarrowBarWidth, BarHeight properties change the sizes of the bar code itself, not the image it draws the barcode inside. So the bar code itself looks smaller inside the size of the picture that is: mvrBarCode1.Picture.Width and mvrBarCode1.Picture.height and has fixed read only sizes

I think these 2 properties are what decide the printing size, because when I print the picture of the bar code, it prints only one bar code image in the page, and I can't print again, as the size from the next x, or y position in the page, exceeds the printer width or height. While the actual printing of the bar code consumed less area within the picture size, and it seems so far that there is no overlapping of the printing of the bar code image,

Like if I print 2 images on the same raw: it looks like that:

X = 1

Y = 1

Printer.PaintPicture MyBarCode.Picture, X, Y

Then the second image should be on

X = X + MyBarCode.Picture.Width

Printer.PaintPicture MyBarCode.Picture, X, Y

and so on, till (X > Printer.ScaleWidth - MyBarCode.Picture.Width), I start new page and reset X and Y as follows

X = 1

Y = Y + MyBarCode.Picture.Height

Printer.PaintPicture MyBarCode.Picture, X, Y

And so on, till (Y > Printer.ScaleHeight - MyBarCode.Picture.Height), I start a new page and reset X and Y as follows

Printer.NewPage

X = 1

Y = 1

Printer.PaintPicture MyBarCode.Picture, X, Y

And so on till I finish all the bar codes I have. this code doesn't work, because the size of the bar picture gets more than the width of the printer after the first one, and I can't print the first bar code in any area away from the top left corner of the page, which is strange.

So, my question is: is it possible to print the bar code images several times on the same page, positioning them where I need on a preformatted label sheet, and if the picture sizes are too big, while the bar code itself is too small within the picture, can I overlap printing over the empty picture space, my testing so far proves that I can not?

Can you please advise, I appreciate your help, thank you,

Manal

 



Edited by mhelal on May 26 2005 at 2:39am
Back to Top View mhelal's Profile Search for other posts by mhelal
 
glitch
Admin Group
Admin Group
Avatar

Joined: January 25 2003
Location: Canada
Posts: 280
Posted: May 26 2005 at 10:22am | IP Logged Quote glitch

Be careful when you use Printer object in Visual Basic.

By default, the Printer object uses Twips scale mode, under which 1 inch is mapped to 1440 units. But the Picture object uses HIMETRIC scale mode, under which 1 unit equals to 1/1000 cm.

Morovia Barcode Activex Gives you option either to use HIMETRIC or HIENGLISH. By default it is HIENGLISH and 1 unit equals to 1/1000 inch.

So if you want the barcode printed from (1 inch, 1 inch) you need to set

X = 1*1440

Y= 1*1440

Now when you print the next barcode, you need adds the TWIPS units:

X = X + Picture.Width*1.44/2.54

Y = Y + Picture.Height*1.44/2.54

Or you can use the properties provided by the Barcode ActiveX (Assuming that you set Measurement to mbxMeasureEnglish)

X = X + myBarcode1.LabelWidth*1.44

Y= Y + myBarcode1.LabelHeight*1.44

Try that and let me know if it works.

Back to Top View glitch's Profile Search for other posts by glitch Visit glitch's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.3457 seconds.