Exporting a barcode and the area it takes.
6 posts • Page 1 of 1
Exporting a barcode and the area it takes.
Hi,
I'm using the demo version of the Barcode ActiveX Control. I can create barcodes no problem but when I export them the file contains lots of white space around the barcode. Can this be removed?
This is the code settings I'm using at the moment:
I have noticed that the options AutoLabelSize and AutoSize appear to have no effect to the output. So I was wondering if this was a restriction of the demo version?
thanks.
Scot.
I'm using the demo version of the Barcode ActiveX Control. I can create barcodes no problem but when I export them the file contains lots of white space around the barcode. Can this be removed?
This is the code settings I'm using at the moment:
- Code: Select all
' Generate a 1D barcode
' -----------------------
Encoder1d.Symbology = 0
Encoder1d.message = " " & testur.Text
Encoder1d.Rotation = 0
Encoder1d.BarHeight = 50
Encoder1d.NarrowBarWidth = 5
Encoder1d.CommentOnTop = False
Encoder1d.CommentMarginTop = 0
Encoder1d.CommentMarginBottom = 0
Encoder1d.CommentMarginLeft = 0
Encoder1d.CommentMarginRight = 0
Encoder1d.RasterImageResolution = 300
Encoder1d.ShowHRText = False
Encoder1d.ShowComment = False
Encoder1d.BearerBars = False
Encoder1d.BorderStyle = 0
Encoder1d.BorderWidth = 0
Encoder1d.AutoSize = True
Encoder1d.AutoLabelSize = True
Encoder1d.Refresh()
lsDest = "c:\temp_barcode\shirls.jpg"
Encoder1d.ExportImage(lsDest, 1)
I have noticed that the options AutoLabelSize and AutoSize appear to have no effect to the output. So I was wondering if this was a restriction of the demo version?
thanks.
Scot.
- shirls
- Posts: 3
- Joined: Thu Sep 25, 2008 10:39 am
Re: Exporting a barcode and the area it takes.
The default white space around the barcode is 100 mils (0.1 inch). You can remove those white spaces by setting all SymbolMarginXXX to 0.
http://mdn.morovia.com/manuals/bax3/sha ... bolMargins
- Code: Select all
Encoder1d.SymbolMarginTop = 0
Encoder1d.SymbolMarginBottom = 0
Encoder1d.SymbolMarginLeft = 0
Encoder1d.SymbolMarginRight = 0
http://mdn.morovia.com/manuals/bax3/sha ... bolMargins
The information above is provided "AS IS", with no warranties, and confers no rights.
-
glitch - Support Engineer
- Posts: 198
- Joined: Wed May 14, 2008 2:42 pm
Re: Exporting a barcode and the area it takes.
thanks. that worked a treat.
I have another query relating to the size of some of the barcodes. I am trying to produce a 2d barcode with several levels of information. I need the barcode as small as possible as I only have a small area to display one in (around: 2.8 CM high and 3.5 / 4 CM long). So far I cannot produce anything small enough to fit in the area.
I know the wording demo adds to the height of the 2d barcodes but is it increasing the length as well?
thanks.
Scot.
I have another query relating to the size of some of the barcodes. I am trying to produce a 2d barcode with several levels of information. I need the barcode as small as possible as I only have a small area to display one in (around: 2.8 CM high and 3.5 / 4 CM long). So far I cannot produce anything small enough to fit in the area.
I know the wording demo adds to the height of the 2d barcodes but is it increasing the length as well?
thanks.
Scot.
- shirls
- Posts: 3
- Joined: Thu Sep 25, 2008 10:39 am
Re: Exporting a barcode and the area it takes.
You did not say which symbology you used. However if you already set it to data matrix. You can decrease the size by:
1. make sure that DataMatrixTargetSizeID = 0;
2. decrease DataMatrixModuleSize (the default is 20 mils).
However, do not expect that you can get much smaller. Generally speaking, data matrix is very good at encoding small amount of data, espcially numeric data.
1. make sure that DataMatrixTargetSizeID = 0;
2. decrease DataMatrixModuleSize (the default is 20 mils).
However, do not expect that you can get much smaller. Generally speaking, data matrix is very good at encoding small amount of data, espcially numeric data.
The information above is provided "AS IS", with no warranties, and confers no rights.
-
glitch - Support Engineer
- Posts: 198
- Joined: Wed May 14, 2008 2:42 pm
Re: Exporting a barcode and the area it takes.
Hi,
Sorry your right I forgot to mention that the 2d type they are interested in is the PDF417. I have been given examples of these barcodes with 4 / 5 levels of information but only measuring (1cm width, 2.5 cm height).
Here's the code I'm using at the moment to generate the 2D barcode. Is there anything else I can do to shrink the size? I've been adjusting the PDFModuleHeight and PDFModuleWidth with different results.
Thanks.
Scot.
Sorry your right I forgot to mention that the 2d type they are interested in is the PDF417. I have been given examples of these barcodes with 4 / 5 levels of information but only measuring (1cm width, 2.5 cm height).
Here's the code I'm using at the moment to generate the 2D barcode. Is there anything else I can do to shrink the size? I've been adjusting the PDFModuleHeight and PDFModuleWidth with different results.
- Code: Select all
' Generate a 2D barcode
' -----------------------
Encoder2d.Symbology = 40
Encoder2d.message = " " & testur.Text & "," & testname.Text & "," & testdob.Text & "," & testsex.Text
Encoder2d.Rotation = 1
Encoder2d.CommentOnTop = False
Encoder2d.CommentMarginTop = 0
Encoder2d.CommentMarginBottom = 0
Encoder2d.CommentMarginLeft = 0
Encoder2d.CommentMarginRight = 0
Encoder2d.RasterImageResolution = 300
Encoder2d.ShowHRText = False
Encoder2d.ShowComment = False
Encoder2d.BearerBars = False
Encoder2d.BorderStyle = 0
Encoder2d.BorderWidth = 0
Encoder2d.SymbolMarginTop = 0
Encoder2d.SymbolMarginBottom = 0
Encoder2d.SymbolMarginLeft = 0
Encoder2d.SymbolMarginRight = 0
Encoder2d.AutoLabelSize = True
Encoder2d.AutoSize = True
Encoder2d.PDFMaxCols = 0
Encoder2d.PDFMaxRows = 0
Encoder2d.PDFPctOverhead = 0
Encoder2d.PDFSecurityLevel = 9
Encoder2d.PDFTruncatedSymbol = 0
Encoder2d.Refresh()
Thanks.
Scot.
- shirls
- Posts: 3
- Joined: Thu Sep 25, 2008 10:39 am
Re: Exporting a barcode and the area it takes.
You can try setting PDFAspectRatio to a smaller value such as 0.2. This makes barcode taller, but the overall size smaller.
The information above is provided "AS IS", with no warranties, and confers no rights.
-
glitch - Support Engineer
- Posts: 198
- Joined: Wed May 14, 2008 2:42 pm
6 posts • Page 1 of 1
Return to Barcode ActiveX Control
Who is online
Users browsing this forum: No registered users and 1 guest