[Inso Home Page] [Home] [Collection] [Book] [Expand] [Collapse] [Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] [Preferences] [Print] [Help]

 inside  Expand Search


   Exporting XML in DynaWeb   [Table of Contents]  4. Managing DynaWeb Collections

DynaWeb Publishers Guide

[-] 3. Overview of DynaWeb Configuration Files
[-] Printing From DynaWeb

Printing From DynaWeb

This section explains how DynaWeb handles a print request. It covers configuration files, the dwprint engine, the printing interface, and print spoolers, and is intended to give the publisher a greater understanding of a print request. More information on using the printing interface can be found in the DynaWeb Client Guide, while additional information on modifying the printing interface is located in Chapter 5, "Modifying the DynaWeb Interface."

How DynaWeb Handles Printing

A user initiates a print request by selecting the Print button from a book-level button bar. The Print button is not available above the book level. Selecting the Print button activates the dwGeneric__BookPrintView template in the bookprnt.dwc file and causes the printing interface to be displayed. The user can select sections of the book or the entire book from this interface, as well as a print stylesheet (a print view), an encoding (a print locale), a spooler for the output, and a format for the print file.

The user can also choose whether or not to print the graphics contained in the book. Once users have made their selections, they click the Print button. DynaWeb takes the submitted form and passes the user's selections to the Perl script printout.ps via CGI. The printout.ps script takes the selections and passes them to the dwprint engine in the appropriate manner. If PDF was selected as a format, dwprint passes the selections to the distiller (see the next section, ("Enabling PDF Printing in DynaWeb").

dwprint is a command-line executable that interprets a list of sections to print and returns a PostScript file or passes the request along to a PDF generator. dwprint then creates a PostScript file containing the user-selected sections. Once the file is created, DynaWeb sends the generated PostScript or PDF file to the user as data with a mimetype of application/postscript if the file is PostScript, or application/pdf if the file is in PDF format.

The user then handles the file; either by saving it to disk or using a program such as GhostView (for PostScript) or Adobe Acrobat ( for PDF) to view the file.

Enabling PDF Printing in DynaWeb

In addition to creating a PostScript file, you can also generate an Adobe PDF file for your clients to download. This functionality requires the Adobe Acrobat 3.01 Distiller (or equivalent program) to be installed on your server machine. The following procedure illustrates the steps required to enable PDF generation. Once the steps are completed and the server restarted, a radio button will appear on the Print interface allowing the user to choose between PostScript and PDF.

Figure 3-3: Print Format Selection Area

raster
  1. Note the path to the Adobe Acrobat 3.01 Distiller's executable. This is required to produce the PDF file.
  2. In the bookprnt.dwc file, search for "distillpath" and place the path to your Acrobat executable inside the quotes. Remember to reverse backslashes into forward slashes, as backslashes will be interpreted by the Tcl parser. For example:
    dwSetParam dwprint {     
         exepath [dwGetParam DYNAWEB_DIR]/win32/bin/dwprint
         distillpath "c:/utils/distiller.exe"
     }
  3. Restart your server.

    The server should now create PDF files when the proper format is selected on the Print View. The generated file will have a mimetype of application/pdf.

    Required Files

    Overview

    Files that are required for printing are listed below. All directories are located under the DynaWeb installation.

    File Name

    Location

    Function

    dwprint

    [platform]/bin

    Command-line executable that creates a PostScript file for download.

    bookprnt.dwc

    data/config

    Constructs HTML form for choosing print preferences

    pls.map

    data

    Contains list of legal locales for the Print Locale form. See "Modifying the Printing Interface" for more information.

    config.dat (Unix only)

    data/ps

    Lists available spoolers for printing

    b_print.gif

    icons

    Graphic for Print button

    *.pv

    [book]/styles directory or location pointed to with styles.cat file

    Print stylesheet; formats output for printing

    The Printing Interface

    DynaWeb uses a form to generate the interface for choosing the specifics of the print request. The template that controls the form is called Generic__BookPrintView and is located in the bookprnt.dwc configuration file in the data/config directory under your DynaWeb installation.

    Figure 3-4: Printing Preferences

    raster

    Print Spoolers

    The file that details the print spoolers available to DynaWeb is called config.dat and is located in the data/ps directory under your DynaWeb installation.

    Print Locales

    The drop-down list that controls the choices for Print Locale is located in the bookprnt.dwc file in the data/config directory under your DynaWeb installation. More information on modifying your print locales can be found in the section entitled "Modifying the Print Interface" in Chapter 5, "Modifying the DynaWeb Interface."

    Print Views

    The choices for Print View can be found in the Generic__BookPrintView template in the bookprnt.dwc configuration file located in the in the data/config directory under your DynaWeb installation. More information on modifying your print views can be found in the section entitled "Modifying the Print Interface" in Chapter 5, "Modifying the DynaWeb Interface."


       Exporting XML in DynaWeb   [Table of Contents]  4. Managing DynaWeb Collections