Hi esgici,
so far I never felt in need to print data via dbase, clipper etc. I always opened data with excel and made them fit for printing. Or I transferred data to other people who were able to output them fitting their needs. Now I am helping a 2 people company to make their day a bit easier. They can use programs (excel is used to create forms, but not with filling these forms with data), so I decided to try it with hmg. The job is to fill forms with data. Thank you so much for your print samples, it brought me confidence, I can do that with hmg.
Your samples are very useful for me.
Thank you
Robert
HMG Print Samples
Moderator: Rathinagiri
Re: HMG Print Samples
Hi, Ihave a question:
Does printsystem work with windows 10? I mean is the default printer recognized? I can't try, because I use win 7 in VirtualBox.
Thx
Robert
Does printsystem work with windows 10? I mean is the default printer recognized? I can't try, because I use win 7 in VirtualBox.
Thx
Robert
- dragancesu
- Posts: 929
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
Re: HMG Print Samples
No worries, recognizes all printers as well as pdf printers (print to pdf)
Re: HMG Print Samples
Thx, Dragan, I was hoping this.
Robert
Robert
Re: HMG Print Samples
Printing certainly is one of the hardest things, and can i ask for some help, please?
The samples are very useful, but I am struggling with trying to right-justify text. Any tips on this?
I've used <RightMargin> - LEN( TextString ) + nCharWidth
but it still isn't quite right.
Yemplar
The samples are very useful, but I am struggling with trying to right-justify text. Any tips on this?
I've used <RightMargin> - LEN( TextString ) + nCharWidth
but it still isn't quite right.
Yemplar
- dragancesu
- Posts: 929
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
Re: HMG Print Samples
Try demo, prtest01.prg
dimensions are in mm, just adjust where to print and add RIGHT or CENTER, LEFT is defaults
FONT and SIZE are some of the windows fonts
Code: Select all
#include <hmg.ch>
*-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.
/*
HMG Print ( Mini Print ) for beginners in 10 easy steps
Step #1 :
Use everything with default values,
write only "This is a test"
to four corners and center of paper.
*/
PROCEDURE PrintTest()
/*
Default paper size is A4 Sheet; 210- by 297-millimeters
*/
LOCAL lSuccess := .F.,;
cTestString := "This is a test",;
nMostRightCol := 210,; // Default page size is A4 : 210 x 297 mm
nMostBottmRow := 297
SELECT PRINTER DEFAULT TO lSuccess PREVIEW
IF lSuccess
START PRINTDOC
START PRINTPAGE
@ 0, 0 PRINT cTestString // Top Left
@ 0, nMostRightCol PRINT cTestString RIGHT // Top Right
@ nMostBottmRow / 2, nMostRightCol / 2 PRINT cTestString CENTER // Center of paper
@ nMostBottmRow - 4, 0 PRINT cTestString // Bottom Left
@ nMostBottmRow - 4, nMostRightCol PRINT cTestString RIGHT // Bottom Right
END PRINTPAGE
END PRINTDOC
ELSE
MsgStop( "Couldn't select default printer !", "ERROR !" )
ENDIF
RETURN // PrintTest()
*-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.
FONT and SIZE are some of the windows fonts