Edit WebSubmit Function

Main Menu

Enter Function Details:

Stamp_Replace_Single_File_Approval Function Details:
   
Function Name: Stamp_Replace_Single_File_Approval
Function Description:
Function Documentation:
This function is intended to be called when a document has been
approved and needs to be stamped.
The function should be used when there is ONLY ONE file to be
stamped after approval (for example, the "main file").
The name of the file to be stamped should be known and should be stored
in a file in the submission's working directory (without the extension).
Generally, this will work our fine as the main file is named after the
report number of the document, this will be stored in the report number
file.

@param parameters: (dictionary) - must contain:

     + latex_template: (string) - the name of the LaTeX template that
        should be used for the creation of the stamp.

     + latex_template_vars: (string) - a string-ified dictionary
        of variables to be replaced in the LaTeX template and the
        values (or names of files in curdir containing the values)
        with which to replace them. Use prefix 'FILE:' to specify
        that the stamped value must be read from a file in
        submission directory instead of being a fixed value to
        stamp.
        E.G.:
           { 'TITLE' : 'FILE:DEMOTHESIS_TITLE',
             'DATE'  : 'FILE:DEMOTHESIS_DATE'
           }

     + file_to_be_stamped: (string) - this is the name of a file in the
        submission's working directory that contains the name of the
        bibdocfile that is to be stamped.

     + new_file_name: (string) - this is the name of a file in the
        submission's working directory that contains the name that is to
        be given to the file after it has been stamped. If empty, or if
        that file doesn't exist, the file will not be renamed after
        stamping.

     + switch_file: (string) - when this value is set, specifies
        the name of a file that will swith on/off the
        stamping. The stamp will be applied if the file exists in
        the submission directory and is not empty. If the file
        cannot be found or is empty, the stamp is not applied.
        Useful for eg. if you want to let your users control the
        stamping with a checkbox on your submission page.
        Leave this parameter empty to always stamp by default.

     + stamp: (string) - the type of stamp to be applied to the file.
        should be one of:
          + first (only the first page is stamped);
          + all (all pages are stamped);
          + coverpage (a separate cover-page is added to the file as a
             first page);

     + layer: (string) - the position of the stamp. Should be one of:
          + background (invisible if original file has a white
            -not transparent- background layer)
          + foreground (on top of the stamped file.  If the stamp
            does not have a transparent background, will hide all
            of the document layers)
       The default value is 'background'.
 

Parameters for Function Stamp_Replace_Single_File_Approval:

Parameter  
None

Add Parameter to Function Stamp_Replace_Single_File_Approval:
Add Parameter: Select a parameter to add to function:    -Or-  Enter a new parameter: