Welcome Guest! Register/Login
Web services for automated content conversion and deployment

Hyper.Net SharePoint Edition Getting Started Guide

Show Comments (0)    Public Domain Bookmark this publication
Controlling the appearance of published content Customizing the PDF metadata stamping process Configuring the metadata stamping task
Table of ContentClose
Hyper.Net SharePoint Edition Getting Started Guide
Configuring the metadata stamping task
Take a look again at the contents of the MetadataStamp section:
   
Note
In the above example, the value specified for values is functionally ignored. These are placed in the property solely as a hint to the developer as to what values are valid for Value.
 
The most important thing to note about this section (and the other task definitions in the hypernetconfig.xml file) is that the content begins with inputFile and ends with outputFile. These are required. inputFile tells the conversion process where to locate the file to be opened and processed. outputFile tells the conversion process where to save the processed file at the designated location using the given name.
   
Note
If you do not specify inputFile, the process will not have a file to process. If you do not specify outputFile, the changes made during the process will not be saved.
Many tasks may be run for a document that is being transformed. In this case, each task begins with the file that was produced by the last task. It is therefore important to verify that any inputFile and outputFile modifications you make to the hypernetconfig.xml logically fit with the other tasks that have been configured. If you give outputFile a name that the next executing task does not expect, the next task will not run properly.
 
The remaining properties allow you to define the metadata stamp you want and where to place it. The available properties include:
 
     
Property
Description
Valid values and usage
inputFile
The full path and file name of the file that should receive the metadata stamp
The full path and name to the file to be processed. This may be the source document itself or may be a document resulting from a previously executed task. In the case of metadata stamping, inputFile should always refer to a PDF file that has already been created by Hyper.Net. In most cases this is publication.pdf. In most cases, you will not need to modify this value to produce a custom metadata stamp that meets your needs.
fontFamily
The font to be used to create the metadata stamp
You are free to choose any font that exists on the Hyper.Net transformation Server.
fontColor
The color to be used to create the metadata stamp
Configure the desired color using standard hexadecimal notation.
fontSize
The font size to be used to create the metadata stamp
You may select any value font size.
position
The position on the page where the metadata stamp should be placed
The position is used as a starting point for calculating exact placement, which is controlled by d_padding.
Value values are upperleft, upperright, lowerleft, lowerright.
d_padding
The X-Y offset from position where the metadata stamp should be placed
The value for d_padding should be given as two positive integers in a string, for example: "66 34".
The first value is the X offset from the position. The second value is the Y offset.
orientation
The orientation the metadata stamp should be given
The metadata stamp may be placed on the page using the following orientations: vertical, horizontal, diagonal.
Note that the option diagonal is supported even though it does not appear in the examples above.
format
The metadata information that should be stamped
See table below.
tempFolder
The temp folder that should be used during the metadata stamping process
This is where the work takes place. In most cases, this value should be kept consistent with all other tasks defined in the hypernetconfig.xml.
outputFile
The full path and file name of the file that contains the new metadata stamp
The full path and name of the file to be saved. In most cases this is publication.pdf, just like the inputFile, so that all tasks working with PDFs can reliably assume that the name of a file to be processed is publication.pdf. If you are defining multiple tasks, however, you may want to pass different names between your tasks for clarity. In most cases, you will not need to modify this value to produce a custom metadata stamp that meets your needs.
 
The value for format is usually computed by accessing various values from the system or from the value being published. The following constructs are supported:
 
   
Type of value
Reference syntax and usage
File name and location
{request.Filename}
{request.FolderPath}
Publication metadata
{request.PublicationMetaData.<name> ['<formatstring>|<arrayindex>']}
Examples:
{request.PublicationMetaData.Date 'yyyy.MM.dd'}
{request.PublicationMetaData.uiversion '000'}
{request.PublicationMetaData.MyCustomDocumentMetadataValue}
Current timestamp (at the time of processing)
{date ['<formatstring>']}
Example: {date 'yyyyMMdd_HHmm'} -> 20101108_1339
Document information
{request.Document.<DocId|Effective|Audience|PubId|PubTitle|DocType|
DocumentTitle|Language|LastModDate|LastModBy|Custom1|Custom2|
Custom3|Custom4|Custom5|Custom6|Custom7|CustomDate> ['<formatstring>']}
Examples:
{request.Document.LastModBy}
{request.Document.Custom1}
Text
Enter the desired text into the Value string.
Examples:
Value="{request.Document.LastModBy} on {request.Document.LastModDate 'yyyy.MM.dd'}"
Value="Proprietary Information - Do Not Distribute"
 
   
Note
<formatstring> is a standard .Net format string for formatting numbers or datetime values.
Other information may be accessed from customized task definitions when Hyper.Net is being run as a Web service. For more information, refer to the Hyper.Net Support Database at www.coextant.com.
 
   
Note
If you only need to stamp one metadata string into one location of each page in your PDF, you only need to modify the MetadataStamp task as described above. If you need to stamp multiple metadata strings onto each page of each PDF, refer to the next section: Placing multiple metadata stamps on the document.
 
   
Note
Remember that in the discussion above, we only modified the MetadataStamp task for the Word conversion. You may wish to make the same changes to the conversions for other document types.
   
Note
After modifying hypernetconfig.xml, you will need to stop and restart the service HNKTConversionService running on the Hyper.Net transformation Server for your changes to take effect. This causes Hyper.Net to re-read the configuration file.
Loading, please wait...
About Publications
Contributor
Aruna
Published: 5/11/2011
Tags:
0 5,396 0
Display Options
Embed, Share & Subscribe
Download
Rate & Report
Statistics