Rad Card

Online Business Card Designer

Thank you for downloading Rad Card, a system your clients can use to design their visiting cards while at your web site.

Rad Card is not intended to be used as a standalone application. It should be integrated with your existing web infrastructure, and this document will help you get started.

Configuration

The basic configuration involves editing the designer.properties file, you will find a brief description of each setting with in the file. A more detailed discussion of some of the settings as well as the applets behaviour is discussed below.

Please note that all settings are case sensitive

Retrieving a list of available images

You will need to maintain a collection of images for use in business cards. These images may be the logos and other artworks that the client may have uploaded, or they can be a set of images that you make available as a part of your service. In any event you need to provide a list of these images to the applet.

The filelist settings in the configuration file tells the applet where to retrieve the image list.The filelist is a URL which should be mapped to a script on your web server that can provide such a list (for example by querying your database).

The applet expects entries to be separated by the new line (\n) character and it also expects the number that identifies the image and the image name to be separated by a comma (,). The image name does not need to be the filename of the image. The unique number could be the primary key in a table of your database.

The sample php script included (filelist.php) demonstrates this functionality.

Retrieving images

The imgUrl property tells the applet where to retrieve images from. The information passed by the applet will be a number that uniquely identifies the chosen image. This identifier will be one of the values passed to the applet by the filelist URL described above.

It is the responsibility of your web application to ensure that the image being requested does exist and to make sure that the user has the required permissions to retrieve the selected image. The script should also return the correct set of headers for image types.

Manipulating saved designs

The templateUrl property defines a URL which will provide support for listing, retrieving, modifying and saving designs to your database. The functionality is described in more detail below. The applet will pass different parameters to this URL for different actions.

Retrieve a list of existing designs

The list of previously made designed are expected in a format similar to what has been described above for retrieving the list of saved images. The parameter passed to script will be named action and it will take the value of aplist

Retrieve a saved design

When the user wants to retrieve a previously saved design from the server, the applet will pass an id parameter to your server side script. The value of this parameter will be the identifier associated with a particular design. The application is responsible for validating this id.

Save/update design

When a new design is being saved for the first time the action parameter will take on the value of new. When modifications to an existing design is being saved the action parameter will be update in both cases a second parameter data data will contain the actual data that describes the user's design. This design is in an xml format.

Uploading new images

If you are using Rad Card standard edition, it is capable of adding new images directly from the users hard disk. When the user imports an image with cut and paste, what actually happens is that the image is first uploaded to the server, processed and a corresponding identifier returned to the applet.

For this functionality to work correctly you need to specify the URL of a script capable of handling file uploads as the uploadUrl in the configuration file. You may find the sample script upload.php included with the download useful when getting started.

If you are using Rad Card Lite, you need to provide the user with some other means of adding their images to the design, possibly with a simple web based file upload form or with Rad Upload. In this case the templateUrl should reflect any changes that have occurred.

Canvas Sizes

There are two settings that are used to share information about the available canvas sizes with the applet, however one of these settings (canvasSizes) is intended to be used only with the standard edition. canvasSizes provides a URL from which supported sizes can be retrieved. It is expected to be in an XML format and you will find a sample in sizes.xml/

The second setting, canvassize defines the default size of the canvas. In the free version of rad card, the canvas size cannot be changed dynamically but you can customize the size to suite your requirement by setting the canvasSize parameter in the configuration file.

If you are using the standard edition, the canvasSize property should be the largest supported size.

Note: If you are using Rad Card Lite, all the urls that you set in the designer.properties file should be at the same web site as your applet. This restriction does not apply to the standard edition.