Printing and Fonts Question

PAffiliates

Member
Joined
Aug 15, 2007
Messages
10
Programming Experience
Beginner
I have a question about printing and about fonts:

1. (Fonts) I am writing a program that will take user input and print it using a barcode font. I know that if the user has the font installed on the system, it will print out in the barcode font with no problems. However, I was wondering if there is a way to add it to my program, so that it is not necessary to install the font on the user's system.

2. (Printing) This same program requires a certain amount of labels to be printed on the page. If I use the x and y print coordinates correctly, is it possible to have the printer spit out the first page and print to a second page if it runs out of page to print on?(this question sounds stupid for me to ask) Also, I was wondering how to set the paper size to the size of paper that will be used for these labels, so the user doesn't have to select the correct size.(obviously the label paper isn't 8.5 x 11)

Anyone who can shed some light on these questions will have great appreciation from me. Thank you all for your time and willingness to help someone who is trying to learn.
 
Easiest done with a Setup project where you view filesystem and add special folder Fonts Folder where you put the font file. Other options could be adding it to applicaton resources and copy it to fonts folder when applications starts if it's not already installed (check with InstalledFontsCollection).

PrintPage event prints one page, if you have more set e.HasMorePages=True and the PrintPage is called again. You have to use some kind of counter to make the same handler do all pages dynamically.

Paper size is set through the PrintDocuments DefaultPageSetting.PaperSize. You can get the paper sizes the printer supports through the PrintDocuments PrinterSettings.PaperSizes.
 
Just wanted to say thank you John for helping me out. I was able to figure out what I needed to do using your advise. Thank you again!!
 
Back
Top