From 4abeb80fb42e35b983f9d25ca39e210c9aedf4a7 Mon Sep 17 00:00:00 2001 From: Rich Date: Fri, 4 Oct 2013 20:29:22 +0000 Subject: [PATCH] When an MSWord section is edited, the PDF created should embed all fonts that are used. When formats are updated, the Date/Time stamp for the Format record should be set to the Date/Time stamp of the format file. --- PROMS/LBWordLibrary/LBComObject.cs | 2 +- PROMS/VEPROMS.CSLA.Library/Extension/FormatExt.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/PROMS/LBWordLibrary/LBComObject.cs b/PROMS/LBWordLibrary/LBComObject.cs index 7f5729b5..25cb6442 100644 --- a/PROMS/LBWordLibrary/LBComObject.cs +++ b/PROMS/LBWordLibrary/LBComObject.cs @@ -339,7 +339,7 @@ namespace LBWordLibrary } public void ExportAsFixedFormat(string OutputFileName, LBWdExportFormat ExportFormat) { - InvokeMethod("ExportAsFixedFormat", OutputFileName, ExportFormat, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value); + InvokeMethod("ExportAsFixedFormat", OutputFileName, ExportFormat, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, true, Missing.Value);// Embed Fonts into PDF } public void ExportAsFixedFormat(string OutputFileName, LBWdExportFormat ExportFormat, Boolean OpenAfterExport, LBWdExportOptimizeFor OptimizeFor, LBWdExportRange Range, int From, int To, LBWdExportItem Item, Boolean IncludeDocProps, Boolean KeepIRM, LBWdExportCreateBookmarks CreateBookmarks, Boolean DocStructureTags, Boolean BitmapMissingFonts, Boolean UseISO19005_1, object FixedFormatExtClassPtr) { diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/FormatExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/FormatExt.cs index bc92cb5d..b42a832e 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/FormatExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/FormatExt.cs @@ -231,6 +231,7 @@ namespace VEPROMS.CSLA.Library private static Format AddFormatToDB(Format parent, string format, bool issub, DateTime Dts, string Userid, string fmtPath, string genmacPath) { string fmtdata = null; + FileInfo fmtfi = null; string genmacdata = null; XmlDocument xd = null; @@ -242,6 +243,7 @@ namespace VEPROMS.CSLA.Library try { StreamReader srf = new StreamReader(path); + fmtfi = new FileInfo(path); xd = new XmlDocument(); xd.Load(srf); //xd.Load(path); @@ -299,13 +301,14 @@ namespace VEPROMS.CSLA.Library { if (!LookupFormats.ContainsKey(fname)) { - rec = Format.MakeFormat(parent, fname, nmattr, fmtdata, genmacdata, Dts, Userid); + rec = Format.MakeFormat(parent, fname, nmattr, fmtdata, genmacdata, fmtfi.LastWriteTimeUtc, Userid); } else { rec = Format.Get(LookupFormats[fname]); rec.Data = fmtdata; rec.GenMac = genmacdata; + rec.DTS = fmtfi.LastWriteTimeUtc; rec = rec.Save(); } }