AnsweredAssumed Answered

Create Thumbnails for all pages in document

Question asked by gcluis on Dec 9, 2013
I need to create thumnail for all the pages of a document.

I create the thumbnails for the first page using the Rendition Service:

Example:


http://localhost:7080/alfresco/service/api/node/workspace/SpacesStore/64974a67-c8a0-4ea6-ab17-8bf2b094926c/content/thumbnails/doclib?c=force


I obtain the info about the thumbnails with CMIS:


  public void getThumbnail(Document document, Session session)
  {
    try
    {
      OperationContext context = session.createOperationContext();
      context.setRenditionFilterString("cmis:thumbnail");
      CmisObject doc = session.getObject(document.getId(), context);
      if (doc != null)
      {
   List<Rendition> renditions = doc.getRenditions();
   if (renditions != null)
   {
     for (Rendition rendition : renditions)
     {
       System.out.println("kind: " + rendition.getKind());
       System.out.println("mimetype: " + rendition.getMimeType());
       System.out.println("width: " + rendition.getWidth());
       System.out.println("height: " + rendition.getHeight());
       System.out.println("stream id: " + rendition.getStreamId());
     }
   }
      }
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
  }



Is it possible to create a thumnail for every page of a document with the Rendition Service?

Outcomes