?
Solved

I want to print a page that have a horizontal scroll

Posted on 2013-12-04
4
Medium Priority
?
1,110 Views
Last Modified: 2013-12-06
Hi,

I want to know how to print whole page that contains a horizontal scroll inside a div,
When I try that , I only prints the part of the screen that is in the view while clicking print !
The rest is n't printed , How to print it ???


sample page is attached.. Try printing it , not all the div is printed .
Note : I want to print the div itself , rest of the page is n't important for me ...
1.html
0
Comment
Question by:darroosh
[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
  • 2
  • 2
4 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 2000 total points
ID: 39698228
Test page : http://fiddle.jshell.net/6xSKq/2/show/
Source : http://jsfiddle.net/6xSKq/2/
    @media print
    {
    	div { display: block;width:2048px !important; }
    }

Open in new window


More infos : http://www.w3.org/TR/CSS2/media.html
0
 

Author Comment

by:darroosh
ID: 39701339
Thank you , Good solution ..
I sloved it before  reading your  post by another  way  , posting it as it may help another  one..

When clicking the print button , I create a javascript variable  holding the content of the desired  div ..

Then by JQuery I made diplay:none for the whole page , Then add the content of the variable to the page , So that the page now only containing the desired div with width 100 %
Then print it ...

Then revrese the action back..
0
 
LVL 82

Expert Comment

by:leakim971
ID: 39702112
I prefer my solution :P

Have a nice week-end !
0
 

Author Comment

by:darroosh
ID: 39702169
Me too :P

Have a nice day !
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Suggested Courses

752 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