Sunday, December 19, 2010

Download Shopping Cart as a PDF Document

The custom feature “Download As PDF” allows the user to view and download iStore Shopping Cart page as a PDF document. Following steps are required to be following implement this functionality,


  1. Create new button “Download As PDF” on the cart page.
  2. Create new custom JSP, that would convert the cart into PDF document.

The PDF document would be displayed in a new window, when user clicks on the button “Download As PDF”. User can save this PDF file for future use.

Below screen shows the cart page with custom button “Download As PDF”.

11.png

Page for PDF View



The Custom JSP uses the iStore APIs to retrieve the cart information and create a PDF file. “iText” package is used to create the PDF document.

The below screen shows the generated PDF view of the cart shown in above screenshot,

21.png

No comments:

Post a Comment