Adding a New Page Size Option to the Print from Web Tool

 This article is suitable for a Library Administrator

Ref: 201308201041
Last Edited: August 21st, 2013

Introduction

The Print from Web tool prints process maps (and other web pages) from a process library website. A printable image is created, the size and orientation of which is defined in the Settings XML file.

Triaster\TriasterServer2011\Settings\Settings.xml

It is this image that is printed from within Internet Explorer.


Configuring Print Sizes

Settings Groups

When PRINT is clicked from the website toolbar, the size and orientation can be chosen from a drop-down list box, where the list items are defined as Settings Groups in the Settings file.

    <SettingsGroup Name="A4 Portrait">
      <PageSetup>
        <!-- Size
Specifies a paper size as defined by
ProcessNavigator/PrintFromWeb/PaperSizes/PaperSize
-->
        <Size>A4</Size>
        <!-- Orientation
Portrait or Landscape
-->
        <Orientation>Portrait</Orientation>
      </PageSetup>
      <Margins>
        <!-- Margins are defined as Portrait -->
        <Left>19.05</Left>
        <Right>19.05</Right>
        <Top>19.05</Top>
        <Bottom>19.05</Bottom>
      </Margins>
    </SettingsGroup>

The order in which the items are displayed in the list box is the order in which they are recorded in the Settings file. If there is to be a default setting, it should be the first Settings Group defined.

Note: There is a 'Default' attribute of a 'SettingsGroup' tag, which, if set to 'True', sets that Settings Group as the default one when the facility to choose the size and orientation is switched off (a configuration that needs to be made directly in the Settings XML file).

Paper Size

The 'Size' setting of a Settings Group refers to the Paper Size settings, defined in the PaperSizes section below SettingsGroups.

    <PaperSizes>
      <!-- Paper sizes are defined as Portrait in millimeters-->
      <PaperSize Name="A0">
        <Width>841</Width>
        <Height>1189</Height>
      </PaperSize>
      <PaperSize Name="A1">
        <Width>594</Width>
        <Height>841</Height>
      </PaperSize>
      <PaperSize Name="A2">
        <Width>420</Width>
        <Height>594</Height>
      </PaperSize>
      <PaperSize Name="A3">
        <Width>297</Width>
        <Height>420</Height>
      </PaperSize>
      <PaperSize Name="A4">
        <Width>210</Width>
        <Height>297</Height>
      </PaperSize>
etc.

A Settings Group will take its size configuration from a reference to the Name attribute of the appropriate Paper Size setting.

Creating a New Page Size Option

The standard set of Settings Groups in the Settings XML file does not include all of the Paper Sizes defined. If a new Settings Group is required (for example, the standard paper sizes in the US and Canada are different from those in Europe), it's easy to define a new one, especially if the the corresponding Paper Size already exists.

1. Open Settings.xml in a suitable text editor.

Note: As ever when making changes to this file, take a back-up first. Much depends on it, and it's important that a fair copy can be restored if necessary.

2. Navigate to the PrintFromWeb section near the end of the file.

3. Select and copy the whole of a Settings Group.

  <PrintFromWeb>
    <SettingsGroup Name="A4 Portrait">
      <PageSetup>
        <!-- Size
Specifies a paper size as defined by
ProcessNavigator/PrintFromWeb/PaperSizes/PaperSize
-->
        <Size>A4</Size>
        <!-- Orientation
Portrait or Landscape
-->
        <Orientation>Portrait</Orientation>
      </PageSetup>
      <Margins>
        <!-- Margins are defined as Portrait -->
        <Left>19.05</Left>
        <Right>19.05</Right>
        <Top>19.05</Top>
        <Bottom>19.05</Bottom>
      </Margins>
    </SettingsGroup>
    <SettingsGroup Name="A4 Landscape">
 etc.

4. Paste the copy as a new Settings Group in a place that reflects its desired position in the Size and Orientation drop-down list. If it's to be the default setting, then this would the first Settings Group under SettingsGroups.

  <PrintFromWeb>
    <SettingsGroup Name="A4 Portrait">
      <PageSetup>
        <!-- Size
Specifies a paper size as defined by
ProcessNavigator/PrintFromWeb/PaperSizes/PaperSize
-->
        <Size>A4</Size>
        <!-- Orientation
Portrait or Landscape
-->
        <Orientation>Portrait</Orientation>
      </PageSetup>
      <Margins>
        <!-- Margins are defined as Portrait -->
        <Left>19.05</Left>
        <Right>19.05</Right>
        <Top>19.05</Top>
        <Bottom>19.05</Bottom>
      </Margins>
    </SettingsGroup>
    <SettingsGroup Name="A4 Portrait">
 etc.

5. Rename the new Settings Group, and set its Size.

  <PrintFromWeb>
    <SettingsGroup Name="US Legal">
      <PageSetup>
        <!-- Size
Specifies a paper size as defined by
ProcessNavigator/PrintFromWeb/PaperSizes/PaperSize
-->
        <Size>US Legal</Size>
etc.

Note: The Settings Group's name needn't correspond to a paper size name. It's just a name, so could be set to, for example, reflect the type of map for which these settings are most suitable.

6. Ensure the 'Default' attribute is only associated with the appropriate Settings Group.

  <PrintFromWeb>
    <SettingsGroup Name="A4 Portrait" Default="True">
     .
     .
    <SettingsGroup Name="A4 Landscape">
etc.

7. Save and close the Settings XML file.

Applies To

  • Triaster Server 2011
    • The Triaster Print Tool Options page was introduced in Triaster Server 12.4. Prior to this, maps would be printed using the default Settings Group. The configurations in the Settings XML file were the same.



Need further help? Contact the Triaster Support team by e-mailing support@triaster.co.uk or by calling us on + 44 (0)870 402 1234.
 
Do you have any feedback or suggestions that you would like to share with Triaster? We would love to hear from you! Please e-mail feedback@triaster.co.uk