Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Inserting Assets into MediaBin
Silix
Hi,
Env: Virage-MediaBin 7.2, Windows 2008, SQL Server 2008
I need to work on a solution to import PDF and PPT documents into MediaBin. This is simply done to generate thumbnail preview images of those documents for the web.
So I have both the Java classes for
1) Import documents to MediaBin
2) Generate thumbnail image preview of Documents
Both are working fine, except the quality of Thumbnail generated using this custom method isn't good. I'm using MediaBinServerSoap.insertAsset() method. Can someone point out what is wrong with the parameters I have ?
[PHP]
MBContainer pbContainer = mbServerSoap.getContainerByPath(documentContainer, mbServerSoap
.getRootContainer().getMID(), true);
byte[] fileContents = simpleFile.read(0, -1);
BooleanHolder status = new BooleanHolder(true);
String taskName = "(Insert Unmodified)";
// Try Inserting the asset into the container
try {
mbServerSoap.insertAsset(fileContents, fileName, pbContainer.getMID(),
mbServerSoap.getTaskByName(taskName).getMID(), null, 850, status, new StringHolder());
} catch (RemoteException rex) {
....
}
[/PHP]
As you cans see I'm using windows codepage value 850. Is this the cause of the issue ?
Thanks
Sridhar
Find more posts tagged with
Comments
msrinivas
Your code looks fine. Do you see the same issue when you insert the file into MB using the MB windows or web client?
If I understand what you are trying to do correctly I am not sure if there is a good solution via MB. The thumbnail images generated by MB are very low res and are primarily for consumption in the MB clients rather than using them for web.
Silix
Thanks msrinivas, I don't see any other solution for doing it, other than MB. I tried using JPedal, but doesn't support PPT documents.
Regarding the thumbnail quality, the MB preview quality is good for documents that were imported using the RIA Client or the Windows client. The poor preview quality is only on those imported using the SDK code.
Looks like the MBLayer setting for PPT comes into picture for generating the preview if there are no embedded preview for the document.
Log: MSODecoder: Warning - no slide/page images are generated. Using embedded preview if present.
Any suggestions ?
Silix
After talking to support, we found that the issue is with the SDK. insertAsset() method doesn't wait for the asset to be fully transferred to generate the preview.
Whereas insertAsset_UNC and insertAsset_URL have a boolean bWaitOnJob flag, to Specify that the method should block until the insertion job completes.
So I have to use the insertAsset_UNC method to insert files from TeamSite to MediaBin for proper thumbnail generation. Since TeamSite is on a Linux box, there is no UNC possibility, unless I have Samba installed.
So the current plan is to install samba on the teamsite box, so that the same document can be referred as \\teamsite\\iwmnt\\default\\main\\branch\\WORKAREA\\shared\\document.pdf
What a mess!!