Printing Plugin for Ext Cal

Plugins and extensions for Extensible components, usage examples, links to applications using Extensible, etc.

Printing Plugin for Ext Cal

Postby gerardhoran » Thu Apr 26, 2012 9:16 am

Has anybody cracked printing the Calander?

ger
gerardhoran
Premium Member
Premium Member
 
Posts: 3
Joined: Thu Apr 26, 2012 9:14 am

Re: Printing Plugin for Ext Cal

Postby gabe.sidler » Fri Apr 27, 2012 12:14 am

Hi Gerard,
I have implemented limited printing support for my calendar application. Currently supported is only the printing of a single event with all attributes. The solution I have chosen consists of a client-side print preview widget and a server-side module that generates HTML code suited for printing.

Technically, the print preview widget is a Ext.window.Window with an embedded iframe. When the user requests a print preview , I load a printer-friendly version of the view (a html document, but could be PDF as well) from the server into the iframe. The iframe is needed because the browsers allows me to print just the content of an iframe, without all the surrounding Ext JS chrome.

In terms of integrating it into the calendar, I have extented the context menu by an option "Print"
Image

This new print option opens the print preview window of an event. A toolbar button "Print" will then invoke the browser's print dialog.
Image

You can see it in action at http://www.teamup.com/en/products/live-demo Start one of the live demo calendars.

I am very interested to hear from other people how they implemented print support. Bryntum has an interesting client-side approach to printing. See an example here: http://www.bryntum.com/examples/gantt-l ... print.html It would be interesting to find out how that work.

Gabe
User avatar
gabe.sidler
Moderator
Moderator
 
Posts: 126
Joined: Sun Sep 25, 2011 4:34 am

Re: Printing Plugin for Ext Cal

Postby gabe.sidler » Fri Apr 27, 2012 12:19 am

For anyone interested in the technical details of my solution, here the links to two forums posts over at Sencha.com that show the key concepts:


Gabe
User avatar
gabe.sidler
Moderator
Moderator
 
Posts: 126
Joined: Sun Sep 25, 2011 4:34 am


Return to Plugins, Examples & Extras

Who is online

Users browsing this forum: No registered users and 1 guest

cron