Getcontent retrieves digital content (e.g. an image or movie, not in XML format) from a server.
command=getcontent&<parameter>=<value>&...
<message>Error retrieving document for content id: relevant_path</message>
. whiteList
setting (available from 3.0.21309.1) in adlibweb.xml to limit allowed URLs to websites you trust.
%width%
instead of a specific value to automatically retrieve an image in the size requested by Axiell Collections for detail or thumbnail display and for printing: this saves processing time and fixes an issue where images are printed too small. When using height=%height%
as well, the aspect ratio of the image will remain intact.
%height%
instead of a specific value to automatically retrieve an image in the size requested by Axiell Collections for detail or thumbnail display and for printing: this saves processing time and fixes an issue where images are printed too small. When using width=%width%
as well, the aspect ratio of the image will remain intact.
width
and height
parameters. This means that the entire image will be visible, and that if the box has a different aspect ratio from the image, the image will be centered in the box, either in height or width, leaving part of the background of the box (the so-called canvas) empty. The empty part of the canvas can be given a colour using the canvascolor
parameter.width
and height
parameters. This means that only part of the image will be visible if the box has a different aspect ratio from the image. Which part of the image will be visible, can be determined by the fillmode
parameter; by default the left or top part of the image will be visible.Besides scaling the image, the box containing the image can be presented with rounded corners, using the cornerradius
and cornercolor
parameters.
scalemode=fill
argument] determines which part of the image will be visible. You can choose from three options:scalemode=fit
argument or the imageformat
parameter] determines the colour of the empty part of the canvas of the box specified using the width
and height
parameters. Colour names are determined by the .NET Framework 4 Color Structure object, which is documented on: MSDN. Examples of colour names are: black
, white
, transparent
, orange
, etc.
scalemode
or imageformat
parameter] specifies the radius (in pixels) of rounded corners of the box specified using the width
and height
parameters. The minimum value is 10.
scalemode
or imageformat
parameter] determines the colour of the space left open by rounded corner of the box specified using the width
, height
and cornerradius
parameters. Colour names are determined by the .NET Framework 4 Color Structure object, which is documented on: MSDN. Examples of colour names are: black
, white
, transparent
, orange
, etc.
jpg
for example. With this parameter, the source image file format will automatically be transformed to the target format before sending the file; the source file format and the cached file format* remain unchanged. Valid values for this parameter are: jpg
, tiff
, png
, and ico
. If you choose png
you can choose to set the canvascolor
and/or the cornercolor
parameters to the value transparent
. imageformat
parameter, the image will always be retrieved in the original image file format.bmp
format and have a double file extension of the type .<original extension>.bmp
. This intermediate storage format is for internal image handler purposes only, to improve its performance, but you can forget all about it when you use the getcontent
command (with or without the imageformat
parameter).
<folderMappingList>
in the image server specification in adlibweb.xml, which specifies the lower and upper record number limits for all branch reproduction datasets and their associated branch-specific folders containing the images.
The Axiell WebAPI has built-in functionality to retrieve images, movies and audio files, using the getcontent
command. When a URL containing getcontent
is executed in an internet browser, the media file type will be recognized by the browser (if the browser supports the file format) and the file becomes (dis)playable instantly. On the other hand, when a URL containing getcontent
has been set as a retrieval path for an image field in an Adlib for Windows application, Adlib won't recognize the media types of files other than images and will therefore only display linked media files in the Media Viewer if those are image files: instead of the getcontent
command in retrieval paths, we must therefore use the getmediainfo
command for Adlib for Windows applications. For Axiell Collections applications this is not so and you should use the getcontent
command for all media types. However, since the Media Viewer in Collections uses browser functionality for media display, Collections can only display or play media file formats which the browser supports. (Add-ons are available for most browser to extend file format support.)
To be precise: the range of media formats which can be displayed by the Media Viewer in Axiell Collections is limited by either browser support or HTML5 video/audio player support.
• Image formats which are supported amongst all browsers* are: .jpeg, .tiff (in Firefox and Chrome not by default), .bmp, .gif, .svg and .png.
• For audio, HTML5 only supports .mp3, .wav, .opus and .ogg extensions, of which only .mp3 is supported by all browsers*.
• For video, HTML5 only supports .mp4 (H.264), .webm (VP8/VP9) and .ogg (Daala), of which only .mp4 is supported by all browsers*.
* "all browsers" meaning the browsers supported by Axiell Collections: Chrome, Firefox, Edge and Safari.
To use the getcontent
functionality, the server manager must have setup an "image handler" using the adlibweb.xml parameter file. Images, movies or audio files (the latter two only in browsers) will be retrieved (downloaded, not streamed) using the getcontent
command. To retrieve a file, the caller needs to provide at least two arguments: the name of the server in the server
argument and the file identifier in the value
argument. The media file id can be retrieved from database records. Image ids are usually stored in the reproduction.reference field.
All arguments other than server
and value
apply to images files only, not to other media files. If you do specify any of them for other media files, the WebAPI attempts to load an image file with the same id but with the .jpg extension instead. If that file is not present, the WebAPI tries to load a default image named movie.jpg. If that fails as well, a system exception will be thrown. So if you want to use a single query to retrieve both images and movies while applying any of the image specific getcontent
arguments, do at least make sure a default movie.jpg image is present to avoid the exception.
The Axiell WebAPI does not support streaming media. You'll have to set up a third-party streaming media server to be able to stream movies or audio.
Retrieve image file 2043.jpg from the image server show
- no further description -
http://test2.adlibsoft.com/api/wwwopac.ashx?command=getcontent&server=adlibimages&value=2043.jpg
Retrieve image file 2043.jpg from the image server and scale it show
Any image can be scaled by the web service to make optimal use of that image in your application. This functionality can be invoked by adding height
and width
paramters. These parameters define the target area to which the image needs to be scaled. The original aspect ratio of the image is automatically maintained, so the actual image size will in most cases be smaller than the requested rectangle. Images are automatically centered in the requested rectangle.
The scaling is performed on the fly, there is no need to prepare images for a certain size. Having said this, the web service will cache the scaled images for future use.
http://test2.adlibsoft.com/api/wwwopac.ashx?command=getcontent&server=adlibimages&value=2043.jpg&width=100&height=200
Retrieve image file 2043.jpg and scale it to fit within a square box with a whitesmoke background and rounded corners show
- no further description -
http://test2.adlibsoft.com/api/wwwopac.ashx?command=getcontent&server=adlibimages&value=2043.jpg&width=200&height=200&scalemode=fit&canvascolor=whitesmoke&cornerradius=20
Retrieve image file 2043.jpg, scale it to fill a square box and only show the top part of the image show
- no further description -
http://test2.adlibsoft.com/api/wwwopac.ashx?command=getcontent&server=adlibimages&value=2043.jpg&width=200&height=200&scalemode=fill&fillmode=topleft
Retrieve image file 2043.jpg, scale it to fill a circular box and only show the top part of the image against a linen background show
http://test2.adlibsoft.com/api/wwwopac.ashx?command=getcontent&server=adlibimages&value=2043.jpg&width=200&height=200&scalemode=fill&fillmode=topleft&cornerradius=100&cornercolor=linen
Retrieve image file 2043.jpg, transform it to the png file format, scale it to fill a box with rounded corners and only show the top part of the image against a transparent background show
- no further description -
http://test2.adlibsoft.com/api/wwwopac.ashx?command=getcontent&server=adlibimages&value=2043.jpg&width=200&height=200&scalemode=fill&fillmode=topleft&imageformat=png&cornerradius=20&cornercolor=transparent
Retrieve image file yorym_2000_628-obv.jpg from the subfolder /coins underneath the main image folder show
If desired, the / in the file path can be replaced by its HTTP escape code %2F.
http://test2.adlibsoft.com/api/wwwopac.ashx?command=getcontent&server=adlibimages&value=coins/yorym_2000_628-obv.jpg
Retrieve and display the wildlife.wmv movie file (only in browsers, not in adlwin.exe) show
The movie will be downloaded and displayed in the media player associated with the .wmv file extension, e.g. Windows Media Player.
http://test2.adlibsoft.com/api/wwwopac.ashx?command=getcontent&server=adlibimages&value=wildlife.wmv
- no Adlib.Data-specific description available yet; see the URL request tab for all information -
- no jQuery-specific description available yet; see the URL request tab for all information -