We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to get all Meta-Properties

Hello,


I try to get all Meta-Properties of an document. It’s describen here:
http://www.aspose.com/docs/display/slidesjava/Managing+Presentation+Properties

Code:

IDocumentProperties dProps = pres.getDocumentProperties();
List metaValues = new ArrayList<>();
for (int i = 0; i < dProps.getCount(); i++) {

PresentationMeta meta = new PresentationMeta();
meta.propertyName = dProps.getPropertyName(i);
meta.propertyValue = dProps.get_Item(meta.propertyName);

metaValues.add(meta);
}
Error:
asposeCli/src/main/java/com/konmedia/slide/converter/MetaExtract.java:31: error: incompatible types
meta.propertyValue = dProps.get_Item(meta.propertyName);
^
required: String
found: Object

I cannot find a way to get all Properties in a list. I like to have the cusom properties and the document properties.

Can you please send an example?

Thank you and kind Regards,
Dirk Münker

Hi Dirk Münker,


Thanks for inquiring Aspose.Slides.

I have observed the sample code shared by you and like to share that for dp.getPropertyName(i) you may please typecast value to String for its addition to your structure and I hope this will be helpful. Please share, if there is still an issue incurring on your end.

Many Thanks,