B2023-024 added a method to all us to remove a section PDF from the pdf print cache

This commit is contained in:
2023-03-08 19:14:53 +00:00
parent eb48009f5c
commit b1a6f05bd2
3 changed files with 39 additions and 0 deletions

View File

@@ -115,6 +115,25 @@ namespace VEPROMS.CSLA.Library
}
public partial class PdfInfo
{
// B2023-024 PROMS was using old cached PDF data when printing Word sections.
// Added this method that can be called to clear the PDF print cache for a specified section.
public static void RemovePDFFromCache(ItemInfo sect)
{
DocStyle myDocStyle = sect.ActiveSection.MyDocStyle;
SectionConfig sc = sect.ActiveSection.MyConfig as SectionConfig;
int ss = sect.MyDocVersion.DocVersionConfig.SelectedSlave;
if (sc != null && sc.Section_WordMargin == "Y")
{
RemoveFromCachedByPrimaryKey(sect.MyContent.MyEntry.DocID, ss * 10 + MSWordToPDF.DebugStatus, 0, 0, 0, 0);
}
else
{
RemoveFromCachedByPrimaryKey(sect.MyContent.MyEntry.DocID, ss * 10 + MSWordToPDF.DebugStatus, (int)myDocStyle.Layout.TopMargin,
(int)myDocStyle.Layout.PageLength, (int)myDocStyle.Layout.LeftMargin, (int)myDocStyle.Layout.PageWidth);
}
}
public static PdfInfo Get(ItemInfo sect, bool ovrride)
{
int count = 0;