Show multi-page previews for DOC & DOCX

From release 3.1555 (March 2014)onwards, it is possible to configure multipage preview so that users can see all the pages of a DOC or DOCX item without downloading.
It is important to note that enabling the page previews involves changing the asset to behave like an image.
This will mean that:
  1. Document assets will be treated as image assets and therefore if you have asset types enabled, DOC and DOCX files will be considered as image type rather than filetype.
  2. On download, you will see the image conversion options (if this is undesirable, it is possible toenable direct download for DOC and DOCX assets).

SQL Statements

UPDATE FileFormat SET AssetTypeId=2, IsConvertable=1, ConvertIndividualLayers=1, ConverterClass='com.bright.assetbank.converter.DocToJpgConverter' WHERE FileExtension='doc';
UPDATE FileFormat SET AssetTypeId=2, IsConvertable=1, ConvertIndividualLayers=1, ConverterClass='com.bright.assetbank.converter.DocToJpgConverter' WHERE FileExtension='docx';  

Please note: If you already have DOC/DOCX files in your Asset Bank you will need to run the following additional SQL commands and then regenerate your existing thumbnails

INSERT INTO ImageAsset (AssetId) SELECT a.Id from Asset a, FileFormat ff WHERE a.FileFormatId=ff.ID AND ff.FileExtension='DOC' AND a.AssetTypeId<>2;
UPDATE Asset a, FileFormat ff SET a.AssetTypeId=2 WHERE a.FileFormatId=ff.ID AND ff.FileExtension='DOC' AND a.AssetTypeId<>2;
INSERT INTO ImageAsset (AssetId) SELECT a.Id from Asset a, FileFormat ff WHERE a.FileFormatId=ff.ID AND ff.FileExtension='DOCX' AND a.AssetTypeId<>2;
UPDATE Asset a, FileFormat ff SET a.AssetTypeId=2 WHERE a.FileFormatId=ff.ID AND ff.FileExtension='DOCX' AND a.AssetTypeId<>2;


Was this article helpful?

Yes No

Thanks for your feedback!