Ron - Tuesday, August 12, 2008 11:29 AM:
OK Here is another challenge with Thumbnails.I was thinking that the use of thumbnails would be great for documents. Most use PDF files as the universal format and we know that you can get a thumbnail image of a PDF file. What about having Innovator display a thumbnail image of any PDF file attached to a document itemtype. Would it be possible to have this created on the fly?
I know windows can display PDF files as thumbnails, could this built in function be used for Innovator?
Any takers?
Ron
SamsAn - Wednesday, August 13, 2008 5:26 AM:
It's pretty easy to configure the functionality. It takes 5 minutes.
1. Login as root.
2. Edit FileType Item Type, add new property (name=icon, data_type=Image) .
3. Edit FileType Form, make a field on the form for icon property.
4. Edit PDF instance of FileType Item Type. Assign an icon.
5. Edit File Item Type, add new property (name=file_type_icon, data_type=Foreign, data_source=file_typeicon).
Enjoy.
Ron - Wednesday, August 13, 2008 2:41 PM:
Hi SamsAn
I tried this out, but did not get the results I was thinking of. I was thinking of having an image of the PDF file on the documents form. What you provided will assigned the icon for PDF file (what I chose for step three), what I would like is the thumbnial image of the actural documment and not on the grid, but on the document form.
What do you think? possible?
Ron
SamsAn - Thursday, August 14, 2008 3:26 AM:
Hi Ron.
Why not.
For example, the way is populate icon onAfterGet.
1. Edit Document ItemType, add calculated_icon (data_type=Image) property, assign new Server Event (onAfterGet) with a server-side method. Its pseudo-code is:
ForEach document
If document has a PDF file Then document.SetProperty("calculated_icon", "path_to_pdf_icon")
Next document
2. Edit Document Form and add calculated_icon field.
Hope it helps, SamsAn.