Printing documents from a view (web)

I almost have my summer-break so in order not to forget what I have been doing lately here a summary of my activities on development: 

Recently I have been working on some projects which all had one thing in common: ‘printing documents from a web browser’.  In this article I describe you my solution how provide a funtion to print (multiple) documents from a web view, with maintaining the often used previous-next navigation in Domino views.

The function is based upon the idea of a cookie. In the cookie you write the document unique ID of the document you want to add to your print selection, and at the end, the point that the user want to actually print the selection, all documents will be collected via an AJAX request and added on a new window.

I have no idea what the performance impact are and have not tested the application well in IE, I assume there might be some considerations using different browser types and versions.

print expl 01

In the view for each document the user has the option to ‘add’ this document to his ‘selection’. The selected document will be presented in a DIV below the view. Also the icon will change from blue to a more inactive ‘purple’:

print expl 02

In the example above the user has selected 2 documents, which can be deleted in 2 ways from the selection:

– document one by one

– all documents at once

print expl 3

Att the bottom the print icon uses a JavaScript function that makes an AJAX request for each document UNID in the cookie and writes the result (HTML) to a new window:

print expl 4

Since the whole idea is based upon a normal default Domino view and it support the option to use the previous-next navigation I think this approach should be easy to implement in most applications.

A sample of the application can be found here. Since this was only one of my approaches to enable printing Notes documents from a webbrowser there is more to come soon.

Now I can really start backpacking at ease 🙂


6 thoughts on “Printing documents from a view (web)

  1. Elijah Lapson 2007-August-31 / 7:02 pm

    This is incredible! Thanks for sharing.

    Elijah Lapson

  2. quintessens 2007-August-31 / 7:41 pm

    well I noticed some problems with the number of docid’s in one single cookie, when using the noteID instead it will increase the amount of documents you can add in this function…

    I also tried to work with using multiple cookies for 1 domain which works perfect in Firefox, but IE still wants to store everuthing in 1 single function 😕

  3. Ankur Sharma 2007-September-18 / 2:23 pm

    Please send me

  4. Peter Twist 2008-January-7 / 7:14 pm

    Fascinating, I’m going to give that a try.

  5. Simmi 2008-February-21 / 12:14 am

    did anyone get a chance to try this? if any sucess, could you please send me the code.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s