C2018-011 Get the number of pages of a word attachment from the saved pdf attachment when generating a meta file.

This commit is contained in:
John Jenko 2018-04-18 12:41:47 +00:00
parent 9ad76cb7a3
commit 5e14c950be

View File

@ -1140,7 +1140,15 @@ namespace VEPROMS.CSLA.Library
private float _MSWordPageCount = 0; private float _MSWordPageCount = 0;
public float MSWordPageCount public float MSWordPageCount
{ {
get { return _MSWordPageCount; } get {
if (_MSWordPageCount == 0) // C2018-011 Get the proper word page count from the saved pdf attachment
if (MyContent.MyEntry != null && MyContent.MyEntry.MyDocument != null)
{
PdfInfo pi = PdfInfo.Get(this, false);
_MSWordPageCount = (float)pi.PageCount;
}
return _MSWordPageCount;
}
set { _MSWordPageCount = value; } set { _MSWordPageCount = value; }
} }
public event ItemInfoEvent OrdinalChanged; public event ItemInfoEvent OrdinalChanged;