Dear guest !

Welcome to Team Developer Community Forum. A place created by the community, for the community !

This is a resource for Q & A and discussion about everything related to OpenText Gupta Team Developer, SqlBase, TD Mobile and Report Builder.
It is the alternative for the OpenText customer forums which can only be accessed with an active support contract.

Please register your account now. It will make you part of the active community.
Also, this guest message will not be displayed for registered users.

As a bonus, registered users have access to the 'Newsgroups' subforum, holding 10 years worth of posts from the good old Gupta newsgroups.

Having an account gives you the opportunity to ask questions and get help from others.
We hope this free gathering will help you and the community getting forward!

Best regards,
The forum site admins.

Printing from browser

General discussion forum about all things TD Mobile
Post Reply
FRBhote
India
Posts: 23
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Printing from browser

Post by FRBhote » 18 Mar 2017, 05:06

How can I print directly from browser on a PC?

If not, what is the best method?

a_sivababu
India
Posts: 4
Joined: 10 Mar 2017, 08:46
Location: Chennai,India

Re: Printing from browser

Post by a_sivababu » 19 Mar 2017, 04:28

AFAIK, The Javascript window.print might be used for printing HTML web but not sure whether your requirement is something different.

FRBhote
India
Posts: 23
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Re: Printing from browser

Post by FRBhote » 20 Mar 2017, 04:56

Thanks - I had forgotten about the html print. Kept thinking of PDF only.

FRBhote
India
Posts: 23
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Re: Printing from browser

Post by FRBhote » 20 Mar 2017, 07:02

Is there a way to figure out whether the system is running on a PC or a phone?

FRBhote
India
Posts: 23
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Re: Printing from browser

Post by FRBhote » 20 Mar 2017, 07:02

Is there a way to figure out whether the system is running on a PC or a phone?

a_sivababu
India
Posts: 4
Joined: 10 Mar 2017, 08:46
Location: Chennai,India

Re: Printing from browser

Post by a_sivababu » 20 Mar 2017, 12:36

I think we can go with resolution but we have to do some testing and correct the code accordingly.

For eg, to check resolution for phone.

IsPhoneSize: function() {
var w,h;
w=widow.screen.width;
h=window.screen.height;
return ( w <= 480);
}

We may need to check different solution to support from small form factor to large farm factor.


To check for devices, indexof() or match() can be used


isAndroid: function() {
return (navigator.userAgent.tolowercase().indexOf("android") > -1)
}


var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function() {
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
},
Opera: function() {
return navigator.userAgent.match(/Opera Mini/i);
},
Windows: function() {
return navigator.userAgent.match(/IEMobile/i);
},
any: function() {
return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
}
};

FRBhote
India
Posts: 23
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Re: Printing from browser

Post by FRBhote » 21 Mar 2017, 05:09

Bigger problem. Window.print( ) opens the print dialog box.

Very difficult to have a POS with a dialog box.

FRBhote
India
Posts: 23
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Re: Printing from browser

Post by FRBhote » 06 Apr 2017, 12:16

I accept the dialog box, but if I call window.print immediately after the RunReport, it is called before the report is done.

Since RunReport does not return anything, how would I know that the report is complete?

a_sivababu
India
Posts: 4
Joined: 10 Mar 2017, 08:46
Location: Chennai,India

Re: Printing from browser

Post by a_sivababu » 09 Apr 2017, 14:59

I have tried TDM a quite back but need to check it to recall. I think CallBack mechanism might not implemented for RunReport like Invoke with Indentation.

Not sure whether below work around is ok but just thought since RunReport will not have Indentation (CallBack) but Invoke has.

RunReport<Name>
Invoke <Dummy with some status>
JavaScript <<window.print function>

Post Reply

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest