Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bar Code Printing in Micro Size on Label

mstrcmtr

Programmer
Joined
Nov 14, 2007
Messages
106
Location
PK
Printer Name: 4BARCODE 4B-2054K

Problem: On Bar Code Printer print Bar Code sticker in Micro size

Using the following Code showing okay in Print Preview

Downloaded the Font Code128 and copy in C:\Windows\Fonts Folder

LOCAL lo_Fbc

lo_Fbc = CREATEOBJECT("FoxBarcode")

*-- Object Properties
WITH lo_Fbc

.cFontName = "Arial"

.cSet128 = "*"

.lFontBold = .T.
.nAlignText = 1

.nBarcodeType = 110

*.nFactor = 2

.nFontSize = 10.5
.nImageHeight = 40

.cText = "Code128"
* .cText = "Free3of9"
* .cText = "IDAutomationHC39M Free Version"
* .lShowHumanReadableText = .F.
ENDWITH

ln_Chk_P_No = 1
ln_Chk_Rctngl_Box = 1

CREATE CURSOR Tc_Bar_C_2(Acitno I , PrtNo C(16) , Bar_C_13 C(13) )

INSERT INTO Tc_Bar_C_2 VALUES (42 , '1ARO WATER SWIWW' , '0000000000042' )

SELECT Tc_Bar_C_2

GO TOP IN Tc_Bar_C_2

LABEL FORM Item_Stckr_Qih_038_W_25_H_LO_1.Lbx TO PRINTER PROMPT PREVIEW

CLOSE ALL

CLEAR ALL

RETURN
 
Ok, and what is the problem?
From your description, it is not clear to me whether you want to print in MicroSize or whether your printout is too small.
If the latter, there was a problem with VFP reports and a screen-scaling different from 100%. Check your windows settings.
Also: what is your setting for SET REPORTBEHAVIOR? 80 or 90 ?
And why would you need that FONT128 in your Windows directory? That FoxBarcode class generates the whole image, no need for a special font.
Where are you generating that image with the "loFbc.BarcodeImage(Tc_Bar_c_2.Bar_C_13) " code?

BTW: That "SELECT TC_Bar_C_2" isn't necessary, because you are already focussed on that just created cursor.
That "GO TOP" is also not necessary, since any table-related command without a FOR condition will always start from top.
 
Last edited:
Sorry

I illustrate my problem

Bar Code and other controls all are Printing in a Micro size instead of Normal viewable Size like showing in Print Preview of Label

Using

SET REPORTBEHAVIOR 90

For this
lo_Fbc.BarcodeImage(Tc_Bar_c_2.Bar_C_13)

I have attached label file in which you check command in a Picture/Ole Bound control
with scale contents , retain shape in General Tab of Ole control
 

mstrcmtr:​

  • Do you use VFP 9 or VFP A?

  • What is DPI size (text size in windows - 100%, 120%, 150%, 175% or custom size)?

MartinaJ
 
I am using VFP9 with SP2

attaching a Zip file containing Prg and Label files

Display set to

Scale 100%
Display resolution 1600 * 900
Display Orientation Landscape
 

Attachments

Preview zoomed to 300%:
1751364072937.png

Screenshot of PDF viewer in 300% zoom:
1751364131095.png
Same, same - except a bit of quality difference mainly in the numeric part of the barcode graphic, a bit blurry barcode lines, too. I guess this would be controllable by quality settings of the PDF conversion. I just used the Microsoft Print To PDF for this. But I don't see a general problem like much smaller barcode graphics in the PDF than in preview. Or is it that you want higher barcodes so the frame is fully filled? Then just increase the .nImageHeight to something higher.

Also, try with different printers to see if the problem isn't in your printer settings.
 
Last edited:

Part and Inventory Search

Sponsor

Back
Top