Page 3 of 5

Re: How to print an image & data on it

Posted: Mon Mar 15, 2010 10:25 am
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 :!:

Re: How to print an image & data on it

Posted: Mon Mar 15, 2010 11:14 am
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

Re: How to print an image & data on it

Posted: Mon Mar 15, 2010 8:45 pm
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.... :)

Re: How to print an image & data on it

Posted: Wed Mar 17, 2010 1:42 am
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.

Re: How to print an image & data on it

Posted: Wed Mar 17, 2010 1:44 am
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.

Re: How to print an image & data on it

Posted: Fri Mar 19, 2010 5:44 am
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.

Re: How to print an image & data on it

Posted: Sat Mar 20, 2010 7:59 pm
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.

Re: How to print an image & data on it

Posted: Tue Mar 23, 2010 1:23 am
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 :)

Re: How to print an image & data on it

Posted: Tue Mar 23, 2010 4:16 am
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

Re: How to print an image & data on it

Posted: Tue Mar 23, 2010 12:39 pm
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.