hi people, couple of easy-ish things [so i remember, but its been ages]
i did these both long time ago but as said, long time ago is long time ago...
i need to first be able to print out loads of records... from my database...
VB Code:
printer.print "WOTEVER"
printer.print 'blank line
printer.enddoc 'send to printer
< correct?
but, this ones trickier... [even more so if the one above is wrong]
i need to be able to print out loads of id cards for member [added a barcode scanner to my membership system, so ]
need it to be like the form in the attached image... BUT: i want to print like max possible to an A4 sheet of card. [member cards are 5 x 9cm (like a bank/credit card)]
so whats the best way to make sure this is done? if u know what i mean? :S
Of course there are other things to go on the card, but i cant be bothered to type those things into word n position em so late at night. but i guess you get the idea: The PLAZA sign on top left is infact an image file, at a reduced size to the origional. so im guessing simple .print isnt going to work?
and when i say as many cards per a4 page im guessing you know i mean each one with a different name / id / barcode. -> I KNOW HOW TO DO THE BARCODE BTW... - changing the font to barcode font.
You can draw the logo by using the Printer.PaintPicture method. To print the text you'll need to do some calculations for the position it should go at. Set the Printer.CurrentX and Printer.CurrentY properties before you use the Print statement.
see i thought that.. so scale width and scale hight... - thats the printable area of a page? correct?
another question [part of question one]
if i print>
{BOLD}{ITALIC}ID NO{/ITALIC} - TITLE, SURNAME, FORENAMES{/BOLD} ADD1, ADD2, TOWN, CODE, PHONE, MOBILE, JOINED
does it wrap the text ? or will it print it across two page widths, if the text is too long to fit onto one page width?
> i aint too bothered about spending a bit of time sorting # 2 out so much, since theres hundreds of cards to make, it can be done slowly.
and btw@ signature strip... would i simply HAVE to put underscores, or can i use a draw line function / command? it would be ideal to get it a certain length, if possible, but eithers fine..
- ta
Last edited by wpearsall; Nov 13th, 2006 at 07:42 PM.
Reason: extend question
Text is not wrapped, neither will text written outside the right edge be carried over to a new page it's just printed "outside" of the page, which means it's lost. You can use the Printer.TextWidth method to check how wide a text will be and by adding that to the CurrentX value check that it's not larger than ScaleWidth.
You can use Printer.Line (FromX, FromY)-(ToX, ToY) to draw a line.