Use Selected Slave to create a specific version of the PDFs for MSWord sections.
Replace <U-Text> with DocVersionConfig.Unit_Text Added logic to handle setting UseISO19005_1 when creating a PDF from an MSWord Section. Set the plot background to white if not doing compare and transparent if doing a compare. Use Selected Slave (Unit) to create a specific version of the PDFs for MSWord sections.
This commit is contained in:
parent
b19ce7c128
commit
f9ba96fdd8
@ -650,13 +650,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
DocStyle myDocStyle = sect.ActiveSection.MyDocStyle;
|
DocStyle myDocStyle = sect.ActiveSection.MyDocStyle;
|
||||||
SectionConfig sc = sect.ActiveSection.MyConfig as SectionConfig;
|
SectionConfig sc = sect.ActiveSection.MyConfig as SectionConfig;
|
||||||
|
int ss = sect.MyDocVersion.DocVersionConfig.SelectedSlave;
|
||||||
if (sc != null && sc.Section_WordMargin == "Y")
|
if (sc != null && sc.Section_WordMargin == "Y")
|
||||||
{
|
{
|
||||||
using (Pdf myPdf = Pdf.MakePdf(doc, MSWordToPDF.DebugStatus, 0, 0, 0, 0, (double)sect.MSWordPageCount, buf)) { ;}
|
using (Pdf myPdf = Pdf.MakePdf(doc, ss*10 + MSWordToPDF.DebugStatus, 0, 0, 0, 0, (double)sect.MSWordPageCount, buf)) { ;}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
using (Pdf myPdf1 = Pdf.MakePdf(doc, MSWordToPDF.DebugStatus, (int)myDocStyle.Layout.TopMargin, (int)myDocStyle.Layout.PageLength,
|
using (Pdf myPdf1 = Pdf.MakePdf(doc, ss*10 + MSWordToPDF.DebugStatus, (int)myDocStyle.Layout.TopMargin, (int)myDocStyle.Layout.PageLength,
|
||||||
(int)myDocStyle.Layout.LeftMargin, (int)myDocStyle.Layout.PageWidth, (double)sect.MSWordPageCount, buf)) { ;}
|
(int)myDocStyle.Layout.LeftMargin, (int)myDocStyle.Layout.PageWidth, (double)sect.MSWordPageCount, buf)) { ;}
|
||||||
}
|
}
|
||||||
doc.UpdateDRoUsages(roids);
|
doc.UpdateDRoUsages(roids);
|
||||||
@ -805,6 +806,13 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (type == null)
|
if (type == null)
|
||||||
type = 0;
|
type = 0;
|
||||||
// If multiple return values includes X-Y Plot, check to see if it is an X-Y Plot
|
// If multiple return values includes X-Y Plot, check to see if it is an X-Y Plot
|
||||||
|
if (val == null)
|
||||||
|
{
|
||||||
|
if(sel.Text == "<U-Text>") val =lookup.DocVersionInfo.DocVersionConfig.Unit_Text;
|
||||||
|
//val = "<U-ID>",MyDocVersion.DocVersionConfig.Unit_ID);
|
||||||
|
//text = text.Replace(@"<S\u8209?ID>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_ProcedureSetID);
|
||||||
|
//text = text.Replace("<U>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_Number);
|
||||||
|
}
|
||||||
if ((type & 4) == 4 && val.StartsWith("<<G"))
|
if ((type & 4) == 4 && val.StartsWith("<<G"))
|
||||||
type = 4;
|
type = 4;
|
||||||
string roid = lookup.GetROIDByAccPagID(sel.Text, spPrefix, igPrefix);
|
string roid = lookup.GetROIDByAccPagID(sel.Text, spPrefix, igPrefix);
|
||||||
@ -919,7 +927,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
//sel.Range.Font.Color = (LBWdColor)WordColor(PrintOverride.OverrideTextColor(System.Drawing.Color.Black));
|
//sel.Range.Font.Color = (LBWdColor)WordColor(PrintOverride.OverrideTextColor(System.Drawing.Color.Black));
|
||||||
sel.Range.Font.Color = (LBWdColor)WordColor(OverrideColor == System.Drawing.Color.Transparent ? System.Drawing.Color.Black : OverrideColor);
|
sel.Range.Font.Color = (LBWdColor)WordColor(OverrideColor == System.Drawing.Color.Transparent ? System.Drawing.Color.Black : OverrideColor);
|
||||||
sect.MSWordPageCount = myDoc.Length;
|
sect.MSWordPageCount = myDoc.Length;
|
||||||
fileName = CreatePDF(fileName, openPdf);
|
fileName = CreatePDF(fileName, openPdf,MSWordToPDF.DebugStatus);
|
||||||
CloseDocument();
|
CloseDocument();
|
||||||
if (CloseWordWhenDone)
|
if (CloseWordWhenDone)
|
||||||
{
|
{
|
||||||
@ -1204,11 +1212,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
grfx.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
|
grfx.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
|
||||||
grfx.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
|
grfx.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
|
||||||
grfx.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
|
grfx.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
|
||||||
grfx.Clear(System.Drawing.Color.Transparent);
|
grfx.Clear(MSWordToPDF.DebugStatus==1 ? System.Drawing.Color.Transparent : System.Drawing.Color.White);
|
||||||
|
//grfx.Clear(System.Drawing.Color.SlateGray);
|
||||||
XYPlots.XYPlot.BlackColor = MSWordToPDF.OverrideColor == Color.Red ? Color.Red : Color.Black;
|
XYPlots.XYPlot.BlackColor = MSWordToPDF.OverrideColor == Color.Red ? Color.Red : Color.Black;
|
||||||
XYPlots.XYPlot myPlot = new XYPlots.XYPlot(xyPlot);
|
XYPlots.XYPlot myPlot = new XYPlots.XYPlot(xyPlot);
|
||||||
myPlot.SetMargins(0, 0, 0, 0);
|
myPlot.SetMargins(0, 0, 0, 0);
|
||||||
myPlot.Process(new VG.VGOut_Graphics(grfx));
|
VG.IVGOutput vgOut = new VG.VGOut_Graphics(grfx);
|
||||||
|
vgOut.DebugStatus = MSWordToPDF.DebugStatus;
|
||||||
|
myPlot.Process(vgOut);
|
||||||
grfx.Dispose();
|
grfx.Dispose();
|
||||||
GraphicsUnit gu = new GraphicsUnit();
|
GraphicsUnit gu = new GraphicsUnit();
|
||||||
retval = mf.GetBounds(ref gu);
|
retval = mf.GetBounds(ref gu);
|
||||||
@ -1345,11 +1356,11 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (executeResult) return sel;
|
if (executeResult) return sel;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
private static string CreatePDF(string fileName, bool openPdf)
|
private static string CreatePDF(string fileName, bool openPdf, int DebugStatus)
|
||||||
{
|
{
|
||||||
//return MyApp.CreatePDF(@"C:\Temp\" + fileName + ".pdf", openPdf);
|
//return MyApp.CreatePDF(@"C:\Temp\" + fileName + ".pdf", openPdf);
|
||||||
//return MyApp.CreatePDF(VlnSettings.TemporaryFolder + "\\" + fileName + ".pdf", openPdf);
|
//return MyApp.CreatePDF(VlnSettings.TemporaryFolder + "\\" + fileName + ".pdf", openPdf);
|
||||||
return MyApp.CreatePDF(fileName + ".pdf", openPdf);
|
return MyApp.CreatePDF(fileName + ".pdf", openPdf, DebugStatus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -71,13 +71,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
DocStyle myDocStyle = sect.ActiveSection.MyDocStyle;
|
DocStyle myDocStyle = sect.ActiveSection.MyDocStyle;
|
||||||
SectionConfig sc = sect.ActiveSection.MyConfig as SectionConfig;
|
SectionConfig sc = sect.ActiveSection.MyConfig as SectionConfig;
|
||||||
PdfInfo myPdf = null;
|
PdfInfo myPdf = null;
|
||||||
|
int ss = sect.MyDocVersion.DocVersionConfig.SelectedSlave;
|
||||||
if (sc != null && sc.Section_WordMargin == "Y")
|
if (sc != null && sc.Section_WordMargin == "Y")
|
||||||
{
|
{
|
||||||
myPdf = Get(sect.MyContent.MyEntry.DocID, MSWordToPDF.DebugStatus, 0, 0, 0, 0);
|
myPdf = Get(sect.MyContent.MyEntry.DocID, ss*10 + MSWordToPDF.DebugStatus, 0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
myPdf = Get(sect.MyContent.MyEntry.DocID, MSWordToPDF.DebugStatus, (int)myDocStyle.Layout.TopMargin, (int)myDocStyle.Layout.PageLength,
|
myPdf = Get(sect.MyContent.MyEntry.DocID, ss*10 + MSWordToPDF.DebugStatus, (int)myDocStyle.Layout.TopMargin, (int)myDocStyle.Layout.PageLength,
|
||||||
(int)myDocStyle.Layout.LeftMargin, (int)myDocStyle.Layout.PageWidth);
|
(int)myDocStyle.Layout.LeftMargin, (int)myDocStyle.Layout.PageWidth);
|
||||||
}
|
}
|
||||||
if (myPdf != null) return myPdf;
|
if (myPdf != null) return myPdf;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user