The Thumbnail Manager is the “configuration and routing” component for document rendering. It is installed as a service an configured with one or more “definitions” of rendition to create. The “definition” comprises of an identifier or description (“small”, “large”, “original”, “preview” and so on) and a size. The size can be expressed as a relative percentage (“100%”, “50%” etc), a fixed size in pixels (“640x480”), a fixed width in pixels (“640w”) or a fixed height in pixels (“480h”). In the case of percentages and fixed width and height, the original aspect ratio will be kept.

The manager is also configured with one or more “processors” – the components that will create the renditions. Each “processor” will render a specific document type and can be assigned as responsible for one or more document mime types. This flexible configuration means that you can process as many different document formats as you need, adding or removing processors as required. If a request is made to render a document for which no processor is installed, the manager simply returns having done nothing.

The manager is also responsible for telling the processors where the renditions should be written and so is configured with the Aspire Binary store to use.


Installation and configuration

Step 1. Launch Aspire and Open the Services Management Page


  1. Launch Aspire (if it's not already running).
  2. Go to Launch Control.
  3. Browse to: http://localhost:50505

For details on using the Aspire Services Management page, see Admin UI.


Step 2. Add a new Thumbnail Manager


  1. From Services, click Add Service.
  2. Click Thumbnail Manager.

If the service is not shown, you can install a custom service with the co-ordinates com.accenture.aspire:app-thumbnail-manager-service



Step 2a. Specify Basic Information

  1. Enter a service name or leave as default.
  2. Click the Service tab at the top of the screen or use the “arrow” at the right of the screen to move to the service configuration screen. You will now see the service configuration.


Step 2b. Specify Service Information

In the Service tab, specify the information required:

  1. Document
    1. Configure the document id: Select this option if you wish to configure where in the Aspire document the document id is located. Otherwise the document id is taken from /doc/id
    2. Document Id field: The path to the document id in the Aspire document
    3. Get content source from document
      1. When selected, the content source is taken from the Aspire document. When unselected, a static value for the content source is specified
      2. Content source field: The path to the content source in the Aspire document
      3. Content source: The static value for the content source
    4. Configure Mime Type: Select this option if you wish to configure where in the Aspire document the mime type is located. Otherwise the document id is taken from /doc/mimeType
      1. Mime Type field: The path to the Mime Type in the Aspire document
  2. Thumbnails: One or more definitions of the thumbnails that will be produced
    1. ID: The id of the rendition
    2. Size: The size for the rendition. One of
      1. Percentage: The rendition will be scaled to the given percentage of the original - 30%, 50% etc
      2. Fixed size: The rendition will have the given size in pixels (width x height) - e.g. 640x480
      3. Fixed width: The rendition will have the given width in pixels - e.g. 640w
      4. Fixed height: The rendition will have the given height in pixels - e.g. 480h
  3. Processors: One or more components that will produce renditions for specific document types
    1. Processor: Pick the installed rendition producer from the drop down
    2. Mime Type: One or more mime types that will be processed by this processor
  4. Binary store
    1. Store: Select the component that will be used to write to the store from the dropdown
    2. Add content source suffix: If selected, the content source extracted from the document will have a suffix added to it when renditions are written back to the binary store
      1. Suffix: The suffix to add to the content source extracted from the document
    3. Clear store on full crawl: Select this option if the store should be cleared when a full crawl is performed
  5. Debug: Select this if you want debug messages to be logged

Click Save and Done to return to the Services Manager


Output


When a request is made for a thumbnail, the manager will check the mime type of the input document and route the request to the processor configured for that document type. The processor will write the renditions to the configured binary store and return an object that describes all the renditions that have been produced. This data will then by added to the job’s Aspire document so that the information can be sent to the search engine.

An example of the output is shown below:

<thumbnails docId="file://c:/testdata/mixed_thumb/Updateable%20Har%20File%20Writer.docx" pageCount="3">
  <pageThumbnails docId="file://c:/testdata/mixed_thumb/Updateable%20Har%20File%20Writer.docx" pageNo="1">
    <thumbnail binaryBase="C:\Users\steven.j.denny\Documents\aspire-distributions\thumbnail/binaryStore" binaryPath="C:\Users\steven.j.denny\Documents\aspire-distributions\thumbnail/binaryStore\File_System_thumbs\5F\977\80CCB4E95439E000736D0E2D90B5F977-Updateable%2520Har%2520File%2520Writer.docx\page_1-preview.jpg" binaryRelativePath="5F\977\80CCB4E95439E000736D0E2D90B5F977-Updateable%2520Har%2520File%2520Writer.docx\page_1-preview.jpg" docId="file://c:/testdata/mixed_thumb/Updateable%20Har%20File%20Writer.docx" docSource="File_System_thumbs" id="preview" imageHeight="211" imageWidth="149" pageNo="1" size="25%" type="percentage"/>
    <thumbnail binaryBase="C:\Users\steven.j.denny\Documents\aspire-distributions\thumbnail/binaryStore" binaryPath="C:\Users\steven.j.denny\Documents\aspire-distributions\thumbnail/binaryStore\File_System_thumbs\5F\977\80CCB4E95439E000736D0E2D90B5F977-Updateable%2520Har%2520File%2520Writer.docx\page_1-original.jpg"
binaryRelativePath="5F\977\80CCB4E95439E000736D0E2D90B5F977-Updateable%2520Har%2520File%2520Writer.docx\page_1-original.jpg" docId="file://c:/testdata/mixed_thumb/Updateable%20Har%20File%20Writer.docx" docSource="File_System_thumbs" id="original" imageHeight="842" imageWidth="595" pageNo="1" size="100%" type="percentage"/>
  </pageThumbnails>
  <pageThumbnails docId="file://c:/testdata/mixed_thumb/Updateable%20Har%20File%20Writer.docx" pageNo="2">
    <thumbnail binaryBase="C:\Users\steven.j.denny\Documents\aspire-distributions\thumbnail/binaryStore" binaryPath="C:\Users\steven.j.denny\Documents\aspire-distributions\thumbnail/binaryStore\File_System_thumbs\5F\977\80CCB4E95439E000736D0E2D90B5F977-Updateable%2520Har%2520File%2520Writer.docx\page_2-preview.jpg" binaryRelativePath="5F\977\80CCB4E95439E000736D0E2D90B5F977-Updateable%2520Har%2520File%2520Writer.docx\page_2-preview.jpg" docId="file://c:/testdata/mixed_thumb/Updateable%20Har%20File%20Writer.docx" docSource="File_System_thumbs" id="preview" imageHeight="211" imageWidth="149" pageNo="2" size="25%" type="percentage"/>
    <thumbnail binaryBase="C:\Users\steven.j.denny\Documents\aspire-distributions\thumbnail/binaryStore" binaryPath="C:\Users\steven.j.denny\Documents\aspire-distributions\thumbnail/binaryStore\File_System_thumbs\5F\977\80CCB4E95439E000736D0E2D90B5F977-Updateable%2520Har%2520File%2520Writer.docx\page_2-original.jpg" binaryRelativePath="5F\977\80CCB4E95439E000736D0E2D90B5F977-Updateable%2520Har%2520File%2520Writer.docx\page_2-original.jpg" docId="file://c:/testdata/mixed_thumb/Updateable%20Har%20File%20Writer.docx" docSource="File_System_thumbs" id="original" imageHeight="842" imageWidth="595" pageNo="2" size="100%" type="percentage"/>
  </pageThumbnails>
  <pageThumbnails docId="file://c:/testdata/mixed_thumb/Updateable%20Har%20File%20Writer.docx" pageNo="3">
    <thumbnail binaryBase="C:\Users\steven.j.denny\Documents\aspire-distributions\thumbnail/binaryStore" binaryPath="C:\Users\steven.j.denny\Documents\aspire-distributions\thumbnail/binaryStore\File_System_thumbs\5F\977\80CCB4E95439E000736D0E2D90B5F977-Updateable%2520Har%2520File%2520Writer.docx\page_3-preview.jpg" binaryRelativePath="5F\977\80CCB4E95439E000736D0E2D90B5F977-Updateable%2520Har%2520File%2520Writer.docx\page_3-preview.jpg" docId="file://c:/testdata/mixed_thumb/Updateable%20Har%20File%20Writer.docx" docSource="File_System_thumbs" id="preview" imageHeight="211" imageWidth="149" pageNo="3" size="25%" type="percentage"/>
    <thumbnail binaryBase="C:\Users\steven.j.denny\Documents\aspire-distributions\thumbnail/binaryStore" binaryPath="C:\Users\steven.j.denny\Documents\aspire-distributions\thumbnail/binaryStore\File_System_thumbs\5F\977\80CCB4E95439E000736D0E2D90B5F977-Updateable%2520Har%2520File%2520Writer.docx\page_3-original.jpg" binaryRelativePath="5F\977\80CCB4E95439E000736D0E2D90B5F977-Updateable%2520Har%2520File%2520Writer.docx\page_3-original.jpg" docId="file://c:/testdata/mixed_thumb/Updateable%20Har%20File%20Writer.docx" docSource="File_System_thumbs" id="original" imageHeight="842" imageWidth="595" pageNo="3" size="100%" type="percentage"/>
  </pageThumbnails>
</thumbnails>

NOTE that the identifier attribute (id) in the above sample will change depending on the renditions configured in item 2 of Step 2.b above. The fragment above shows the output when two renditions "preview" and "original" are configured.

  • No labels