[Seaside] Print document

"M. Polák" nigol at nigol.cz
Mon Jun 15 14:58:00 UTC 2009


Hi Dario,
	I'm using this scheme: I have a "printComponent", which display the  
page I want to print. Then I have following code to call that component:

	html anchor
						callback: [self session
								addLoadScript: (SUStream on: 'javascript:print()').
							self call: self printComponent];
						 with: 'Print'.

and in "printComponent" inside renderContentOn: I have code:

	html anchor
				callback: [self session clearLoadScripts.
					self answer: true];
				 with: 'Close'

and everything works OK. Hope this help.


Martin


On 15.6.2009, at 16:23, Dario Trussardi wrote:

> Hi All,
>
> i need to print web page in background.
>
> For now,  i open a popup window with popupAnchor.
>
> At the top of this new window i put:
>
>         html anchor
>                 attributeAt: 'href' put : 'javascript:  
> window.print()':
>                 with: 'Print'.
>
> With this i open the Printer dialog.
>
>
> It work fine but :
>
>     1) i open new window
>
>     2) the user need click on 'Print' anchor and after answer to  
> Printer dialog
>
> I can do this in background ?
>
> With only one clic do all it?
>
> Any pointers would be greatly appreciated!
>
> Thanks!
>
>     Dario
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list