Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Python Printing

Posted on 2001-08-01
5
Medium Priority
?
365 Views
Last Modified: 2010-04-17
I would like to print HTML pages on a printer.but the problem is that it should be printed as A4 size pages and if the content exceeds A4 size it should be moved to next page.Since I am using python kindly help me out on this
0
Comment
Question by:sivaramancbe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 22

Accepted Solution

by:
CJ_S earned 200 total points
ID: 6347747
An HTML page will print how it prints. You cannot adjust the clients browser to have them print the way you want.

I might misunderstand the question. What exactly is it that you are trying to do. Is there a browser involved, how do you get to the pages, where and how does python step in etc. etc.

regards,
CJ
0
 

Author Comment

by:sivaramancbe
ID: 6347759
Hi Cj,
This works on IE and a http server has been created using python to stream the data as HTML.
The only thing now I require is can i organize the data using some code and print it according to A4 size
With Regards
Shiva
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6347794
On the client I assume? No, you cannot access the client browsers settings. Javascript and VBScript are the only scripting languages with which you can reach the client. However, both have been designed with security in mind. meaning that you cannot set or access any specific settings of the client. That includes the way their print settings are set.

I'm sorry, but you cannot do this. There have been umpteenth similar questions with only negative answers related to these printing issues.

There is only one thing you can do which can affect the browsers print-settings...and that is by using style sheets to tell the browser how to print a page.

Example:
<style type='text/css'>
P { page-break-before: always; }
</style>

If you add that to the HTML page a page break will ALWAYS be set when you use the P-tag (<P> ... </p>)

there is also a page-break-after. Experiment some with it. it is IE only, and the ONLY way you can tell the browser how to print certain ways. Printer settings themselves cannot be changed!
 

regards,
CJ
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7487668

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - Answered by: CJ_S
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7518976
Per recommendation, force-accepted.

Netminder
EE Admin
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about problems I had with the new location API and permissions in Marshmallow
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Starting up a Project

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question