When I try to print the webpage, only the frame appears in the print when using IE or other browsers. However, through the google chrome, the whole page gets printed.
I have done a little research and found out that adding the OpenFrame plugin would do the trick. However, I am looking for the solution without the plugins. Our product is used by a number of customers and we can't ask them to install any plugins.
Can we fix this by making CSS changes or scripts.
You can print only the selected frame in frameset HTML page. You will see the [Print this frame...] on the context menu by right-clickking in the frame of the page that uses <frameset>. By selecting the menu item, you can print only the contents of the frame. This command does not reload the contents of the frame.
Right-click in the frame you want to print. Choose Print Frame from the contextual menu.
Drag a rectangle around the area you want to print. Choose File > Print. Make sure that the Selected Graphic option is selected in the Print Range area of the Print dialog box. (Optional) To enlarge the selected text or graphic to fit the sheet of paper, choose Fit To Printable Area from the Page Scaling pop-up menu.
Using JavaScript you can print frames independently, e.g.
top.frames[1].print()
If you include a print button or listen to print events, you can call your print function that prints only the frame you want.
Or you can use CSS @media print to set what gets printed
Highlight (select) what you want to print, right-click over the selected area and hit print.
p.s.: No other option worked. The add-on (Chrome app) doesn't have a print option, only open in new window and by doing so it sends a new page request and for many sites it won't work.
The best way is to use this "Chrome App" to add a Context sub-menu to your Chrome.
After the installation right click on the frame you want to print, select [This Frame] and the select the option that fits the best with your situation, usually [Open Frame in New tab]. Once you have the frame in a new tab you simply print it with CTRL-P or Right-Click [Print].
@media print { .div-to-not-print {display:none}}
is problematic because
The suggestion
Click on the File > Print , then use the option Simplify Page
may work in some circumstances, but, for me, it just removes all frames and reverts to the <noframe>
content in the frameset page.
As far as I can tell, there is no decent way to print just one frame in a frameset that is already loaded. A Chrome plugin that I haven't tried called "Print This Frame" really just re-loads the frame in a new tab (with a round-trip to the server).
But, without that plugin, if the frame you want to print was created from a hyperlink within the frameset, you can usually load the frame in a separate tab or window just by right-clicking on that link and selecting "Open link in new tab" or "Open link in new window"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With