java - Get thumbnail of PDF file in CMIS -


i'm using apache chemistry opencmis access alfresco repository , files. i'm able thumbnails via renditions of file (cmis:thumbnail) seem work images. possible thumbnail views pdf files well? if so, how should this?

sure, possible. same call use renditions of image works office documents well. don't have time whip java show (what you're doing work anyway) here how in python, similar:

>>> doc = repo.getobject("workspace://spacesstore/5515d3e1-bb2a-42ed-833c-52802a367033") >>> doc.name u'project objectives.ppt' >>> rends = doc.getrenditions() >>> rends [<cmislib.model.rendition object @ 0x1102d3210>, <cmislib.model.rendition object @ 0x1102d3990>] >>> rends[0] <cmislib.model.rendition object @ 0x1102d3210> >>> rends[0].href u'http://localhost:8080/alfresco/cmisatom/a00f3835-612c-47a0-a0ae-1e95d9a80e73/content?id=workspace%3a%2f%2fspacesstore%2f5515d3e1-bb2a-42ed-833c-52802a367033%3b1.0&streamid=workspace%3a%2f%2fspacesstore%2fe725ee47-62c6-4ae9-a761-9b69ba2835c5' >>> rends[0].title u'doclib' >>> rends[1].title u'webpreview' >>> rends[1].href u'http://localhost:8080/alfresco/cmisatom/a00f3835-612c-47a0-a0ae-1e95d9a80e73/content?id=workspace%3a%2f%2fspacesstore%2f5515d3e1-bb2a-42ed-833c-52802a367033%3b1.0&streamid=workspace%3a%2f%2fspacesstore%2f41c25437-ce2e-47e1-8e3d-a2f3008e7456' >>> rends[1].getmimetype() u'application/x-shockwave-flash' 

in case retrieving renditions of powerpoint file sample web site design share site comes installations. can see has 2 renditions. 1 doclib thumbnail shown in document library list. other flash file used preview presentation when document details view opened.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -