B2023-024 added a method to all us to remove a section PDF from the pdf print cache
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user