How to print an image & data on it
Moderator: Rathinagiri
How to print an image & data on it
Dear All:
Plz. go thru the attached image file....
Its meant for label printing.....
On the label sheet (A4 size with two labels) I've to print this image file & the user's data as entered...........
1 entry program in hmg with dbf as backend can be made for this.
But how to print user's those data on this image??
Thanks!
Swapan
Plz. go thru the attached image file....
Its meant for label printing.....
On the label sheet (A4 size with two labels) I've to print this image file & the user's data as entered...........
1 entry program in hmg with dbf as backend can be made for this.
But how to print user's those data on this image??
Thanks!
Swapan
- Attachments
-
- Sample.JPG (54.62 KiB) Viewed 4683 times
- Roberto Lopez
- HMG Founder
- Posts: 4023
- Joined: Wed Jul 30, 2008 6:43 pm
Re: How to print an image & data on it
You have full control of the print output via @...PRINT commands, you can print images besides text and lines.swapan wrote:Dear All:
Plz. go thru the attached image file....
Its meant for label printing.....
On the label sheet (A4 size with two labels) I've to print this image file & the user's data as entered...........
1 entry program in hmg with dbf as backend can be made for this.
But how to print user's those data on this image??
Thanks!
Swapan
You can position the text and images exactly in the place you want without regarding printer or paper size used.
Please, take a look at 'Print Commands' at HMG docs: hmgdoc/hmgdoc.htm
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
Re: How to print an image & data on it
Here is my application, which can print labels.
Maybe it will be useful for you.
You need to recompile it.
Maybe it will be useful for you.
You need to recompile it.
- Attachments
-
- lemar.zip
- (381 KiB) Downloaded 388 times
Re: How to print an image & data on it
Thanks Roberto Sir for your reply..........
And Mol its a great gesture on your part to share your label program with us.
Will revert after going through the project..
Thanks & Regards,
Swapan
And Mol its a great gesture on your part to share your label program with us.
Will revert after going through the project..
Thanks & Regards,
Swapan
Re: How to print an image & data on it
Can I accomplish the job using Report Writer?
I've used this kind of code:
DEFINE REPORT Report1
* Report Layout ***********************************************
BEGIN LAYOUT
PAPERSIZE PRINTER_PAPER_A4
ORIENTATION PRINTER_ORIENT_PORTRAIT
END LAYOUT
* Header Band *************************************************
BEGIN HEADER
BANDHEIGHT 25
Its generating 2 labels in 1 A4 sized sheet, but no. of copies option is disabled, how can I initialize this value and the user can put values for No. of copies??
For Dot Matrix Printer (local) its coming, but for others (network printers) which are deskjets - no. of copies is disabled.... Not sure if the network printers at my office are right now offline or not....
I've used this kind of code:
DEFINE REPORT Report1
* Report Layout ***********************************************
BEGIN LAYOUT
PAPERSIZE PRINTER_PAPER_A4
ORIENTATION PRINTER_ORIENT_PORTRAIT
END LAYOUT
* Header Band *************************************************
BEGIN HEADER
BANDHEIGHT 25
Its generating 2 labels in 1 A4 sized sheet, but no. of copies option is disabled, how can I initialize this value and the user can put values for No. of copies??
For Dot Matrix Printer (local) its coming, but for others (network printers) which are deskjets - no. of copies is disabled.... Not sure if the network printers at my office are right now offline or not....
Re: How to print an image & data on it
How to enable the option 'No. of Copies' in the printer dialog with above kind of coding.....?swapan wrote:Can I accomplish the job using Report Writer?
I've used this kind of code:
DEFINE REPORT Report1
* Report Layout ***********************************************
BEGIN LAYOUT
PAPERSIZE PRINTER_PAPER_A4
ORIENTATION PRINTER_ORIENT_PORTRAIT
END LAYOUT
* Header Band *************************************************
BEGIN HEADER
BANDHEIGHT 25
Its generating 2 labels in 1 A4 sized sheet, but no. of copies option is disabled, how can I initialize this value and the user can put values for No. of copies??
For Dot Matrix Printer (local) its coming, but for others (network printers) which are deskjets - no. of copies is disabled.... Not sure if the network printers at my office are right now offline or not....
thanks,
Swapan
Re: How to print an image & data on it
Dear Swapan,
You can set number of copies to be printed from print preview.
You can also find some helpful codes from \hmg\samples\print folder.
Please check following codes taken from that folder:
With best regards.
Sudip
You can set number of copies to be printed from print preview.
You can also find some helpful codes from \hmg\samples\print folder.
Please check following codes taken from that folder:
Code: Select all
*------------------------------------------------------------------------------*
Procedure PrintTest3()
*------------------------------------------------------------------------------*
Local i
Local lSuccess
// Measure Units Are Millimeters
SELECT PRINTER DIALOG TO lSuccess
If lSuccess == .T.
PrintDoc()
MsgInfo('Print Finished')
EndIf
ReturnSudip
With best regards,
Sudip
Sudip
Re: How to print an image & data on it
Sudip........Thanks for your attention.sudip wrote:Dear Swapan,
You can set number of copies to be printed from print preview.
You can also find some helpful codes from \hmg\samples\print folder.
Please check following codes taken from that folder:
With best regards.Code: Select all
*------------------------------------------------------------------------------* Procedure PrintTest3() *------------------------------------------------------------------------------* Local i Local lSuccess // Measure Units Are Millimeters SELECT PRINTER DIALOG TO lSuccess If lSuccess == .T. PrintDoc() MsgInfo('Print Finished') EndIf Return
Sudip
I've taken help from hmg\samples\report.advanced1\demo.prg
But its - the no. of copies option is in disabled state in Print Preview in my coding:
DEFINE REPORT Report1
* Report Layout ***********************************************
BEGIN LAYOUT
PAPERSIZE PRINTER_PAPER_A4
ORIENTATION PRINTER_ORIENT_PORTRAIT
END LAYOUT
* Header Band *************************************************
BEGIN HEADER
BANDHEIGHT 25
Re: How to print an image & data on it
Hi Swapan,
I have 3 local (virtual) printers installed in my computer. No. of copies is enabled in only one of them (BULLZIP PDF PRINTER).
But I just tested C:\hmg\SAMPLES\PRINT\ImageFromResource\Bmp. When I choose select printer with settings, it gave me option for specifying no. of copies as follows.
So, IMHO, there is a problem in case of preview (if I am not wrong).
With best regards.
Sudip
I have 3 local (virtual) printers installed in my computer. No. of copies is enabled in only one of them (BULLZIP PDF PRINTER).
But I just tested C:\hmg\SAMPLES\PRINT\ImageFromResource\Bmp. When I choose select printer with settings, it gave me option for specifying no. of copies as follows.
So, IMHO, there is a problem in case of preview (if I am not wrong).
With best regards.
Sudip
With best regards,
Sudip
Sudip
- Roberto Lopez
- HMG Founder
- Posts: 4023
- Joined: Wed Jul 30, 2008 6:43 pm
Re: How to print an image & data on it
Number of copies will be enabled only when the printer driver supports it, so it depends upon the printer you are using.swapan wrote:Can I accomplish the job using Report Writer?
I've used this kind of code:
DEFINE REPORT Report1
* Report Layout ***********************************************
BEGIN LAYOUT
PAPERSIZE PRINTER_PAPER_A4
ORIENTATION PRINTER_ORIENT_PORTRAIT
END LAYOUT
* Header Band *************************************************
BEGIN HEADER
BANDHEIGHT 25
Its generating 2 labels in 1 A4 sized sheet, but no. of copies option is disabled, how can I initialize this value and the user can put values for No. of copies??
For Dot Matrix Printer (local) its coming, but for others (network printers) which are deskjets - no. of copies is disabled.... Not sure if the network printers at my office are right now offline or not....
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)