Content

Overview

Description

Selecting Files to Upload

Text and Word Files

Image Files

Excel Files

PowerPoint Files

PDF Files

Configuration Properties

 
 

 

 

 

Overview

Top../images/arwup.gif (846 bytes)

The "File Viewer" Control uploads files to LABVANTAGE_HOME\eln\attachments and inserts the files into an ELN/LES Worksheet as Attachments. File content can then be viewed and edited in the Worksheet. Allowable file types are:

Text files in .txt, .csv, and .xml formats.
Microsoft Word files in .doc and .docx formats.
Image files in .png, .jpg, and .gif formats.
Microsoft Excel files in .xls and.xlsx formats.
Microsoft PowerPoint files in .ppt and .pptx formats.
Adobe PDF files in .pdf format.

 

Description

Top../images/arwup.gif (846 bytes)

Selecting Files to Upload

 

After adding the File Viewer Control to the Worksheet, the File Viewer opens in "Upload" mode. This renders a selection area that lets you drag over your file or click the the text as instructed and choose the file from a file browse dialog. After selecting the file, the file uploads to LABVANTAGE_HOME\eln\attachments. The file control then refreshes to show the attachment in "View" mode, which is view-only.

Text and Word Files

 

Text and Word files in "View" mode can be modified by clicking "Edit".

The line/page options allow control over the number of lines shown for text files (below left) and number of pages shown for Word files (below right). The defaults are configurable using the Configuration Properties.

Changing these fields prompts you to regenerate the preview as shown below. You can click the link or "Save Changes" to regenerate.

The icons apply to all file types: 

The "Upload" icon is used to change or re-upload files. This clears the rendered file from the Control and once again displays the selection area that lets you select and upload another file.
The "Revert" icon reverses all changes made in the view mode preview and reinserts the file into the Control to generate a new view mode preview. This may be important if the referenced Attachment has changed.
NOTE: The conversion of Word to HTML is performed by the Aspose.Words File Format API, which controls the appearance of the rendered HTML.

Image Files

 

Image files in "View" mode show a compressed view of the image. The default resolution is configurable using the Configuration Properties. The image can be modified by clicking "Edit".

The top banner shows a description of the uploaded file, the resolution of the image to show in view mode, and a preview of the image. Using the resolution input fields, you can modify the width and height of the image to show in view mode. The aspect ratio of the image is preserved (changing one dimension alters the other and refreshes the view). The "Use Raw Image" checkbox forces the Control to show the native Attachment in view mode with no markup, editing, or resizing.

The size options allow control over the size of the image.

Changing these fields prompts you to regenerate the preview as shown below. You can click the link or "Save Changes" to regenerate.

These icons are provided on the toolbar: 

The "Upload" icon is used to change or re-upload files. This clears the rendered file from the Control and once again displays the selection area that lets you select and upload another file.
The "Revert" icon reverses all changes made in the view mode preview and reinserts the file into the Control to generate a new view mode preview.
The "Markup" icon lets you draw on the image. This uses the same tool as the Rich Text Control image markup. After adding your markups, Add any markup such as text, drawing and shapes and click the Save Changes to store the changes. Please note the original attachment is unchanged and the markup is stored in the control only.
The "Crop and Edit" icon lets you crop, rotate, and flip the image. This opens a cropping area with a new toolbar.

Clicking the first "Crop" button crops the selected area. The second "Rotate" button rotates the image by 90 degrees clockwise. The last two buttons flip horizontally and vertically.

When finished editing or cropping, click "Save Changes".

Be advised that the original Attachment is unchanged. The edited changes are stored in the Control only.

NOTE: The processing of WMF, EMF, TIFF and TIF files is done by the Aspose.Imaging Library.

When processing TIFF files, only the first frame is taken when multiple frames exist in the image. Both image types (WMF, EMF and TIFF and TIF) do not show the "Use Raw Image" option on the edit file control as the image cannot be displayed natively in the browser.

 

Excel Files

 

Excel files in "View" mode can be modified by clicking "Edit".

The options allow control over the number of sheets shown and whether or not gridlines are shown. The defaults are configurable using the Configuration Properties.

Changing these fields prompts you to regenerate the preview as shown below. You can click the link or "Save Changes" to regenerate.

The icons apply to all file types: 

The "Upload" icon is used to change or re-upload files. This clears the rendered file from the Control and once again displays the selection area that lets you select and upload another file.
The "Revert" icon reverses all changes made in the view mode preview and reinserts the file into the Control to generate a new view mode preview. This may be important if the referenced Attachment has changed.

PowerPoint Files

 

PowerPoint files in "View" mode can be modified by clicking "Edit".

The options allow control over the number of slides shown and image scaling. The defaults are configurable using the Configuration Properties.

Changing these fields prompts you to regenerate the preview as shown below. You can click the link or "Save Changes" to regenerate.

The icons apply to all file types: 

The "Upload" icon is used to change or re-upload files. This clears the rendered file from the Control and once again displays the selection area that lets you select and upload another file.
The "Revert" icon reverses all changes made in the view mode preview and reinserts the file into the Control to generate a new view mode preview. This may be important if the referenced Attachment has changed.

PDF Files

 

PDF files in "View" mode can be modified by clicking "Edit".

The options allow control over the number of pages shown. The defaults are configurable using the Configuration Properties.

Changing these fields prompts you to regenerate the preview as shown below. You can click the link or "Save Changes" to regenerate.

The icons apply to all file types: 

The "Upload" icon is used to change or re-upload files. This clears the rendered file from the Control and once again displays the selection area that lets you select and upload another file.
The "Revert" icon reverses all changes made in the view mode preview and reinserts the file into the Control to generate a new view mode preview. This may be important if the referenced Attachment has changed.

  

 

Configuration Properties

Top../images/arwup.gif (846 bytes)

These properties are available for configuring overall behavior.

NOTE: The maximum size of an uploaded file is determined by the "Maximum Upload File Size" property in System Configuration → Miscellaneous Options → File Management.
Property Description
Name Name of the Control that is displayed in the ELN interface. Leaving this blank defaults to the Control name provided in the OOB configuration.
Image Files Configures upload properties for image files.
PropertyDescription
AllowDetermines if image files can be uploaded. This accepts .png, .jpg, and .gif formats. The default is Yes.
Default Image WidthMaximum horizontal resolution of the image in pixels. The default is 600. The actual width will be kept within the image's aspect ratio and within this maximum.
Default Image HeightMaximum vertical resolution of the image in pixels. The default is 400. The actual height will be kept within the image's aspect ratio and within this maximum.
Word Files Configures upload properties for Microsoft Word files.
PropertyDescription
AllowDetermines if Word files can be uploaded. Ths accepts .doc and .docx formats. The default is Yes.
Initial Page Count To ReadNumber of Word pages read by default when a Word file is uploaded. The default value is 1.
Max Allowed PagesMaximum number of Word pages read when a Word file is uploaded. The default is 10.
Excel Files Configures upload properties for Microsoft Excel Files.
PropertyDescription
AllowDetermines if Excel files can be uploaded. Ths accepts .xls and .xlsx formats. The default is Yes.
Show Gridlines InitiallyDetermines if gridlines are visible in the uploaded file. The default is No.

When the file is first uploaded, the first sheet is displayed with or without gridlines per the configuration. You can then choose a different sheet (or all sheets) if desired.

PowerPoint Files Configures upload properties for Microsoft PowerPoint files.
PropertyDescription
AllowDetermines if PowerPoint files can be uploaded. Ths accepts .ppt and .pptx formats. The default is Yes.
Initial Slide Count To ReadNumber of slides read by default when a PowerPoint file is uploaded. The default value is 1.
Max Allowed SlidesMaximum number of slides read when a PowerPoint file is uploaded. The default is 10.
Render Style PowerPoint files are displayed by showing thumbnails of the desired slides. The thumbnails can be rendered in two different modes:
ModeConverts the slides to:
HTMLHTML/SVG
ImagePNG

You may need to experiment in order to determine which format provides the preferred output based on the PDF you are using (both to the screen and if exporting to Word).

PDF Files Configures upload properties for Adobe PDF files.
PropertyDescription
AllowDetermines if PDF files can be uploaded. Ths accepts .ppt and .pptx formats. The default is Yes.
Initial Page Count To ReadNumber of pages read by default when a PDF file is uploaded. The default value is 1.
Max Allowed PagesMaximum number of pages read when a PDF file is uploaded. The default is 10.
Text Files Configures upload properties for text files.
PropertyDescription
AllowDetermines if text files can be uploaded. This accepts .txt, .csv, and .xml formats. The default is Yes.
Initial Line Count To ReadNumber of lines of text to read by default when a text file is uploaded. The default is 50.
Max Allowed Text LinesMaximum number of lines of text to read by default when a text file is uploaded. The default is 500.
Operations Defines operations available on the Control Toolbar. See Common Control Operations for details.
PropertyDescription
ShowDetermines if the operation is visible on the toolbar.
TextText shown on the operation.
TipTooltip shown for the operation.
ImageImage displayed for the operation icon.
Activate OperationDetermines if the Operation is executed from the Control Toolbar (and F2 Edit shortcut key). In general, "Activate Operation" is typically enabled only when the Control is view-only and does not have an editor.
TypeDefines the functionality performed by the Operation (with the exception of the "Menu" option as described below).
OptionDescription
MenuAllows an Operation button to display a sub-menu of other Operations.
ExternalAddDefines a Lookup page that returns one or more SDIs. The SDIs are then associated with the Control in the WorksheetItemSDI table.
TaskExecutionDefines a Standalone Task to execute. The Standalone Task automatically adds the SDIs associated with the Control (in the WorksheetItemSDI table) to a matching (by SDC) Input Queue, and adds any SDIs generated to the WorksheetItemSDI table on completion. If you are unfamilar with Standalone Tasks, see Workflow Task Conceptual Reference → Standalone Tasks.
ModalLinkDefines a Maintenance page to edit the set of SDIs associated with the Control.
ModelessLinkDefines a page to display when the Operation button is clicked.
ActionBlock Allows Actions to be executed. The Action sequence and control logic is defined using the Action Block Editor (open by clicking "Edit Action Block").

Standard substitutions of [worksheetid], [worksheetversionid], [worksheetitemid], and [worksheetitemversionid] are available. LIMS Controls have the additional substitutions of [sdcid], [keyid1], [keyid2] and [keyid3]. KeyId substitutions are derived from the SDIs associated with the Control (or Worksheet if the "Operation Source" property is set to "Worksheet").

CustomDefines JavaScript to execute when the Operation button is clicked.
NOTE: SDIs can be added to Controls using any of the following methods:
Drag SDIs from the LIMS Data panel into the Control. No new SDIs are created or added to the Worksheet. Associations are simply being added to the WorksheetItemSDI table.
Use the "ExternalAdd" Operation Type. No new SDIs are created, but the WorksheetSDI and WorksheetItemSDI tables are updated with the selected SDIs.
Use the "TaskExecution" Operation Type. For example, this could define a "LoginSample" Standalone Task that creates new SDIs and adds/associates them to the Worksheet on Task completion.
Includes Allows complex/extended JavaScript to be added to an Operation of Type "Custom".