making labels with c++

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2006
Posts: 32
Reputation: muthuivs is an unknown quantity at this point 
Solved Threads: 0
muthuivs muthuivs is offline Offline
Light Poster

making labels with c++

 
0
  #1
Feb 2nd, 2006
I have the logic all figured out for a nes program that will spit out labels with unique charactrs on it...Almost like barcodes, but nothing that fancy. My stickers will have something like this: ABCGIU101.DFF

Like I said, I have the logic but I am not sure how to start the project with C++ since I dont want to out put to word and print from there. I want my program to be self sustaining. Any suggestions on how to print out a series of these labels using c++. Can I output to a text file and print from there ? That would be OK for me.

Wow, pretty soon i might actually become a programmer with all this little projects.

MuthuIVS
Reply With Quote Quick reply to this message  
Join Date: Nov 2005
Posts: 251
Reputation: dwks has a spectacular aura about dwks has a spectacular aura about 
Solved Threads: 25
dwks's Avatar
dwks dwks is offline Offline
Posting Whiz in Training

Re: making labels with c++

 
0
  #2
Feb 4th, 2006
So you need to generate a unique label?
dwk

Seek and ye shall find.

"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.

"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison

"The only real mistake is the one from which we learn nothing."
-- John Powell
Reply With Quote Quick reply to this message  
Join Date: Jan 2006
Posts: 32
Reputation: muthuivs is an unknown quantity at this point 
Solved Threads: 0
muthuivs muthuivs is offline Offline
Light Poster

Re: making labels with c++

 
0
  #3
Feb 5th, 2006
Yes, I know how to generate the unique numbers, just not sure where to spit out the results so that they can be printed out using AVERY-5167 labels. Would I be able to output to a text file perhaps? and if i did would the formatting for a txt file be the same pc to pc ?


Originally Posted by dwks
So you need to generate a unique label?
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 4,109
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 943
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: making labels with c++

 
0
  #4
Feb 6th, 2006
Take a look at the C++ code snippet at
http://www.daniweb.com/code/snippet122.html

You will have to format your text to fit the labels.
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: Jan 2006
Posts: 32
Reputation: muthuivs is an unknown quantity at this point 
Solved Threads: 0
muthuivs muthuivs is offline Offline
Light Poster

Re: making labels with c++

 
0
  #5
Feb 9th, 2006
Originally Posted by vegaseat
Take a look at the C++ code snippet at
http://www.daniweb.com/code/snippet122.html

You will have to format your text to fit the labels.
I don't understand the code, It there a way to just print out to the usb printer since I have the output all trimmed for the label?
Reply With Quote Quick reply to this message  
Join Date: Nov 2005
Posts: 251
Reputation: dwks has a spectacular aura about dwks has a spectacular aura about 
Solved Threads: 25
dwks's Avatar
dwks dwks is offline Offline
Posting Whiz in Training

Re: making labels with c++

 
0
  #6
Feb 9th, 2006
It there a way to just print out to the usb printer
The easiest way to do that would be to redirect the output of your program into a file, and then print that file:
  1. C:\>program
  2. Hello, World!
  3.  
  4. C:\>program >file.txt
  5.  
  6. C:\>type file.txt
  7. Hello, World!
  8.  
  9. C:\>
Then you could print file.txt.

Or you might be able to do this:
  1. C:\>program >prn
or use stdprn instead of stdout.
  1. fprintf(stdprn, "Hello, World!\n");
Your best bet would be to redirect the output of your program into a file, and then print that file with some other program. Everything else I've shown you here might not work, but that definitely will.
dwk

Seek and ye shall find.

"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.

"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison

"The only real mistake is the one from which we learn nothing."
-- John Powell
Reply With Quote Quick reply to this message  
Join Date: Jan 2006
Posts: 32
Reputation: muthuivs is an unknown quantity at this point 
Solved Threads: 0
muthuivs muthuivs is offline Offline
Light Poster

Re: making labels with c++

 
0
  #7
Feb 9th, 2006
The only problem about rpinting from a txt file is that I cannot get the labels to line up. I have already tried this, but the endl (endline) characheter is too wide, and txt files do not allow me change that setting. Also the fonts have to be in Even numbers withour decimals, that is also making it hard for me to get it to fit perfectly into a 80 label sheet (20*4).

MuthuIVS
Reply With Quote Quick reply to this message  
Join Date: Nov 2005
Posts: 251
Reputation: dwks has a spectacular aura about dwks has a spectacular aura about 
Solved Threads: 25
dwks's Avatar
dwks dwks is offline Offline
Posting Whiz in Training

Re: making labels with c++

 
0
  #8
Feb 9th, 2006
the endl (endline) characheter is too wide
You can only print 79 chars on the screen on one line if you print a newline too. Try re-doing your formatting.
Also the fonts have to be in Even numbers withour decimals, that is also making it hard for me to get it to fit perfectly into a 80 label sheet (20*4).
What do you mean? Are you printing in a monospaced font (like Courier New)?
dwk

Seek and ye shall find.

"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.

"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison

"The only real mistake is the one from which we learn nothing."
-- John Powell
Reply With Quote Quick reply to this message  
Join Date: Jan 2006
Posts: 32
Reputation: muthuivs is an unknown quantity at this point 
Solved Threads: 0
muthuivs muthuivs is offline Offline
Light Poster

Re: making labels with c++

 
0
  #9
Feb 10th, 2006
I think I am doing everything right because I am making sure I am not stuffing toomany info on 1 line and so on. I am now trying to print the output to a RTF template that will defintely work but once my program writes to it , the formatting in the RTF is all deleted. Any Idea how to get around that?
Reply With Quote Quick reply to this message  
Join Date: Nov 2005
Posts: 251
Reputation: dwks has a spectacular aura about dwks has a spectacular aura about 
Solved Threads: 25
dwks's Avatar
dwks dwks is offline Offline
Posting Whiz in Training

Re: making labels with c++

 
0
  #10
Feb 10th, 2006
Open the file in append mode instead of truncuate?
dwk

Seek and ye shall find.

"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.

"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison

"The only real mistake is the one from which we learn nothing."
-- John Powell
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC