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

Free Support Forum - aspose.com

Difference between getPortionFormat() and createPortionFormatEffective()

Hi,


Can you tell me what’s the difference between getPortionFormat() and createPortionFormatEffective()? How to know which method I should use?

Thanks,
Zeljko

Hi Zeljko,


Thank you for posting.

I have observed your comments and like to share with you that PortionFormat is a class which contains the text portion formatting properties. Unlike PortionFormatEffectiveData,
all properties of this class are writeable. This class is used to return and manipulate text portion formatting
properties defined for the particular portion. This means that no inheritance is
applied when getting values so for the majority of cases you will get values
meaning “undefined”.

In order to get the effective formatting parameter values including inherited you need to use CreatePortionFormatEffective method which returns a PortionFormatEffectiveData instance.

And about PortionFormatEffectiveData class, Immutable object which contains text portion formatting properties. This class is used together with the Portion class to return effective formatting values with inheritance applied.

I hope this will be helpful. please share if I may help you further in this regard.

Best Regards,

Hi Muhammad,


Thank you for the explanation, it helped me a lot.

Regards,
Zeljko