Reputation: 9
In VB.net i heard about there is an option to change printer settings like page type and margins. when we want to print contents for a web apps we use javascript window.print() option, but i want to set page settings through php how it is possible?
remember i want to take a print in client machine through browser not in a web server
kindly suggest a solution.
Upvotes: 0
Views: 2850
Reputation: 146450
You cannot affect client-side print settings with a server-side language, not even VB.NET. The web server and the browser run in different machines and neither HTML nor client-side JavaScript define such features. You probably heard that in a conversation about desktop applications.
The closest you can get to "exact" printing is generating a PDF file: the site visitor can still choose how to print it but at least he won't be able to change the layout.
Upvotes: 1
Reputation: 522085
This is not possible, neither PHP nor Javascript have any influence over the print settings. The best you can do is supply a print stylesheet to change the appearance of a page in print.
Upvotes: 3