Printing Barcode

This forum is for eXpress++ general support.
Post Reply
Message
Author
omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Printing Barcode

#1 Post by omni »

Roger,

A user changed servers and now his barcodes do not print. Printed yesterday. and I cannot remember how to set it up.

The code is as follows.

@ln+1,62 dcprint say bPronum FONT '30.Free 3 of 9 Extended'

I thought they needed the fre30f9x.tff file, but if I delete that out of my folder here the barcode still prints, to its apparenly something else.
He also says that file was not in his folder on old server.

My memory is swiss cheese

Any help is appreciated.

Fred
Omni

Wolfgang Ciriack
Posts: 479
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: Printing Barcode

#2 Post by Wolfgang Ciriack »

You have to copy the ttf file in the windows font folder.
_______________________
Best Regards
Wolfgang

omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Re: Printing Barcode

#3 Post by omni »

I told him that also...will get him to retry that.

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: Printing Barcode

#4 Post by Cliff Wiernik »

Plus you often have to make certain it is installed there. This registers it. You can access the fonts information inside something like word that will also make certain it is registered as sometimes I have seen just copying not be sufficient.

Cliff

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Printing Barcode

#5 Post by c-tec »

Hello,
maybe this can help
regards
Rudolf

Code: Select all

function installfont(cFont,lSilent)
******************************************************************
local cFontFile,lUpdate := .f. ,cRet
local cWinFontfile
default lSilent to .f.
if !".ttf" $ cFont
     cFont += ".ttf"
endif
cFontFile    := addpath(al_path,"\fonts\" + cFont)              // font in program folder
cWinFontfile := addpath(getenv("SystemRoot"),"fonts\" + cFont)  // font in Windows font folder

if !fexists(cFontFile) .and. !lSilent
     toastmsg("Font " + cFOntFIle + " not found !")
     return .f.
endif
if !comparefiles(cFontFile,cWinFontfile)
     filecopy(cFontFile,cWinFontfile)
     lUpdate := .t.
endif
cReg := dc_regquery(,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts",cFont + " Plain (TrueType)")
if empty(cReg) .and. fexists(cWinFontfile)
     dc_regwrite(,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts",cFont + " Plain (TrueType)",cFont)
     lUpdate := .t.
endif
cReg := dc_regquery(,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts",cFont + " Plain (TrueType)")
if lUpdate
     DllCall("GDI32.DLL", DLL_STDCALL, "AddFontResourceA", cFont )
endif
return !empty(cReg) .and. fexists(cWinFontfile)
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Printing Barcode

#6 Post by skiman »

Hi,

The easiest way is to instal the font every time at startup. This is very fast, and I do it in a separate thread at startup of my application.

I install all the fonts I need. Since I added this to my application, I never had any problem with 'missing' fonts after one of my customers had a new pc.

Code: Select all

function installfonts()
*************************
Local aList := directory(".\fonts\*.ttf")
Local i , cFont , cPath:=amain(5,2) 
for i := 1 to len(aList)
	cFont := cPath+'\fonts\'+aList[i][F_NAME]
	DllCall("GDI32.DLL", DLL_STDCALL, "AddFontResourceA", cFont )
next
return nil
Best regards,

Chris.
www.aboservice.be

Post Reply