• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Help !!!!!!!!! java print program

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am writing a java print program where i need to print in MICR
(Magnetic Ink Character Reconginition ) E13B fonts.I was succesful in
printing most common fonts (TimesRoman ,Courier ) etc using
Font f = new Font("Courier",Font.PLAIN,10) ; g.setFont(f) ;
Similarly while trying for MICR Fonts its printing the default fonts
only.
** MICR Fonts is installed in my PC. I am able to print the same from
MSWord 2000 correctly.
Also i tried to edit font.properties file by adding MICR font,but still
i am facing the same problem .

Just now i tried using JDK1.3 createFont() method as below
File file = new File("MICR.ttf");
FileInputStream fis = new FileInputStream(file);
Font font = Font.createFont(Font.TRUETYPE_FONT, fis);

here printing is done but font size is one point,so iam not able to recognize just a dot coming for each character.
how to increase font size in above case,i tried font.size=10,but gives error saying that its a priotected variable in font class,then i tried extending Font class still not working.
Can anyone guide me thru this to get my project complete .
Regards ,
Prakash Moily
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe there is a method called derive() or something of similar meaning in the font class. One of the arguments the method takes is the size of the new font. Hope this helps.
-Micah

------------------
God help us if computers ever unite against us
When computers get together to make decisions, they form a Beowulf cluster. When humans get together to make decisions, they form a comittee. Need I say more?
-- archnerd on slashdot
 
I want my playground back. Here, I'll give you this tiny ad for it:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic