How to print an image & data on it

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
gfilatov
Posts: 1100
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: How to print an image & data on it

Post by gfilatov »

Roberto Lopez wrote: The bottom line is that your code is not related with swapan question in any way :).
Roberto,

You are right :!:

But I guess that some printers could return a Collate switch as default state and this will block the Spinner_3 in the preview window in the following code:

Code: Select all

...
	if	_HMG_SYSDATA [ 376 ] > 1 ;
		.or. ;
		_HMG_SYSDATA [ 377 ] == 1 // <-- problem is here

		_HMG_PRINTER_PRINTPAGES.Spinner_3.Enabled := .F.

	endif
...
Therefore I suggest to use the command SELECT PRINTER DIALOG TO lSuccess PREVIEW
and revise my humble corrections.

Thanks for your patience :!:
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
sudip
Posts: 1456
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: How to print an image & data on it

Post by sudip »

Hello Grigory,

Thank you very much.

I used SELECT PRINTER DIALOG TO lSuccess PREVIEW. But, problem is not solved.

Then I changed c_controlmisc.c as per your given code and re-created libraries. But, my project cannot be compiled due to some linking errors.

With best regards.

Sudip
With best regards,
Sudip
User avatar
swapan
Posts: 242
Joined: Mon Mar 16, 2009 4:23 am
Location: Kolkata, India
Contact:

Re: How to print an image & data on it

Post by swapan »

sudip wrote:Hello Grigory,

Thank you very much.

I used SELECT PRINTER DIALOG TO lSuccess PREVIEW. But, problem is not solved.

Then I changed c_controlmisc.c as per your given code and re-created libraries. But, my project cannot be compiled due to some linking errors.

With best regards.

Sudip
Looking for a Combo Effect of Grigory & Roberto to overcome this issue.... :)
Thanks & Regards,
Swapan Das

http://www.swapandas.com/
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: How to print an image & data on it

Post by Roberto Lopez »

swapan wrote: As pointed out by Roberto Sir, my actual issue is "The No. Of Copies" option is coming in disabled state with a pre-defined value of 1 in it. There's hell of other works right now consuming my time, so unable to test it on other printers. I tested it on a HP deskjet printer and found that issue. But Roberto Sir, the no. of copies option for that printer is active for ms-word/excel applications, then why it wiill be not active for my print preview?
The print system 'asks' the printer driver about its capabilities to print multiple copies and according this answer, the copies spinner is enabled or disabled.

There is two possibilities now:

1. A bug in HMG print system.

2. MS Word/Excel use an alternate method to handle multiple copies instead of rely on printer driver for that.

I'll search for a bug about that.

Please, tell me what is the exact model of your printer.

TIA.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: How to print an image & data on it

Post by Roberto Lopez »

gfilatov wrote:
Roberto Lopez wrote: The bottom line is that your code is not related with swapan question in any way :).
Roberto,

You are right :!:

But I guess that some printers could return a Collate switch as default state and this will block the Spinner_3 in the preview window in the following code:

Code: Select all

...
	if	_HMG_SYSDATA [ 376 ] > 1 ;
		.or. ;
		_HMG_SYSDATA [ 377 ] == 1 // <-- problem is here

		_HMG_PRINTER_PRINTPAGES.Spinner_3.Enabled := .F.

	endif
...
Therefore I suggest to use the command SELECT PRINTER DIALOG TO lSuccess PREVIEW
and revise my humble corrections.

Thanks for your patience :!:
Thanks to you for your help.

I'll take a look at that ASAP.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
swapan
Posts: 242
Joined: Mon Mar 16, 2009 4:23 am
Location: Kolkata, India
Contact:

Re: How to print an image & data on it

Post by swapan »

Roberto Lopez wrote:
swapan wrote:
The print system 'asks' the printer driver about its capabilities to print multiple copies and according this answer, the copies spinner is enabled or disabled.

There is two possibilities now:

1. A bug in HMG print system.

2. MS Word/Excel use an alternate method to handle multiple copies instead of rely on printer driver for that.

I'll search for a bug about that.

Please, tell me what is the exact model of your printer.

TIA.
I reported the issue after testing it on a HP deskjet printer with the model no. as HP D4168.
It seems there's some bug in HMG Print System. If you want I can test it on more different
deskjet printers - but next week.
Thanks & Regards,
Swapan Das

http://www.swapandas.com/
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: How to print an image & data on it

Post by Roberto Lopez »

swapan wrote:
Roberto Lopez wrote:
swapan wrote:
The print system 'asks' the printer driver about its capabilities to print multiple copies and according this answer, the copies spinner is enabled or disabled.

There is two possibilities now:

1. A bug in HMG print system.

2. MS Word/Excel use an alternate method to handle multiple copies instead of rely on printer driver for that.

I'll search for a bug about that.

Please, tell me what is the exact model of your printer.

TIA.
I reported the issue after testing it on a HP deskjet printer with the model no. as HP D4168.
It seems there's some bug in HMG Print System. If you want I can test it on more different
deskjet printers - but next week.
It's ok.

I'll work to try to determine the cause of the problem.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: How to print an image & data on it

Post by Roberto Lopez »

swapan wrote:
Roberto Lopez wrote:
swapan wrote:
The print system 'asks' the printer driver about its capabilities to print multiple copies and according this answer, the copies spinner is enabled or disabled.

There is two possibilities now:

1. A bug in HMG print system.

2. MS Word/Excel use an alternate method to handle multiple copies instead of rely on printer driver for that.

I'll search for a bug about that.

Please, tell me what is the exact model of your printer.

TIA.
I reported the issue after testing it on a HP deskjet printer with the model no. as HP D4168.
It seems there's some bug in HMG Print System. If you want I can test it on more different
deskjet printers - but next week.

At first, I must apologize, because I've answered this incorrectly.

Print code had run smoothly for many years and I've not revisited it for so much time, so I've should to dig in the source a little more before answering so quickly.

You've used REPORT command.

REPORT command uses SELECT PRINTER command.

When you specify a number of copies/collation for printing using SELECT PRINTER command, this features are disabled in print preview window, since those were already selected at the moment of printer selection and are controlled by the printer driver.

If some of this features are not provided by the printer driver, print will fail.

Apparently, your problem is that your printer driver is responding to SELECT command as if collation were required to be processed by it, so, number of copies are disabled from the print preview.

HMG print system relies on the printer driver response only without checking if the user really requested a specific feature.

I'll rework this for the next release and (again) sorry for the wrong answer.

And, of course, Grigory, you was right about the collation, but, I'll insist in that the driver is giving an incorrect response and that is the cause of the problem :)
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
swapan
Posts: 242
Joined: Mon Mar 16, 2009 4:23 am
Location: Kolkata, India
Contact:

Re: How to print an image & data on it

Post by swapan »

Roberto Lopez wrote: I'll rework this for the next release and (again) sorry for the wrong answer.
Dear Roberto Sir:

I appreciate the kind of attention you gave to this issue. Now just awaiting for your "re-work", please take time no worries but do resolve this in near future.

Thanks & Regards,

Swapan
Thanks & Regards,
Swapan Das

http://www.swapandas.com/
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: How to print an image & data on it

Post by Roberto Lopez »

swapan wrote:
Roberto Lopez wrote: I'll rework this for the next release and (again) sorry for the wrong answer.
Dear Roberto Sir:

I appreciate the kind of attention you gave to this issue. Now just awaiting for your "re-work", please take time no worries but do resolve this in near future.

Thanks & Regards,

Swapan
I've already fixed.

The fix will be available in the next release.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply