Edit WebSubmit Function

Main Menu

Enter Function Details:

Stamp_Uploaded_Files Function Details:
   
Function Name: Stamp_Uploaded_Files
Function Description:
Function Documentation:
Stamp certain files that have been uploaded during a submission.

@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'
           }

     + files_to_be_stamped: (string) - The directories in which files
        should be stamped: This is a comma-separated list of directory
        names. E.g.:
           DEMOTHESIS_MAIN,DEMOTHESIS_ADDITIONAL

        (If you use Create_Upload_Files_Interface function, you
        should know that uploaded files goes under a subdirectory
        'updated/' of the /files/ folder in submission directory:
        in this case you have to specify this component in the
        parameter. For eg:
        updated/DEMOTHESIS_MAIN,updated/DEMOTHESIS_ADDITIONAL)

     + stamp: (string) - the type of stamp to be applied to the files.
        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)

     + switch_file: (string) - when this value is set, specifies
        the name of a file that will swith on/off the
        stamping. The 'switch_file' must contain the names defined
        in 'files_to_be_stamped' (comma-separated values). Stamp
        will be applied only to files referenced in the
        switch_file. No stamp is applied if the switch_file is
        missing from the submission directory.
        However if the no switch_file is defined in this variable
        (parameter is left empty), stamps are applied according
        the variable 'files_to_be_stamped'.
        Useful for eg. if you want to let your users control the
        stamping with a checkbox on your submission page.

If all goes according to plan, for each directory in which files are to
be stamped, the original, unstamped files should be found in a
directory 'files_before_stamping/DIRNAME', and the stamped versions
should be found under 'files/DIRNAME'. E.g., for DEMOTHESIS_Main:
     - Unstamped: files_before_stamping/DEMOTHESIS_Main
     - Stamped:   files/DEMOTHESIS_Main
 

Parameters for Function Stamp_Uploaded_Files:

Parameter  
None

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