If the open library document is not referenced, then save changes but don’t generate a PDF.
This commit is contained in:
parent
aea1a3d5f8
commit
008a1e67eb
@ -518,8 +518,10 @@ namespace VEPROMS.CSLA.Library
|
||||
//doc.DTS = _MyFile.LastWriteTimeUtc;
|
||||
doc.DTS = DateTime.Now.ToUniversalTime();
|
||||
doc = doc.Save();
|
||||
if (myItemInfo != null) // B2016-131 if myItemInfo is null, the lib doc is not referenced from any procedure. Just save changes, but don't generate a PDF
|
||||
{
|
||||
List<string> roids = new List<string>();
|
||||
string pdfTmp = MSWordToPDF.ToPDFReplaceROs(_MyDocument, roids, myItemInfo,statusChange);
|
||||
string pdfTmp = MSWordToPDF.ToPDFReplaceROs(_MyDocument, roids, myItemInfo, statusChange);
|
||||
FileInfo pdfFile = new FileInfo(pdfTmp);
|
||||
fs = pdfFile.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
||||
buf = new byte[pdfFile.Length];
|
||||
@ -542,6 +544,7 @@ namespace VEPROMS.CSLA.Library
|
||||
doc.Save();
|
||||
if (savLen != _MyFile.Length) _MyLog.ErrorFormat("DSO FRAMER: File size changed during Save for Word Document, beginSize = {0}, endSize = {1}", savLen, _MyFile.Length);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Constructors
|
||||
public DSOFile(DocumentInfo myDocument)
|
||||
|
Loading…
x
Reference in New Issue
Block a user