cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with printing applets with page breaks....xMII

swaroop_anasane
Active Contributor
0 Kudos

Dear Experts,

We have a screen with somewhere about 29 applets. The applets have been displayed in <td>,<tr> with headers for each. While we print the page, it breaks out between header and the apple. Consider the case, header goes in page 1 and applet corresponding to the same goes to another.

We have tried setting page breaks dynamically, but that too is partially supported in IE, hence it works sometimes, and doesn't work sometimes.

Wouls appreciate if you can suggest some easy way of getting the print out.

Thanks in advance.

Regards,

Swaroop

Accepted Solutions (1)

Accepted Solutions (1)

swaroop_anasane
Active Contributor
0 Kudos

Hi Anuj,

Thanks for your thought on the issue.

We found a break through for this.

We have kept the complete page into Table(TR/TD) blocks and have now provided page-break.

There is an compatibility issue while using Page-Break on IE8. You can only use "Page-Break-After:always", anything else you use would not work. This is because page-break has partially support on IE8.

The same code works fine in Opera as it completely supports page-break with all the attributes. You can further refer below link to check compatibility of styles on IE versions.

http://reference.sitepoint.com/css/page-break-after

Thanks again for replying and hope this would help the forum.

Regards,

Swaroop

Answers (2)

Answers (2)

swaroop_anasane
Active Contributor
0 Kudos

Hi Anuj,

We are using a button on the screen that anyways calls window.print(); from javascript.

Shouldn't the same happen when you select print from browser's file-->Print option??

Thanks,

Swaroop

Former Member
0 Kudos

Hi Swaroop,

Yes, the functionality would be the same in either case but you do not have the freedom of customizing the function in case of browser's 'Print' option. 🙂

Alright, but since you are using a button for the same which inturn calls a js function, here is what I could think of.

I thought if you can fix the size of all the applets with proper <br> to fit in as per the page layout for printing, but that would distort the UI if the screen is viewed in different size Monitor/Laptop since the applet sizes will not be in %.

Way out here I could think of is, if you can create a pdf and then print it on click of the same button, using all the parameter values same as you would have used for populating your UI, wherein you can scale the width and height of each and every applet and the corresponding headers to fit as per the page breaks of your pdf.

Hope this adds a pointer to resolve your issue.

Best Regards,

Anuj

Former Member
0 Kudos

Hi Swaroop,

I would suggest you a pointer which I could think of, but before that I would like to confirm if you are using a button in your UI or the browser's 'Print' option to print the applets in your screen.

Best Regards,

Anuj