IFrame content is showing as blank while printing the whole page - asp.net

I have asp.net page, in that page i have lot of design, and i have put one Iframe control. I am loading pdf in iframe. When i print the page, all the designs in the page are showing whereas the Iframe content showing as blank?
Can anyone suggest how to print the iframe content along with the page design?
I have asp.net page, in that page i have lot of design, and i have put one Iframe control. I am loading pdf in iframe. When i print the page, all the designs in the page are showing whereas the Iframe content showing as blank?
Can anyone suggest how to print the iframe content along with the page design?

The reason we use frames such as <Embed an <Object in <iFrame is so we can run one binary application/pdf window inside another binary application/html window.
Thus, if it's allowed, we print one or the other that are present in their own window.
It is often the case that a pdf is not reloaded into the browser after its downloaded by the inner framed application.
So you can print a web page natively by both applications as two pages, but thats not much use as an answer to your question.
The only reasonable solution is to capture the combined screen output, and for that we can press print screen or take a screenshot with yet another binary application, such as the operating system driving the screen.

Related

How to detect what cause empty/blank pages printed from web page

I'm working on printing product web page. Employ #media print {...} to customize components for proper appearance on print canvas. But one issue I even can't understand how to drill to the root of the problem. The issue is that 3 out of 5 total pages are blank. First two pages rendered with content and then three blank pages. Chrome print preview popup window just give result and I have no clue what component(s) responsible for "printing" blank pages.
I find how to use chrome devtool to emulate print canvas and drill down to trouble maker

asp.net page not fully loading in IE6 from iframe

I have two iframes on a page, one of which displays a simple asp.net page, the other is used to display office documents, normally in the browser using an active x control.
This all works fine unless I 1: run on IE6 SP3 & 2: disable the activeX control and allow the document to be shown natively by the client (i.e in word etc.). When this happens the document is displayed with no issues, however the other iframe is either blank or just displaying the background image.
Using fiddler I can see that all content has come down so the troublesome iframe should render correctly, however when I view its' source all I get is the top part of the content, down as far as
var theForm = document.f
Does anyone have any ideas ???

Hiding/Removing headers, footers & side navigation from an asp.net document that is in an iframe

I am a newbie at this web stuff and am stuck trying to figure out how to strip the headers, footers and side navigation from a document that is being used as the source for the iframe. I have a document page that is displayed in an iframe, but it is displaying everything like the navigation sidebars and the header and footer. Unfortunately, this document page by itself needs the navigation stuff on the top and side, but when displayed in the iframe, it will confuse the user as the unwanted stuff is duplicated with the parent page. So.... How do I remove the side navigation, header and footer?
I am using asp.net. The document is being set in the code behind using attributes (i.e. iframe.Attributes.Add("src", "index.aspx")). So I need to strip out the unwanted stuff before loading it into the iframe and cannot seem to find any methods of achieving this, nor can I find any references on the internet. Please help!
You have to implement a iframe (print in the article given) stylesheet as per http://www.killersites.com/articles/newsletterArchive/Newsletter_Nov3_2003.htm.
Then when you are calling from ASP.net, you can open the page with the new CSS.
Hope this helps.

Back button loop with IFRAMES

In my (school) website we use Iframes to display class blogs (on blogger). This works well EXCEPT if the user then clicks on (say) a photo inside the iframe. Blogger (in this case) then displays the photo in the whole browser window and the back button loops; that is if the back button is hit, the browser (IE, FF, Chrome) stays on the same page. The only way out is for the user to jump back two pages (which many of our users don't know how to do).
I've read a lot of posts on back buttons and iframes and there doesn't appear to be a simple solution. Bear in mind that I don't have control over the iframe content (so no embedded back buttons in the frame are possible). Ideas anyone?
The solution I would use would be to loop through the iframe content after it has been loaded and set target attributes on links in the iframe so that they open in either the iframe, or in a new window. Here's an example using jQuery:
$('#iframeID').contents().find('a').attr('target', '_blank');
You could do something similar using a loop and DOM methods, I'll post some code to do that if your not sure how to go about it.
EDIT: can't access the content if its cross domain, so this wouldn't work in this case

EMBED tag within container DIV not getting displayed in IE6

Please don't poke me for using IE6 but that's a client's requirement.
My question is, I have an EMBED tag that displays a PDF dynamically depending on the user choice which means the first time the page gets rendered there won't be any EMBED tags but will be when the user picks a choice.
The problem seems to be that when the EMBED tag is flushed to the client side either the container DIV is not expanding enough to accommodate the EMBED tag or the EMBED tag is getting lost somewhere (as if).
On Firefox the EMBED does show-up (even though it's not the desired size) but on IE6 the EMBED is not visible at all (even though it's in the page source). I tried the container DIV to a fixed height (1200px) but didn't help.
The DOM hierarchy is something of,
container DIV
contains another container DIV that set to float
EMDED tag is within the floated container
Do you see any obvious issues with this model?
Greatly appreciated your help.
Note: It's an ASP.NET app (I don't know if it matters given the messy control ID's it create automatically)
IE does not support <embed> at all. You have to use an <object> to embed plugins for IE. As usual there are issues with embedding markup, but I think this would be a place to start:
<object type="application/pdf" data="something.pdf" width="(x)" height="(y)">
<param name="src" value="something.pdf">
</object>
But I'd advise against trying to embed PDF. Some people (including myself) absolutely hate reading a PDF squashed inside the browser. It also requires the user to have a PDF plugin, which is another potentially-insecure piece of net-facing code; PDF reader exploits have been one of the most widespread web attacks over the past year.
Providing a plain PDF link in addition to or instead of the embed will allow you to reach more users, and let them decide themselves whether to download or view the PDF in the browser.

Resources