I had to do this just this morning :)
Create the iframe and set the source property to "about:blank" and add a
"load" listener; if you don't set the source property you never get a "load"
(or "appear") event. Your load listener sets the body, e.g.:
this.__frame = new qx.ui.embed.Iframe("about:blank");
this.__frame.addListener("load", function() {
var doc = this.__frame.getDocument();
doc.body.innerHTML = '<p>hello world</p>';
}, this);
And when you want to print:
this.__frame.getWindow().print();
Tested on FF and Chrome.
John
From: Ken MacDonald <[email protected]>
Reply-To: qooxdoo Development <[email protected]>
Date: Tue, 22 Nov 2011 11:41:36 -0500
To: qooxdoo Development <[email protected]>
Subject: Re: [qooxdoo-devel] Qooxdoo: Display and print HTML taller than
window?
We are hoping not to have to open a new window; is there a way to modify the
embed.html 'div' settings when it is created, or otherwise get this to work
in a single qooxdoo window?
Ken
On Tue, Nov 22, 2011 at 11:19 AM, thron7 <[email protected]>
wrote:
>
>
> On 11/22/2011 03:49 PM, Ken MacDonald wrote:
>> > Hi,
>> > We are looking for a solution for a client to be able to display some
>> > arbitrary html in our qooxdoo app; specifically some html that may
>> > turn out to be too tall for the window or for the computer screen. I
>> > can get scroll bars which allow me to view the html all of the way to
>> > the bottom, but if I use the File->Print to print, all we are getting
>> > is the portion of the html that is visible on the screen. We would
>> > like to have the entire document print, even if it takes several
>> > pages. I 've tried a number of combinations, trying to set the Root's
>> > height, with or without a Scroll container, etc. but in all case my
>> > printout is only the visible portion on the screen, not the entire html.
>
>
> The issue relates to the way layouts are handled in qooxdoo. The
> enclosing Div's of your, say, embed.Html element have fixed dimensions.
> If you then invoke File->Print the browser has no other chance then to
> print just this visible part. A solution could be to implement an own
> "Print" button, and on press open a new browser window, and setting your
> HTML string as the body's innerHtml. Then let the user print *this* window.
>
> T.
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
----------------------------------------------------------------------------
-- All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security threats,
fraudulent activity, and more. Splunk takes this data and makes sense of it.
IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d___________________________________________
____ qooxdoo-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel