Following actions were designed to support the client-side preview component (document viewer) that displays document preview images.
Get page count
Returns the number of pages in a document. If there is no information about page count on the content, it starts a preview generation task to determine the page count.
Returns the number of currently existing preview images. If necessary, it can make sure that all preview images are generated and available for a document.
It clears all existing preview images for a document and starts a task for generating new ones. This can be useful in case the preview status of a document has been set to ‘error’ before for some reason and you need to force the system to re-generate preview images.
A relatively new feature of sensenet document viewer is preview commenting. Basically it lets you manage comments of a document, connect the comments with the pages aka preview images with saving the data on the content itself. However it is a feature made for the document viewer, the following actions can be useful in your a custom sensenet document management project as well.
With the first example you can comment the third page of a document. You can also add coordinates to define which part of the page is actually commented:
Get comments for a page
Following example shows you how to get comments for the third page of a document:
With the next example you can remove the comment from the third page of the same document: