From 5e14c950be01a5cd5cbcbb8ea551e495d769b5a0 Mon Sep 17 00:00:00 2001 From: John Date: Wed, 18 Apr 2018 12:41:47 +0000 Subject: [PATCH] C2018-011 Get the number of pages of a word attachment from the saved pdf attachment when generating a meta file. --- PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 17eb0855..957f18af 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -1140,7 +1140,15 @@ namespace VEPROMS.CSLA.Library private float _MSWordPageCount = 0; 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; } } public event ItemInfoEvent OrdinalChanged;