I'm having a long page where there will be content to be printed.
I'm using the css using media=print to hide all the unwanted contents and using the window.print method to invoke printing.
But when i click the print button it prints only partial content upto a single page and all the remaining contents are discarded.
I wonder what may be the problem!!!
And there's another problem , i've bills to be printed in order but dont want them to be breaking in between pages .(ie a bill should be printed fully if there is enough space at the bottom or should be printed on the next page)
Hey all. I am currently putting together a test page of mine where a popup window comes up showing a coupon that I will have a link enabling them to print it simply and easily.
So I have a print page that's written in a combination of php & html. The body tag is outside the php with an onload="window.print();window.close;"
The idea behind this print page is when the print button is pressed on the parent window, it generates this child window that is specifically made larger for printing reports that people can read easily. I use css for text styles and the table "width" is longer.
All the html code inbetween the body tags is created by php using the php "Print" function. </head>
My problem is it does not print the table dimension or the font size above a certain size. When I print in landscape, which is what this page is designed for, it prints the same size as "scaled to fit" portrait. On the screen the size is correct and if I use the browser print button, it prints to the correct size.
The css works, it will make changes and will even make the text smaller just won't print over a certain size (9pt?).
I did find a solution to this but then I do not understand why onload fails to work in this scenario. I am summarizing steps I had followed.
1) Read the contents of div using innerHTML and store it to a variable.
2) Read the contents of iframe and store it to a variable. "Details" is id of the iframe.
var iframeObj = document.getElementById("Details"); var iframeDoc; frameDoc = iframeObj.contentWindow.document;
I m having a text data of around 6 page length in a text editor...I want to print dat data using window.print. For that i displayed dat data in a html page and used window.print(). Bt my client wants dat some line spaces shud be inserted first in the starting of the page and on the second page also...After that the printing shud be normal... How can i set the page in such a format...?
I don't know if this is even possible, but if I have a window.Print command is there a way to set the printing preference to Landscape by default. I have this table and I got it as small as possible but the print still gets cut off to the right. The only solution is printing in Landscape.
i'm trying to send a html page directly to the print preview and bypass opening it in a new window. i've found a good solution by having a frameset with 2 rows. the top row is relative while the bottom row is 1 pixel height (hidden at the bottom). the user clicks a print button in the main top frame and it loads the html page that needs to be printed in the bottom hidden frame. on the print file, i included:
therefore, the code above initiates an instant print preview. the problem is that it doesn't work in safari (osx). instead of printing the specific frame that the page is in, it print the frameset at the _top of the browser window.i tried changing the location to this., parent.window, etc...but, none worked.
I've scrollable screen. I'm having a print button on it and "window.print()" function is called on its onclick event.My problem is it only prints the "viewable" part of the screen, not the whole screen.P.S. I'm using IE7 and it must work for IE7 atleast (for rest I'm not bothered).
Here is sample code that imitates how the real page works:
When I click the l hyperlink, the print box comes up and I go to preview, but nothing is on the page. I have a print style sheet that hides everything else on the page and re-adjusts the couponBox's overflow to appear, but the image that's in couponBox that is supposed to show doesn't when I preview. However, after I cancel out the print box and go to print from the browser, the image appears just as it's supposed to.
I've got a form which is acting as a calculator. Once the calculation is complete I want it so when the user presses a 'print' button it takes certain parts of the form data and displays them in a new window which would be designed for printing.