This commit is contained in:
parent
00dc6448c2
commit
bd47329345
@ -404,8 +404,16 @@ namespace VEPROMS.CSLA.Library
|
||||
pdfFile.Delete();
|
||||
Pdf.DeleteAll(doc.DocID); // clear the PDF table for DocID first
|
||||
DocStyle myDocStyle = myItemInfo.ActiveSection.MyDocStyle;
|
||||
SectionConfig sc = myItemInfo.ActiveSection.MyConfig as SectionConfig;
|
||||
if (sc != null && sc.Section_WordMargin == "Y")
|
||||
{
|
||||
using (Pdf myPdf = Pdf.MakePdf(doc, MSWordToPDF.DebugStatus, 0, 0, 0, 0, (double)myItemInfo.MSWordPageCount, buf)) { ;}
|
||||
}
|
||||
else
|
||||
{
|
||||
using (Pdf myPdf = Pdf.MakePdf(doc, MSWordToPDF.DebugStatus, (int)myDocStyle.Layout.TopMargin, (int)myDocStyle.Layout.PageLength,
|
||||
(int)myDocStyle.Layout.LeftMargin, (int)myDocStyle.Layout.PageWidth, (double)myItemInfo.MSWordPageCount, buf)) { ;}
|
||||
}
|
||||
doc.UpdateDRoUsages(roids);
|
||||
doc.Save();
|
||||
}
|
||||
@ -514,8 +522,16 @@ namespace VEPROMS.CSLA.Library
|
||||
using (Document doc = docInfo.Get())
|
||||
{
|
||||
DocStyle myDocStyle = sect.ActiveSection.MyDocStyle;
|
||||
using (Pdf myPdf = Pdf.MakePdf(doc, MSWordToPDF.DebugStatus, (int)myDocStyle.Layout.TopMargin, (int)myDocStyle.Layout.PageLength,
|
||||
SectionConfig sc = sect.ActiveSection.MyConfig as SectionConfig;
|
||||
if (sc != null && sc.Section_WordMargin == "Y")
|
||||
{
|
||||
using (Pdf myPdf = Pdf.MakePdf(doc, MSWordToPDF.DebugStatus, 0, 0, 0, 0, (double)sect.MSWordPageCount, buf)) { ;}
|
||||
}
|
||||
else
|
||||
{
|
||||
using (Pdf myPdf1 = Pdf.MakePdf(doc, MSWordToPDF.DebugStatus, (int)myDocStyle.Layout.TopMargin, (int)myDocStyle.Layout.PageLength,
|
||||
(int)myDocStyle.Layout.LeftMargin, (int)myDocStyle.Layout.PageWidth, (double)sect.MSWordPageCount, buf)) { ;}
|
||||
}
|
||||
doc.UpdateDRoUsages(roids);
|
||||
doc.Save();
|
||||
}
|
||||
@ -577,12 +593,16 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
LBDocumentClass myDoc = MyApp.Documents.Open(myFile.FullName, false);
|
||||
try
|
||||
{
|
||||
SectionConfig sc = sect.ActiveSection.MyConfig as SectionConfig;
|
||||
if (sc == null || sc.Section_WordMargin == "N")
|
||||
{
|
||||
AdjustMargins(myDocStyle, myDoc, true);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_MyLog.Error("Could not Adjust Margins",ex);
|
||||
_MyLog.Error("Could not Adjust Margins", ex);
|
||||
}
|
||||
LBSelection selxy = hasRos ? FindXyPlot() : null;
|
||||
while (selxy != null)
|
||||
|
@ -69,8 +69,17 @@ namespace VEPROMS.CSLA.Library
|
||||
while (count < 2)
|
||||
{
|
||||
DocStyle myDocStyle = sect.ActiveSection.MyDocStyle;
|
||||
PdfInfo myPdf = Get(sect.MyContent.MyEntry.DocID, MSWordToPDF.DebugStatus, (int)myDocStyle.Layout.TopMargin, (int)myDocStyle.Layout.PageLength,
|
||||
SectionConfig sc = sect.ActiveSection.MyConfig as SectionConfig;
|
||||
PdfInfo myPdf = null;
|
||||
if (sc != null && sc.Section_WordMargin == "Y")
|
||||
{
|
||||
myPdf = Get(sect.MyContent.MyEntry.DocID, MSWordToPDF.DebugStatus, 0, 0, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
myPdf = Get(sect.MyContent.MyEntry.DocID, MSWordToPDF.DebugStatus, (int)myDocStyle.Layout.TopMargin, (int)myDocStyle.Layout.PageLength,
|
||||
(int)myDocStyle.Layout.LeftMargin, (int)myDocStyle.Layout.PageWidth);
|
||||
}
|
||||
if (myPdf != null) return myPdf;
|
||||
if (count > 0) return null; // Could not find or create a pdf
|
||||
MSWordToPDF.SetDocPdf(sect.MyContent.MyEntry.MyDocument, sect);
|
||||
|
Loading…
x
Reference in New Issue
Block a user