private static ParagraphProperties GetParagraphProperties(Model.Paragraph paragraph) { ParagraphProperties paraProps = new ParagraphProperties(); SpacingBetweenLines paraSpacing = new SpacingBetweenLines() { Before = Utilities.GetDxaFromPoints(paragraph.SpacingBefore), After = Utilities.GetDxaFromPoints(paragraph.SpacingAfter), LineRule = LineSpacingRuleValues.Auto, //If the value of the lineRule attribute is auto, then the value of the line attribute shall be interpreted as 240ths of a line Line = (paragraph.Leading * 240).ToString() }; Justification justification = new Justification(); switch (paragraph.Justification) { case DocGen.ObjectModel.Justification.Left: justification.Val = JustificationValues.Left; break; case DocGen.ObjectModel.Justification.Center: justification.Val = JustificationValues.Center; break; case DocGen.ObjectModel.Justification.Right: justification.Val = JustificationValues.Right; break; case DocGen.ObjectModel.Justification.Justified: justification.Val = JustificationValues.Both; break; } paraProps.Append(justification); paraProps.Append(paraSpacing); return paraProps; }
public override IEnumerable<OpenXmlElement> ToOpenXmlElements(DocumentFormat.OpenXml.Packaging.MainDocumentPart mainDocumentPart) { var result = new DocumentFormat.OpenXml.Wordprocessing.Paragraph(); var paragraphProperties = new ParagraphProperties(); var numberingProperties = new NumberingProperties(); var numberingLevelReference = new NumberingLevelReference() { Val = 0 }; NumberingId numberingId; ParagraphStyleId paragraphStyleId; if (Parent is OrderedListFormattedElement) { paragraphStyleId = new ParagraphStyleId() { Val = "NumberedList" }; numberingId = new NumberingId() { Val = ((OrderedListFormattedElement)Parent).NumberingInstanceId }; var indentation = new Indentation() { Left = "1440", Hanging = "720" }; paragraphProperties.Append(indentation); } else { paragraphStyleId = new ParagraphStyleId() { Val = "UnorderedListStyle" }; numberingId = new NumberingId() { Val = 3 }; } numberingProperties.Append(numberingLevelReference); numberingProperties.Append(numberingId); var spacingBetweenLines= new SpacingBetweenLines() { After = "100", AfterAutoSpacing = true }; paragraphProperties.Append(paragraphStyleId); paragraphProperties.Append(numberingProperties); paragraphProperties.Append(spacingBetweenLines); result.Append(paragraphProperties); ForEachChild(x => { if (x is TextFormattedElement) { result.Append( new DocumentFormat.OpenXml.Wordprocessing.Run(x.ToOpenXmlElements(mainDocumentPart)) ); } else { result.Append(x.ToOpenXmlElements(mainDocumentPart)); } }); return new List<OpenXmlElement> { result }; }
private void SetListProperties(NumberFormatValues numberFormat, ParagraphProperties paragraphProperties) { ParagraphStyleId paragraphStyleId = new ParagraphStyleId() { Val = "ListParagraph" }; NumberingProperties numberingProperties = new NumberingProperties(); NumberingLevelReference numberingLevelReference = new NumberingLevelReference() { Val = 0 }; NumberingId numberingId = new NumberingId() { Val = ((Int32)numberFormat) + 1 }; numberingProperties.Append(numberingLevelReference); numberingProperties.Append(numberingId); paragraphProperties.Append(paragraphStyleId); paragraphProperties.Append(numberingProperties); }
/// <summary> /// Returns a OpenXMl paragraph representing formatted listItem. /// </summary> /// <param name="item">listItem object</param> /// <param name="numStyleId">style id to use</param> /// <returns></returns> private static Paragraph GetListItem(Model.ListItem item, int numStyleId) { Paragraph listItemPara = new Paragraph(); ParagraphProperties paraProps = new ParagraphProperties(); NumberingProperties numberingProps = new NumberingProperties(); NumberingLevelReference numberingLevelReference = new NumberingLevelReference() { Val = 0 }; NumberingId numberingId = new NumberingId() { Val = numStyleId }; numberingProps.Append(numberingLevelReference); numberingProps.Append(numberingId); paraProps.Append(numberingProps); Run listRun = new Run(); Text listItemText = new Text() { Text = item.Body }; listRun.Append(listItemText); listItemPara.Append(paraProps); listItemPara.Append(listRun); return listItemPara; }
public static void GenerateParagraph(this Body body, string text, string styleId) { var paragraph = new Paragraph { RsidParagraphAddition = "00CC1B7A", RsidParagraphProperties = "0016335E", RsidRunAdditionDefault = "0016335E" }; var paragraphProperties = new ParagraphProperties(); var paragraphStyleId = new ParagraphStyleId {Val = styleId}; paragraphProperties.Append(paragraphStyleId); var run1 = new Run(); var text1 = new Text(); text1.Text = text; run1.Append(text1); paragraph.Append(paragraphProperties); paragraph.Append(run1); body.Append(paragraph); }
private void ApplyFooter(FooterPart footerPart) { var footer1 = new Footer(); footer1.AddNamespaceDeclaration("ve", "http://schemas.openxmlformats.org/markup-compatibility/2006"); footer1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); footer1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); footer1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); footer1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); footer1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"); footer1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); footer1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); footer1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml"); var paragraph1 = new Paragraph { RsidParagraphAddition = "005641D2", RsidRunAdditionDefault = "005641D2" }; var paragraphProperties1 = new ParagraphProperties(); var paragraphStyleId1 = new ParagraphStyleId { Val = "Footer" }; paragraphProperties1.Append(paragraphStyleId1); var run1 = new Run(); var text1 = new Text(); text1.Text = "Generated with Pickles " + Assembly.GetExecutingAssembly().GetName().Version; run1.Append(text1); paragraph1.Append(paragraphProperties1); paragraph1.Append(run1); footer1.Append(paragraph1); footerPart.Footer = footer1; }
public Paragraph AddAlphaRow() { var paragraph1 = new Paragraph {RsidParagraphMarkRevision = "005205ED", RsidParagraphAddition = "00A01149", RsidParagraphProperties = "005205ED", RsidRunAdditionDefault = "00E7001C"}; var paragraphProperties1 = new ParagraphProperties(); var spacingBetweenLines1 = new SpacingBetweenLines {After = "60", Line = "240", LineRule = LineSpacingRuleValues.Auto}; var justification1 = new Justification {Val = JustificationValues.Center}; var paragraphMarkRunProperties1 = new ParagraphMarkRunProperties(); var runFonts1 = new RunFonts {ComplexScriptTheme = ThemeFontValues.MinorHighAnsi}; var bold1 = new Bold(); var fontSize1 = new FontSize {Val = "32"}; var fontSizeComplexScript1 = new FontSizeComplexScript {Val = "32"}; paragraphMarkRunProperties1.Append(runFonts1); paragraphMarkRunProperties1.Append(bold1); paragraphMarkRunProperties1.Append(fontSize1); paragraphMarkRunProperties1.Append(fontSizeComplexScript1); paragraphProperties1.Append(new KeepNext()); paragraphProperties1.Append(spacingBetweenLines1); paragraphProperties1.Append(justification1); paragraphProperties1.Append(paragraphMarkRunProperties1); var run1 = new Run {RsidRunProperties = "005205ED"}; var runProperties1 = new RunProperties(); var runFonts2 = new RunFonts {ComplexScriptTheme = ThemeFontValues.MinorHighAnsi}; var bold2 = new Bold(); var fontSize2 = new FontSize {Val = "32"}; var fontSizeComplexScript2 = new FontSizeComplexScript {Val = "32"}; runProperties1.Append(runFonts2); runProperties1.Append(bold2); runProperties1.Append(fontSize2); runProperties1.Append(fontSizeComplexScript2); var text1 = new Text(); text1.Text = FamilyName.Substring(0, 1); run1.Append(runProperties1); run1.Append(text1); paragraph1.Append(paragraphProperties1); paragraph1.Append(run1); return paragraph1; }
private static void AddHeaderRow(DataTable table, Table wordTable, TableStyle tableStyle) { // Create a row. TableRow tRow = new TableRow(); foreach (DataColumn iColumn in table.Columns) { // Create a cell. TableCell tCell = new TableCell(); TableCellProperties tCellProperties = new TableCellProperties(); // Set Cell Color Shading tCellColor = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = System.Drawing.ColorTranslator.ToHtml(tableStyle.HeaderBackgroundColor) }; tCellProperties.Append(tCellColor); // Append properties to the cell tCell.Append(tCellProperties); ParagraphProperties paragProperties = new ParagraphProperties(); Justification justification1 = new Justification() { Val = JustificationValues.Center }; SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { After = "0" }; paragProperties.Append(spacingBetweenLines1); paragProperties.Append(justification1); var parag = new Paragraph(); parag.Append(paragProperties); var run = new Run(new Text(iColumn.ColumnName)); ApplyFontProperties(tableStyle, RowIdentification.Header, run); parag.Append(run); // Specify the table cell content. tCell.Append(parag); // Append the table cell to the table row. tRow.Append(tCell); } // Append the table row to the table. wordTable.Append(tRow); }
private static IEnumerable<OpenXmlElement> CreateTopicText(DocumentFormat.OpenXml.Packaging.MainDocumentPart mainDocumentPart, FormattedContent formattedContent) { var formattedContentParagraphs = formattedContent.ToOpenXmlElements(mainDocumentPart); foreach (var para in formattedContentParagraphs) { if (para is Paragraph) { if (((Paragraph)para).ParagraphProperties == null) { ParagraphProperties paragraphProperties22 = new ParagraphProperties(); ParagraphStyleId paragraphStyleId22 = new ParagraphStyleId() { Val = "StyleAfter0pt" }; SpacingBetweenLines spacingBetweenLines16 = new SpacingBetweenLines() { After = "360" }; paragraphProperties22.Append(paragraphStyleId22); paragraphProperties22.Append(spacingBetweenLines16); para.InsertAt(paragraphProperties22, 0); } } } return formattedContentParagraphs; }
private Paragraph CreateCodeParagraph(CodeVM code) { Paragraph paragraph1 = new Paragraph(); ParagraphProperties paragraphProperties1 = new ParagraphProperties(); Indentation indentation1 = new Indentation(){ FirstLine = "210", FirstLineChars = 100 }; paragraphProperties1.Append(indentation1); Run run1 = new Run(); RunProperties runProperties1 = new RunProperties(); RunFonts runFonts1 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia }; runProperties1.Append(runFonts1); Text text1 = new Text(); text1.Text = code.Value; run1.Append(runProperties1); run1.Append(text1); Run run2 = new Run(); RunProperties runProperties2 = new RunProperties(); RunFonts runFonts2 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia }; runProperties2.Append(runFonts2); TabChar tabChar1 = new TabChar(); run2.Append(runProperties2); run2.Append(tabChar1); Run run3 = new Run(); RunProperties runProperties3 = new RunProperties(); RunFonts runFonts3 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia }; runProperties3.Append(runFonts3); Text text2 = new Text(); text2.Text = code.Label; run3.Append(runProperties3); run3.Append(text2); paragraph1.Append(paragraphProperties1); paragraph1.Append(run1); paragraph1.Append(run2); paragraph1.Append(run3); return paragraph1; }
private void ProcessBorder(DocxNode node, ParagraphProperties properties) { ParagraphBorders paragraphBorders = new ParagraphBorders(); DocxBorder.ApplyBorders(paragraphBorders, node.ExtractStyleValue(DocxBorder.borderName), node.ExtractStyleValue(DocxBorder.leftBorderName), node.ExtractStyleValue(DocxBorder.topBorderName), node.ExtractStyleValue(DocxBorder.rightBorderName), node.ExtractStyleValue(DocxBorder.bottomBorderName), false); if (paragraphBorders.HasChildren) { properties.Append(paragraphBorders); } }
// Creates an TableCell instance and adds its children. public static void AddSpacerCell(this TableRow row, string width = "173") { TableCell tableCell1 = new TableCell(); TableCellProperties tableCellProperties1 = new TableCellProperties(); TableCellWidth tableCellWidth1 = new TableCellWidth() { Width = width, Type = TableWidthUnitValues.Dxa }; tableCellProperties1.Append(tableCellWidth1); Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "005A43FA", RsidParagraphProperties = "005A43FA", RsidRunAdditionDefault = "005A43FA" }; ParagraphProperties paragraphProperties1 = new ParagraphProperties(); Indentation indentation1 = new Indentation() { Left = "95", Right = "95" }; paragraphProperties1.Append(indentation1); paragraph1.Append(paragraphProperties1); tableCell1.Append(tableCellProperties1); tableCell1.Append(paragraph1); row.Append(tableCell1); }
public static void GenerateHeaderPartContent(HeaderPart part) { Header header1 = new Header() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } }; header1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"); header1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); header1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); header1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); header1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); header1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); header1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"); header1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"); header1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); header1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); header1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); header1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"); header1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk"); header1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml"); header1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"); Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "00164C17", RsidRunAdditionDefault = "00164C17" }; ParagraphProperties paragraphProperties1 = new ParagraphProperties(); ParagraphStyleId paragraphStyleId1 = new ParagraphStyleId() { Val = "Header" }; paragraphProperties1.Append(paragraphStyleId1); Run run1 = new Run(); Text text1 = new Text(); text1.Text = "Header"; run1.Append(text1); paragraph1.Append(paragraphProperties1); paragraph1.Append(run1); header1.Append(paragraph1); part.Header = header1; }
private static void GenerateFooterPartContent(FooterPart part) { var footer1 = new Footer() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } }; var paragraph1 = new Paragraph() { RsidParagraphAddition = "00164C17", RsidRunAdditionDefault = "00164C17" }; var paragraphProperties1 = new ParagraphProperties(); var paragraphStyleId1 = new ParagraphStyleId() { Val = "Footer" }; paragraphProperties1.Append(paragraphStyleId1); var run1 = new Run(); var text1 = new Text { Text = "Footer" }; run1.Append(text1); paragraph1.Append(paragraphProperties1); paragraph1.Append(run1); footer1.Append(paragraph1); part.Footer = footer1; }
public TableRow GenerateTableRow(CellProps[] cellProps, UInt32Value height) { TableRow tableRow1 = new TableRow(); TableRowProperties tableRowProperties1 = generateTableRowProperties(height); tableRow1.Append(tableRowProperties1); foreach (CellProps cp in cellProps) { if (cp.span == 0) continue; TableCell tableCell1 = new TableCell(); TableCellProperties tableCellProperties1 = new TableCellProperties(); TableCellBorders tableCellBorders1 = generateTableCellBordersPlain(); Shading shading1 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "auto" }; NoWrap noWrap1 = new NoWrap(); TableCellVerticalAlignment tableCellVerticalAlignment1 = new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }; HideMark hideMark1 = new HideMark(); if (cp.span > 1) { GridSpan span = new GridSpan() { Val = (Int32Value)cp.span }; tableCellProperties1.Append(span); } tableCellProperties1.Append(tableCellBorders1); tableCellProperties1.Append(shading1); tableCellProperties1.Append(noWrap1); tableCellProperties1.Append(tableCellVerticalAlignment1); tableCellProperties1.Append(hideMark1); Paragraph paragraph1 = new Paragraph(); ParagraphProperties paragraphProperties1 = new ParagraphProperties(); Justification justification1 = new Justification() { Val = cp.align }; ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties(); FontSize fontSize1 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript1 = new FontSizeComplexScript() { Val = "18" }; paragraphMarkRunProperties1.Append(fontSize1); paragraphMarkRunProperties1.Append(fontSizeComplexScript1); paragraphProperties1.Append(justification1); paragraphProperties1.Append(paragraphMarkRunProperties1); Run run1 = new Run(); RunProperties runProperties1 = new RunProperties(); FontSize fontSize2 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript2 = new FontSizeComplexScript() { Val = "18" }; runProperties1.Append(fontSize2); runProperties1.Append(fontSizeComplexScript2); run1.Append(runProperties1); if (cp.text != null) { Text text1 = new Text(); text1.Text = cp.text; run1.Append(text1); } paragraph1.Append(paragraphProperties1); paragraph1.Append(run1); tableCell1.Append(tableCellProperties1); tableCell1.Append(paragraph1); tableRow1.Append(tableCell1); } return tableRow1; }
//..................................................................... /// <summary> /// /// </summary> /// <returns></returns> public override Document GenerateDocument( ) { Document document1 = new Document( ) { MCAttributes = new MarkupCompatibilityAttributes( ) { Ignorable = "w14 wp14" } }; document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"); document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"); document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"); document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"); document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk"); document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml"); document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"); Body body1 = new Body( ); //--------------------------------------------- Paragraph paragraph1 = MakeP1( ); Paragraph paragraph3 = MakeP2( ); //--------------------------------------------- Paragraph paragraph5 = new Paragraph( ) { RsidParagraphMarkRevision = "00985895", RsidParagraphAddition = "00985895", RsidRunAdditionDefault = "00985895" }; ParagraphProperties paragraphProperties1 = new ParagraphProperties( ); ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties( ); RunFonts runFonts4 = new RunFonts( ) { Hint = FontTypeHintValues.EastAsia }; paragraphMarkRunProperties1.Append(runFonts4); paragraphProperties1.Append(paragraphMarkRunProperties1); BookmarkStart bookmarkStart1 = new BookmarkStart( ) { Name = "_GoBack", Id = "0" }; BookmarkEnd bookmarkEnd1 = new BookmarkEnd( ) { Id = "0" }; paragraph5.Append(paragraphProperties1); paragraph5.Append(bookmarkStart1); paragraph5.Append(bookmarkEnd1); SectionProperties sectionProperties1 = new SectionProperties( ) { RsidRPr = "00985895", RsidR = "00985895" }; PageSize pageSize1 = new PageSize( ) { Width = ( UInt32Value )11906U, Height = ( UInt32Value )16838U }; PageMargin pageMargin1 = new PageMargin( ) { Top = 1440, Right = ( UInt32Value )1800U, Bottom = 1440, Left = ( UInt32Value )1800U, Header = ( UInt32Value )851U, Footer = ( UInt32Value )992U, Gutter = ( UInt32Value )0U }; Columns columns1 = new Columns( ) { Space = "425" }; DocGrid docGrid1 = new DocGrid( ) { Type = DocGridValues.Lines, LinePitch = 312 }; sectionProperties1.Append(pageSize1); sectionProperties1.Append(pageMargin1); sectionProperties1.Append(columns1); sectionProperties1.Append(docGrid1); body1.Append(paragraph1); body1.Append(paragraph3); body1.Append(this.MakeP3()); body1.Append(paragraph5); body1.Append(sectionProperties1); document1.Append(body1); return(document1); }
private Paragraph GenerateReportDataHeadParagraph() { Paragraph paragraph1 = new Paragraph() { RsidParagraphMarkRevision = "00F24BD4", RsidParagraphAddition = "0073701D", RsidParagraphProperties = "00D25DD5", RsidRunAdditionDefault = "00D25DD5" }; ParagraphProperties paragraphProperties1 = new ParagraphProperties(); ParagraphStyleId paragraphStyleId1 = new ParagraphStyleId() { Val = "Heading1" }; SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { Before = "120", After = "120" }; Justification justification1 = new Justification() { Val = JustificationValues.Center }; ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties(); RunFonts runFonts1 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize1 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript1 = new FontSizeComplexScript() { Val = "36" }; paragraphMarkRunProperties1.Append(runFonts1); paragraphMarkRunProperties1.Append(fontSize1); paragraphMarkRunProperties1.Append(fontSizeComplexScript1); paragraphProperties1.Append(paragraphStyleId1); paragraphProperties1.Append(spacingBetweenLines1); paragraphProperties1.Append(justification1); paragraphProperties1.Append(paragraphMarkRunProperties1); Run run1 = new Run() { RsidRunProperties = "00F24BD4" }; RunProperties runProperties1 = new RunProperties(); RunFonts runFonts2 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize2 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript2 = new FontSizeComplexScript() { Val = "36" }; runProperties1.Append(runFonts2); runProperties1.Append(fontSize2); runProperties1.Append(fontSizeComplexScript2); Text text1 = new Text(); text1.Text = "管"; run1.Append(runProperties1); run1.Append(text1); Run run2 = new Run() { RsidRunAddition = "00F24BD4" }; RunProperties runProperties2 = new RunProperties(); RunFonts runFonts3 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize3 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript3 = new FontSizeComplexScript() { Val = "36" }; runProperties2.Append(runFonts3); runProperties2.Append(fontSize3); runProperties2.Append(fontSizeComplexScript3); Text text2 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text2.Text = " "; run2.Append(runProperties2); run2.Append(text2); Run run3 = new Run() { RsidRunProperties = "00F24BD4" }; RunProperties runProperties3 = new RunProperties(); RunFonts runFonts4 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize4 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript4 = new FontSizeComplexScript() { Val = "36" }; runProperties3.Append(runFonts4); runProperties3.Append(fontSize4); runProperties3.Append(fontSizeComplexScript4); Text text3 = new Text(); text3.Text = "材"; run3.Append(runProperties3); run3.Append(text3); Run run4 = new Run() { RsidRunAddition = "00F24BD4" }; RunProperties runProperties4 = new RunProperties(); RunFonts runFonts5 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize5 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript5 = new FontSizeComplexScript() { Val = "36" }; runProperties4.Append(runFonts5); runProperties4.Append(fontSize5); runProperties4.Append(fontSizeComplexScript5); Text text4 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text4.Text = " "; run4.Append(runProperties4); run4.Append(text4); Run run5 = new Run() { RsidRunProperties = "00F24BD4" }; RunProperties runProperties5 = new RunProperties(); RunFonts runFonts6 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize6 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript6 = new FontSizeComplexScript() { Val = "36" }; runProperties5.Append(runFonts6); runProperties5.Append(fontSize6); runProperties5.Append(fontSizeComplexScript6); Text text5 = new Text(); text5.Text = "单"; run5.Append(runProperties5); run5.Append(text5); Run run6 = new Run() { RsidRunAddition = "00F24BD4" }; RunProperties runProperties6 = new RunProperties(); RunFonts runFonts7 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize7 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript7 = new FontSizeComplexScript() { Val = "36" }; runProperties6.Append(runFonts7); runProperties6.Append(fontSize7); runProperties6.Append(fontSizeComplexScript7); Text text6 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text6.Text = " "; run6.Append(runProperties6); run6.Append(text6); Run run7 = new Run() { RsidRunProperties = "00F24BD4" }; RunProperties runProperties7 = new RunProperties(); RunFonts runFonts8 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize8 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript8 = new FontSizeComplexScript() { Val = "36" }; runProperties7.Append(runFonts8); runProperties7.Append(fontSize8); runProperties7.Append(fontSizeComplexScript8); Text text7 = new Text(); text7.Text = "根"; run7.Append(runProperties7); run7.Append(text7); Run run8 = new Run() { RsidRunAddition = "00F24BD4" }; RunProperties runProperties8 = new RunProperties(); RunFonts runFonts9 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize9 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript9 = new FontSizeComplexScript() { Val = "36" }; runProperties8.Append(runFonts9); runProperties8.Append(fontSize9); runProperties8.Append(fontSizeComplexScript9); Text text8 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text8.Text = " "; run8.Append(runProperties8); run8.Append(text8); Run run9 = new Run() { RsidRunProperties = "00F24BD4" }; RunProperties runProperties9 = new RunProperties(); RunFonts runFonts10 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize10 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript10 = new FontSizeComplexScript() { Val = "36" }; runProperties9.Append(runFonts10); runProperties9.Append(fontSize10); runProperties9.Append(fontSizeComplexScript10); Text text9 = new Text(); text9.Text = "检"; run9.Append(runProperties9); run9.Append(text9); Run run10 = new Run() { RsidRunAddition = "00F24BD4" }; RunProperties runProperties10 = new RunProperties(); RunFonts runFonts11 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize11 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript11 = new FontSizeComplexScript() { Val = "36" }; runProperties10.Append(runFonts11); runProperties10.Append(fontSize11); runProperties10.Append(fontSizeComplexScript11); Text text10 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text10.Text = " "; run10.Append(runProperties10); run10.Append(text10); Run run11 = new Run() { RsidRunProperties = "00F24BD4" }; RunProperties runProperties11 = new RunProperties(); RunFonts runFonts12 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize12 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript12 = new FontSizeComplexScript() { Val = "36" }; runProperties11.Append(runFonts12); runProperties11.Append(fontSize12); runProperties11.Append(fontSizeComplexScript12); Text text11 = new Text(); text11.Text = "验"; run11.Append(runProperties11); run11.Append(text11); Run run12 = new Run() { RsidRunAddition = "00F24BD4" }; RunProperties runProperties12 = new RunProperties(); RunFonts runFonts13 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize13 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript13 = new FontSizeComplexScript() { Val = "36" }; runProperties12.Append(runFonts13); runProperties12.Append(fontSize13); runProperties12.Append(fontSizeComplexScript13); Text text12 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text12.Text = " "; run12.Append(runProperties12); run12.Append(text12); Run run13 = new Run() { RsidRunProperties = "00F24BD4" }; RunProperties runProperties13 = new RunProperties(); RunFonts runFonts14 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize14 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript14 = new FontSizeComplexScript() { Val = "36" }; runProperties13.Append(runFonts14); runProperties13.Append(fontSize14); runProperties13.Append(fontSizeComplexScript14); Text text13 = new Text(); text13.Text = "信"; run13.Append(runProperties13); run13.Append(text13); Run run14 = new Run() { RsidRunAddition = "00F24BD4" }; RunProperties runProperties14 = new RunProperties(); RunFonts runFonts15 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize15 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript15 = new FontSizeComplexScript() { Val = "36" }; runProperties14.Append(runFonts15); runProperties14.Append(fontSize15); runProperties14.Append(fontSizeComplexScript15); Text text14 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text14.Text = " "; run14.Append(runProperties14); run14.Append(text14); Run run15 = new Run() { RsidRunProperties = "00F24BD4" }; RunProperties runProperties15 = new RunProperties(); RunFonts runFonts16 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize16 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript16 = new FontSizeComplexScript() { Val = "36" }; runProperties15.Append(runFonts16); runProperties15.Append(fontSize16); runProperties15.Append(fontSizeComplexScript16); Text text15 = new Text(); text15.Text = "息"; run15.Append(runProperties15); run15.Append(text15); Run run16 = new Run() { RsidRunAddition = "00F24BD4" }; RunProperties runProperties16 = new RunProperties(); RunFonts runFonts17 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize17 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript17 = new FontSizeComplexScript() { Val = "36" }; runProperties16.Append(runFonts17); runProperties16.Append(fontSize17); runProperties16.Append(fontSizeComplexScript17); Text text16 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text16.Text = " "; run16.Append(runProperties16); run16.Append(text16); Run run17 = new Run() { RsidRunProperties = "00F24BD4" }; RunProperties runProperties17 = new RunProperties(); RunFonts runFonts18 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize18 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript18 = new FontSizeComplexScript() { Val = "36" }; runProperties17.Append(runFonts18); runProperties17.Append(fontSize18); runProperties17.Append(fontSizeComplexScript18); Text text17 = new Text(); text17.Text = "统"; run17.Append(runProperties17); run17.Append(text17); Run run18 = new Run() { RsidRunAddition = "00F24BD4" }; RunProperties runProperties18 = new RunProperties(); RunFonts runFonts19 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize19 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript19 = new FontSizeComplexScript() { Val = "36" }; runProperties18.Append(runFonts19); runProperties18.Append(fontSize19); runProperties18.Append(fontSizeComplexScript19); Text text18 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text18.Text = " "; run18.Append(runProperties18); run18.Append(text18); Run run19 = new Run() { RsidRunProperties = "00F24BD4" }; RunProperties runProperties19 = new RunProperties(); RunFonts runFonts20 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize20 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript20 = new FontSizeComplexScript() { Val = "36" }; runProperties19.Append(runFonts20); runProperties19.Append(fontSize20); runProperties19.Append(fontSizeComplexScript20); Text text19 = new Text(); text19.Text = "计"; run19.Append(runProperties19); run19.Append(text19); Run run20 = new Run() { RsidRunAddition = "00F24BD4" }; RunProperties runProperties20 = new RunProperties(); RunFonts runFonts21 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize21 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript21 = new FontSizeComplexScript() { Val = "36" }; runProperties20.Append(runFonts21); runProperties20.Append(fontSize21); runProperties20.Append(fontSizeComplexScript21); Text text20 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text20.Text = " "; run20.Append(runProperties20); run20.Append(text20); BookmarkStart bookmarkStart1 = new BookmarkStart() { Name = "_GoBack", Id = "0" }; BookmarkEnd bookmarkEnd1 = new BookmarkEnd() { Id = "0" }; Run run21 = new Run() { RsidRunProperties = "00F24BD4" }; RunProperties runProperties21 = new RunProperties(); RunFonts runFonts22 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" }; FontSize fontSize22 = new FontSize() { Val = "36" }; FontSizeComplexScript fontSizeComplexScript22 = new FontSizeComplexScript() { Val = "36" }; runProperties21.Append(runFonts22); runProperties21.Append(fontSize22); runProperties21.Append(fontSizeComplexScript22); Text text21 = new Text(); text21.Text = "表"; run21.Append(runProperties21); run21.Append(text21); paragraph1.Append(paragraphProperties1); paragraph1.Append(run1); paragraph1.Append(run2); paragraph1.Append(run3); paragraph1.Append(run4); paragraph1.Append(run5); paragraph1.Append(run6); paragraph1.Append(run7); paragraph1.Append(run8); paragraph1.Append(run9); paragraph1.Append(run10); paragraph1.Append(run11); paragraph1.Append(run12); paragraph1.Append(run13); paragraph1.Append(run14); paragraph1.Append(run15); paragraph1.Append(run16); paragraph1.Append(run17); paragraph1.Append(run18); paragraph1.Append(run19); paragraph1.Append(run20); paragraph1.Append(bookmarkStart1); paragraph1.Append(bookmarkEnd1); paragraph1.Append(run21); return paragraph1; }
private Table GenerateBasiceReportDataTable() { Table table1 = new Table(); TableProperties tableProperties1 = new TableProperties(); TableStyle tableStyle1 = new TableStyle() { Val = "TableGrid" }; TablePositionProperties tablePositionProperties1 = new TablePositionProperties() { LeftFromText = 180, RightFromText = 180, VerticalAnchor = VerticalAnchorValues.Text, HorizontalAnchor = HorizontalAnchorValues.Margin, TablePositionXAlignment = HorizontalAlignmentValues.Center, TablePositionY = 103 }; TableWidth tableWidth1 = new TableWidth() { Width = "15026", Type = TableWidthUnitValues.Dxa }; TableLook tableLook1 = new TableLook() { Val = "04A0", FirstRow = true, LastRow = false, FirstColumn = true, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = true }; tableProperties1.Append(tableStyle1); tableProperties1.Append(tablePositionProperties1); tableProperties1.Append(tableWidth1); tableProperties1.Append(tableLook1); TableGrid tableGrid1 = new TableGrid(); GridColumn gridColumn1 = new GridColumn() { Width = "15026" }; tableGrid1.Append(gridColumn1); TableRow tableRow1 = new TableRow() { RsidTableRowAddition = "004E307B", RsidTableRowProperties = "00D273DB" }; TableCell tableCell1 = new TableCell(); TableCellProperties tableCellProperties1 = new TableCellProperties(); TableCellWidth tableCellWidth1 = new TableCellWidth() { Width = "15026", Type = TableWidthUnitValues.Dxa }; tableCellProperties1.Append(tableCellWidth1); Paragraph paragraph1 = new Paragraph() { RsidParagraphMarkRevision = "004E307B", RsidParagraphAddition = "004E307B", RsidParagraphProperties = "004E307B", RsidRunAdditionDefault = "004E307B" }; ParagraphProperties paragraphProperties1 = new ParagraphProperties(); Justification justification1 = new Justification() { Val = JustificationValues.Center }; paragraphProperties1.Append(justification1); paragraph1.Append(paragraphProperties1); tableCell1.Append(tableCellProperties1); tableCell1.Append(paragraph1); tableRow1.Append(tableCell1); table1.Append(tableProperties1); table1.Append(tableGrid1); table1.Append(tableRow1); return table1; }
public Paragraph GenerateLastParagraph(int counts,float length,int page) { Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "00000000", RsidParagraphProperties = "008A3B59", RsidRunAdditionDefault = "008A3B59" }; ParagraphProperties paragraphProperties1 = new ParagraphProperties(); Tabs tabs1 = new Tabs(); TabStop tabStop1 = new TabStop() { Val = TabStopValues.Left, Position = 0 }; TabStop tabStop2 = new TabStop() { Val = TabStopValues.Center, Position = 5000 }; TabStop tabStop3 = new TabStop() { Val = TabStopValues.Right, Position = 10070 }; tabs1.Append(tabStop1); tabs1.Append(tabStop2); tabs1.Append(tabStop3); ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties(); FontSizeComplexScript fontSizeComplexScript1 = new FontSizeComplexScript() { Val = "28" }; paragraphMarkRunProperties1.Append(fontSizeComplexScript1); paragraphProperties1.Append(tabs1); paragraphProperties1.Append(paragraphMarkRunProperties1); Run run1 = new Run() { RsidRunProperties = "00200017" }; RunProperties runProperties1 = new RunProperties(); RunFonts runFonts1 = new RunFonts() { Hint = FontTypeHintValues.EastAsia }; Bold bold1 = new Bold(); FontSizeComplexScript fontSizeComplexScript2 = new FontSizeComplexScript() { Val = "28" }; runProperties1.Append(runFonts1); runProperties1.Append(bold1); runProperties1.Append(fontSizeComplexScript2); Text text1 = new Text(); text1.Text = " "; run1.Append(runProperties1); run1.Append(text1); Run run2 = new Run() { RsidRunAddition = "00CE1671" }; RunProperties runProperties2 = new RunProperties(); FontSizeComplexScript fontSizeComplexScript3 = new FontSizeComplexScript() { Val = "28" }; runProperties2.Append(fontSizeComplexScript3); Text text2 = new Text(); text2.Text = "共计:" + counts + "根"; run2.Append(runProperties2); run2.Append(text2); Run run3 = new Run() { RsidRunAddition = "00CE1671" }; RunProperties runProperties3 = new RunProperties(); RunFonts runFonts2 = new RunFonts() { Hint = FontTypeHintValues.EastAsia }; FontSizeComplexScript fontSizeComplexScript4 = new FontSizeComplexScript() { Val = "28" }; runProperties3.Append(runFonts2); runProperties3.Append(fontSizeComplexScript4); TabChar tabChar1 = new TabChar(); run3.Append(runProperties3); run3.Append(tabChar1); Run run4 = new Run() { RsidRunProperties = "00CE1671", RsidRunAddition = "00CE1671" }; RunProperties runProperties4 = new RunProperties(); RunFonts runFonts3 = new RunFonts() { Hint = FontTypeHintValues.EastAsia }; Bold bold2 = new Bold(); BoldComplexScript boldComplexScript1 = new BoldComplexScript(); FontSizeComplexScript fontSizeComplexScript5 = new FontSizeComplexScript() { Val = "21" }; runProperties4.Append(runFonts3); runProperties4.Append(bold2); runProperties4.Append(boldComplexScript1); runProperties4.Append(fontSizeComplexScript5); Text text3 = new Text(); text3.Text = " "; run4.Append(runProperties4); run4.Append(text3); Run run5 = new Run() { RsidRunProperties = "00CE1671", RsidRunAddition = "00CE1671" }; RunProperties runProperties5 = new RunProperties(); BoldComplexScript boldComplexScript2 = new BoldComplexScript(); FontSizeComplexScript fontSizeComplexScript6 = new FontSizeComplexScript() { Val = "21" }; runProperties5.Append(boldComplexScript2); runProperties5.Append(fontSizeComplexScript6); Text text4 = new Text(); text4.Text = "共计:" + length + "米"; run5.Append(runProperties5); run5.Append(text4); Run run6 = new Run() { RsidRunAddition = "00CE1671" }; RunProperties runProperties6 = new RunProperties(); RunFonts runFonts4 = new RunFonts() { Hint = FontTypeHintValues.EastAsia }; Bold bold3 = new Bold(); BoldComplexScript boldComplexScript3 = new BoldComplexScript(); FontSizeComplexScript fontSizeComplexScript7 = new FontSizeComplexScript() { Val = "21" }; runProperties6.Append(runFonts4); runProperties6.Append(bold3); runProperties6.Append(boldComplexScript3); runProperties6.Append(fontSizeComplexScript7); TabChar tabChar2 = new TabChar(); run6.Append(runProperties6); run6.Append(tabChar2); Run run7 = new Run() { RsidRunProperties = "00200017" }; RunProperties runProperties7 = new RunProperties(); //RunFonts runFonts5 = new RunFonts() { Hint = FontTypeHintValues.EastAsia }; //Bold bold4 = new Bold(); FontSizeComplexScript fontSizeComplexScript8 = new FontSizeComplexScript() { Val = "28" }; //runProperties7.Append(runFonts5); //runProperties7.Append(bold4); runProperties7.Append(fontSizeComplexScript8); Text text5 = new Text(); text5.Text = "共计:" + page + "页"; run7.Append(runProperties7); run7.Append(text5); paragraph1.Append(paragraphProperties1); paragraph1.Append(run1); paragraph1.Append(run2); paragraph1.Append(run3); paragraph1.Append(run4); paragraph1.Append(run5); paragraph1.Append(run6); paragraph1.Append(run7); return paragraph1; }
private static TableRow CreateAdditionalCourseRow(AdditionalCoursesItem additionalCourse, GenerationData data) { TableRow tableRow2 = new TableRow() { RsidTableRowAddition = "009B2C1D", ParagraphId = "78EC2050", TextId = "77777777" }; TableRowProperties tableRowProperties1 = new TableRowProperties(); GridAfter gridAfter1 = new GridAfter() { Val = 1 }; WidthAfterTableRow widthAfterTableRow1 = new WidthAfterTableRow() { Width = "360", Type = TableWidthUnitValues.Dxa }; tableRowProperties1.Append(gridAfter1); tableRowProperties1.Append(widthAfterTableRow1); TableCell tableCell2 = new TableCell(); TableCellProperties tableCellProperties2 = new TableCellProperties(); TableCellWidth tableCellWidth2 = new TableCellWidth() { Width = "2550", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders2 = new TableCellBorders(); TopBorder topBorder3 = new TopBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; LeftBorder leftBorder3 = new LeftBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; BottomBorder bottomBorder3 = new BottomBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; RightBorder rightBorder3 = new RightBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; tableCellBorders2.Append(topBorder3); tableCellBorders2.Append(leftBorder3); tableCellBorders2.Append(bottomBorder3); tableCellBorders2.Append(rightBorder3); tableCellProperties2.Append(tableCellWidth2); tableCellProperties2.Append(tableCellBorders2); Paragraph paragraph2 = new Paragraph() { RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "009E39C2", ParagraphId = "1D1F29ED", TextId = "111BDF87" }; Run run3 = new Run(); RunProperties runProperties3 = new RunProperties(); FontSize fontSize3 = new FontSize() { Val = "22" }; FontSizeComplexScript fontSizeComplexScript3 = new FontSizeComplexScript() { Val = "22" }; runProperties3.Append(fontSize3); runProperties3.Append(fontSizeComplexScript3); Text text3 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text3.Text = $"{additionalCourse.AmountOfDays} {GetDay(additionalCourse.AmountOfDays, data)} / {additionalCourse.Year} "; run3.Append(runProperties3); run3.Append(text3); paragraph2.Append(run3); tableCell2.Append(tableCellProperties2); tableCell2.Append(paragraph2); TableCell tableCell3 = new TableCell(); TableCellProperties tableCellProperties3 = new TableCellProperties(); TableCellWidth tableCellWidth3 = new TableCellWidth() { Width = "5700", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders3 = new TableCellBorders(); TopBorder topBorder4 = new TopBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; LeftBorder leftBorder4 = new LeftBorder() { Val = BorderValues.Single, Color = "000000", Size = (UInt32Value)1U, Space = (UInt32Value)0U }; BottomBorder bottomBorder4 = new BottomBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; RightBorder rightBorder4 = new RightBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; tableCellBorders3.Append(topBorder4); tableCellBorders3.Append(leftBorder4); tableCellBorders3.Append(bottomBorder4); tableCellBorders3.Append(rightBorder4); tableCellProperties3.Append(tableCellWidth3); tableCellProperties3.Append(tableCellBorders3); Paragraph paragraph3 = new Paragraph() { RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "009E39C2", ParagraphId = "4F98306E", TextId = "77777777" }; ParagraphProperties paragraphProperties1 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { After = "100", Line = "240", LineRule = LineSpacingRuleValues.Auto }; Indentation indentation1 = new Indentation() { Left = "144" }; paragraphProperties1.Append(spacingBetweenLines1); paragraphProperties1.Append(indentation1); Run run4 = new Run(); RunProperties runProperties4 = new RunProperties(); Bold bold2 = new Bold(); FontSize fontSize4 = new FontSize() { Val = "22" }; FontSizeComplexScript fontSizeComplexScript4 = new FontSizeComplexScript() { Val = "22" }; runProperties4.Append(bold2); runProperties4.Append(fontSize4); runProperties4.Append(fontSizeComplexScript4); Text text4 = new Text(); text4.Text = additionalCourse.CourseName?.ToUpper(); run4.Append(runProperties4); run4.Append(text4); paragraph3.Append(paragraphProperties1); paragraph3.Append(run4); Paragraph paragraph4 = new Paragraph() { RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "009E39C2", ParagraphId = "1C86C2CE", TextId = "77777777" }; ParagraphProperties paragraphProperties2 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines2 = new SpacingBetweenLines() { After = "100", Line = "240", LineRule = LineSpacingRuleValues.Auto }; Indentation indentation2 = new Indentation() { Left = "144" }; paragraphProperties2.Append(spacingBetweenLines2); paragraphProperties2.Append(indentation2); Run run5 = new Run(); RunProperties runProperties5 = new RunProperties(); FontSize fontSize5 = new FontSize() { Val = "22" }; FontSizeComplexScript fontSizeComplexScript5 = new FontSizeComplexScript() { Val = "22" }; runProperties5.Append(fontSize5); runProperties5.Append(fontSizeComplexScript5); Text text5 = new Text(); text5.Text = additionalCourse.Instructor; run5.Append(runProperties5); run5.Append(text5); paragraph4.Append(paragraphProperties2); paragraph4.Append(run5); tableCell3.Append(tableCellProperties3); tableCell3.Append(paragraph3); tableCell3.Append(paragraph4); tableRow2.Append(tableRowProperties1); tableRow2.Append(tableCell2); tableRow2.Append(tableCell3); return(tableRow2); }
void _base_block(Body body, BaseBlockParagraphItem data) { #region Справка { var p_spravka = new Paragraph() { RsidParagraphMarkRevision = "00080948", RsidParagraphAddition = "000545D0", RsidParagraphProperties = "00080948", RsidRunAdditionDefault = "00080948" }; var pp_spravka = new ParagraphProperties() { SpacingBetweenLines = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }, Justification = new Justification() { Val = JustificationValues.Center } }; var pmrp_title_first = new ParagraphMarkRunProperties(); pmrp_title_first.Append(new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman", ComplexScript = "Times New Roman" }); pmrp_title_first.Append(new FontSize() { Val = "28" }); pp_spravka.Append(pmrp_title_first); var run_spravka = new Run() { RsidRunProperties = "00080948", RunProperties = new RunProperties() { RunFonts = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman", ComplexScript = "Times New Roman" }, FontSize = new FontSize() { Val = "28" } } }; run_spravka.Append(new Text() { Text = "Справка" }); p_spravka.Append(pp_spravka); p_spravka.Append(run_spravka); body.Append(p_spravka); body.Append(_empty_paragraph()); } #endregion var sb = new StringBuilder(); #region first row var p_1_row = new Paragraph() { RsidParagraphAddition = "00903FBA", RsidParagraphProperties = "00390316", RsidRunAdditionDefault = "00903FBA" }; var pp_1_row = new ParagraphProperties() { SpacingBetweenLines = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }, Justification = new Justification() { Val = JustificationValues.Both } }; var pmrp_1_row = new ParagraphMarkRunProperties(); pmrp_1_row.Append(new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman", ComplexScript = "Times New Roman" }); pmrp_1_row.Append(new FontSize() { Val = "28" }); pp_1_row.Append(pmrp_1_row); var run_1_row = new Run() { RunProperties = new RunProperties() { RunFonts = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman", ComplexScript = "Times New Roman" }, FontSize = new FontSize() { Val = "28" } } }; run_1_row.Append(new TabChar()); sb.Append("1. Статья «").Append(data.ArticleName).Append("» размещена ").Append(data.CreatingDate) .Append(" на сайте в сети Интернет «").Append(data.SiteAlias).Append("» по адресу: «") .Append(data.URL).Append("»."); run_1_row.Append(new Text() { Text = sb.ToString() }); sb.Clear(); p_1_row.Append(pp_1_row); p_1_row.Append(run_1_row); body.Append(p_1_row); body.Append(_empty_paragraph()); #endregion #region second row { var p_2_row = new Paragraph() { RsidParagraphAddition = "00903FBA", RsidParagraphProperties = "00390316", RsidRunAdditionDefault = "00903FBA" }; var pp_2_row = new ParagraphProperties() { SpacingBetweenLines = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }, Justification = new Justification() { Val = JustificationValues.Both } }; var pmrp_2_row = new ParagraphMarkRunProperties(); pmrp_2_row.Append(new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman", ComplexScript = "Times New Roman" }); pmrp_2_row.Append(new FontSize() { Val = "28" }); pp_2_row.Append(pmrp_2_row); var run_2_row = new Run() { RunProperties = new RunProperties() { RunFonts = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman", ComplexScript = "Times New Roman" }, FontSize = new FontSize() { Val = "28" } } }; run_2_row.Append(new TabChar()); sb.Append("2. В статье говорится о том, что ").Append(value: data.ShortArticleDescription.ToLowerFirstWord()).Append("."); run_2_row.Append(new Text() { Text = sb.ToString() }); sb.Clear(); sb = null; p_2_row.Append(pp_2_row); p_2_row.Append(run_2_row); body.Append(p_2_row); body.Append(_empty_paragraph()); } #endregion #region third row { var p_3_row = new Paragraph() { RsidParagraphAddition = "00903FBA", RsidParagraphProperties = "00390316", RsidRunAdditionDefault = "00903FBA" }; var pp_3_row = new ParagraphProperties() { SpacingBetweenLines = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }, Justification = new Justification() { Val = JustificationValues.Both } }; var pmrp_3_row = new ParagraphMarkRunProperties(); pmrp_3_row.Append(new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman", ComplexScript = "Times New Roman" }); pmrp_3_row.Append(new FontSize() { Val = "28" }); pp_3_row.Append(pmrp_3_row); var run_3_row = new Run() { RunProperties = new RunProperties() { RunFonts = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman", ComplexScript = "Times New Roman" }, FontSize = new FontSize() { Val = "28" } } }; run_3_row.Append(new TabChar()); string comment_count_row = string.Empty; if (data.CommentsCount == 0) { comment_count_row = "Комментарии отсутствуют."; } else { comment_count_row = "Всего - " + data.CommentsCount; if (data.CommentsCount == 1) { comment_count_row += " комментарий."; } else if (data.CommentsCount < 5) { comment_count_row += " комментария."; } else { comment_count_row += " комментариев."; } } run_3_row.Append(new Text() { Text = "3. " + comment_count_row }); p_3_row.Append(pp_3_row); p_3_row.Append(run_3_row); body.Append(p_3_row); body.Append(_empty_paragraph()); } #endregion }
// Generates content of headerPart1. private void GenerateHeaderPart1Content(HeaderPart headerPart1) { Header header1 = new Header() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } }; header1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"); header1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); header1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); header1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); header1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); header1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); header1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"); header1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"); header1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); header1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); header1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); header1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"); header1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk"); header1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml"); header1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"); Paragraph paragraph52 = new Paragraph() { RsidParagraphAddition = "004F7F90", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties50 = new ParagraphProperties(); WidowControl widowControl50 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE50 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN50 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent50 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines36 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; Justification justification11 = new Justification() { Val = JustificationValues.Center }; ParagraphMarkRunProperties paragraphMarkRunProperties50 = new ParagraphMarkRunProperties(); RunFonts runFonts105 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize105 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript105 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties50.Append(runFonts105); paragraphMarkRunProperties50.Append(fontSize105); paragraphMarkRunProperties50.Append(fontSizeComplexScript105); paragraphProperties50.Append(widowControl50); paragraphProperties50.Append(autoSpaceDE50); paragraphProperties50.Append(autoSpaceDN50); paragraphProperties50.Append(adjustRightIndent50); paragraphProperties50.Append(spacingBetweenLines36); paragraphProperties50.Append(justification11); paragraphProperties50.Append(paragraphMarkRunProperties50); Run run56 = new Run(); RunProperties runProperties56 = new RunProperties(); RunFonts runFonts106 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold19 = new Bold(); BoldComplexScript boldComplexScript19 = new BoldComplexScript(); FontSize fontSize106 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript106 = new FontSizeComplexScript() { Val = "16" }; runProperties56.Append(runFonts106); runProperties56.Append(bold19); runProperties56.Append(boldComplexScript19); runProperties56.Append(fontSize106); runProperties56.Append(fontSizeComplexScript106); Text text48 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text48.Text = "Смоленская государственная медицинская академия "; run56.Append(runProperties56); run56.Append(text48); paragraph52.Append(paragraphProperties50); paragraph52.Append(run56); Paragraph paragraph53 = new Paragraph() { RsidParagraphAddition = "004F7F90", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties51 = new ParagraphProperties(); WidowControl widowControl51 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE51 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN51 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent51 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines37 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; Justification justification12 = new Justification() { Val = JustificationValues.Center }; ParagraphMarkRunProperties paragraphMarkRunProperties51 = new ParagraphMarkRunProperties(); RunFonts runFonts107 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize107 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript107 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties51.Append(runFonts107); paragraphMarkRunProperties51.Append(fontSize107); paragraphMarkRunProperties51.Append(fontSizeComplexScript107); paragraphProperties51.Append(widowControl51); paragraphProperties51.Append(autoSpaceDE51); paragraphProperties51.Append(autoSpaceDN51); paragraphProperties51.Append(adjustRightIndent51); paragraphProperties51.Append(spacingBetweenLines37); paragraphProperties51.Append(justification12); paragraphProperties51.Append(paragraphMarkRunProperties51); Run run57 = new Run(); RunProperties runProperties57 = new RunProperties(); RunFonts runFonts108 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold20 = new Bold(); BoldComplexScript boldComplexScript20 = new BoldComplexScript(); FontSize fontSize108 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript108 = new FontSizeComplexScript() { Val = "16" }; runProperties57.Append(runFonts108); runProperties57.Append(bold20); runProperties57.Append(boldComplexScript20); runProperties57.Append(fontSize108); runProperties57.Append(fontSizeComplexScript108); Text text49 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text49.Text = "Научно-исследовательский институт антимикробной химиотерапии "; run57.Append(runProperties57); run57.Append(text49); paragraph53.Append(paragraphProperties51); paragraph53.Append(run57); Paragraph paragraph54 = new Paragraph() { RsidParagraphAddition = "004F7F90", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties52 = new ParagraphProperties(); WidowControl widowControl52 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE52 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN52 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent52 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines38 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; Justification justification13 = new Justification() { Val = JustificationValues.Center }; ParagraphMarkRunProperties paragraphMarkRunProperties52 = new ParagraphMarkRunProperties(); RunFonts runFonts109 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize109 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript109 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties52.Append(runFonts109); paragraphMarkRunProperties52.Append(fontSize109); paragraphMarkRunProperties52.Append(fontSizeComplexScript109); paragraphProperties52.Append(widowControl52); paragraphProperties52.Append(autoSpaceDE52); paragraphProperties52.Append(autoSpaceDN52); paragraphProperties52.Append(adjustRightIndent52); paragraphProperties52.Append(spacingBetweenLines38); paragraphProperties52.Append(justification13); paragraphProperties52.Append(paragraphMarkRunProperties52); Run run58 = new Run(); RunProperties runProperties58 = new RunProperties(); RunFonts runFonts110 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold21 = new Bold(); BoldComplexScript boldComplexScript21 = new BoldComplexScript(); FontSize fontSize110 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript110 = new FontSizeComplexScript() { Val = "16" }; runProperties58.Append(runFonts110); runProperties58.Append(bold21); runProperties58.Append(boldComplexScript21); runProperties58.Append(fontSize110); runProperties58.Append(fontSizeComplexScript110); Text text50 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text50.Text = "Клинико-диагностическая лаборатория, тел. 45-06-13 "; run58.Append(runProperties58); run58.Append(text50); paragraph54.Append(paragraphProperties52); paragraph54.Append(run58); header1.Append(paragraph52); header1.Append(paragraph53); header1.Append(paragraph54); headerPart1.Header = header1; }
public static void GenerateFooterPart1Content(FooterPart footerPart1) { var footer1 = new Footer { MCAttributes = new MarkupCompatibilityAttributes { Ignorable = "w14 w15 w16se w16cid wp14" } }; footer1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"); footer1.AddNamespaceDeclaration("cx", "http://schemas.microsoft.com/office/drawing/2014/chartex"); footer1.AddNamespaceDeclaration("cx1", "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex"); footer1.AddNamespaceDeclaration("cx2", "http://schemas.microsoft.com/office/drawing/2015/10/21/chartex"); footer1.AddNamespaceDeclaration("cx3", "http://schemas.microsoft.com/office/drawing/2016/5/9/chartex"); footer1.AddNamespaceDeclaration("cx4", "http://schemas.microsoft.com/office/drawing/2016/5/10/chartex"); footer1.AddNamespaceDeclaration("cx5", "http://schemas.microsoft.com/office/drawing/2016/5/11/chartex"); footer1.AddNamespaceDeclaration("cx6", "http://schemas.microsoft.com/office/drawing/2016/5/12/chartex"); footer1.AddNamespaceDeclaration("cx7", "http://schemas.microsoft.com/office/drawing/2016/5/13/chartex"); footer1.AddNamespaceDeclaration("cx8", "http://schemas.microsoft.com/office/drawing/2016/5/14/chartex"); footer1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); footer1.AddNamespaceDeclaration("aink", "http://schemas.microsoft.com/office/drawing/2016/ink"); footer1.AddNamespaceDeclaration("am3d", "http://schemas.microsoft.com/office/drawing/2017/model3d"); footer1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); footer1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); footer1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); footer1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); footer1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"); footer1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"); footer1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); footer1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); footer1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); footer1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml"); footer1.AddNamespaceDeclaration("w16cid", "http://schemas.microsoft.com/office/word/2016/wordml/cid"); footer1.AddNamespaceDeclaration("w16se", "http://schemas.microsoft.com/office/word/2015/wordml/symex"); footer1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"); footer1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk"); footer1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml"); footer1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"); var paragraph273 = new Paragraph { RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "009E39C2", ParagraphId = "71F3416E", TextId = "77777777" }; var paragraphProperties176 = new ParagraphProperties(); var paragraphStyleId1 = new ParagraphStyleId { Val = "leftRight" }; paragraphProperties176.Append(paragraphStyleId1); var run396 = new Run(); var text366 = new Text { Text = "Confidential Candidate CV" }; run396.Append(text366); var run397 = new Run(); var tabChar1 = new TabChar(); run397.Append(tabChar1); var run398 = new Run(); var fieldChar1 = new FieldChar { FieldCharType = FieldCharValues.Begin }; run398.Append(fieldChar1); var run399 = new Run(); var fieldCode1 = new FieldCode { Text = "PAGE" }; run399.Append(fieldCode1); var run400 = new Run(); var fieldChar2 = new FieldChar { FieldCharType = FieldCharValues.Separate }; run400.Append(fieldChar2); var run401 = new Run(); var runProperties394 = new RunProperties(); var noProof30 = new NoProof(); runProperties394.Append(noProof30); var text367 = new Text { Text = "2" }; run401.Append(runProperties394); run401.Append(text367); var run402 = new Run(); var fieldChar3 = new FieldChar { FieldCharType = FieldCharValues.End }; run402.Append(fieldChar3); paragraph273.Append(paragraphProperties176); paragraph273.Append(run396); paragraph273.Append(run397); paragraph273.Append(run398); paragraph273.Append(run399); paragraph273.Append(run400); paragraph273.Append(run401); paragraph273.Append(run402); footer1.Append(paragraph273); footerPart1.Footer = footer1; }
private Paragraph SetParagraph(string textVal = null, int fontsize = 22, bool isBold = false) { Languages languages = new Languages() { Val = "ru-RU" }; Paragraph paragraph = new Paragraph();// { RsidParagraphAddition = "00A341BE", RsidRunAdditionDefault = "00C92E31" }; ParagraphProperties paragraphProperties1 = new ParagraphProperties(); ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties(); if (isBold) { Bold bold1 = new Bold() { Val = true }; paragraphMarkRunProperties1.Append(bold1); } FontSize fontSize1 = new FontSize() { Val = fontsize.ToString() }; paragraphMarkRunProperties1.Append(fontSize1); paragraphMarkRunProperties1.Append(languages); paragraphProperties1.Append(paragraphMarkRunProperties1); if (textVal != null) { Languages languages2 = new Languages() { Val = "ru-RU" }; Run run1 = new Run();// { RsidRunProperties = "00C92E31" }; RunProperties runProperties1 = new RunProperties(); if (isBold) { Bold bold = new Bold() { Val = isBold }; runProperties1.Append(bold); BoldComplexScript boldComplexScript = new BoldComplexScript(); runProperties1.Append(boldComplexScript); } FontSize fontSize = new FontSize() { Val = fontsize.ToString() }; runProperties1.Append(fontSize); runProperties1.Append(languages2); Text text1 = new Text(); text1.Text = textVal; run1.Append(runProperties1); run1.Append(text1); paragraph.Append(paragraphProperties1); paragraph.Append(run1); } else { paragraph.Append(paragraphProperties1); } return(paragraph); }
public static TableCell CreateColumnHeader(ColumnTable column) { TableCell tableCell1 = new TableCell(); TableCellProperties tableCellProperties1 = new TableCellProperties(); ConditionalFormatStyle conditionalFormatStyle2 = new ConditionalFormatStyle() { Val = "001000000000", FirstRow = false, LastRow = false, FirstColumn = true, LastColumn = false, OddVerticalBand = false, EvenVerticalBand = false, OddHorizontalBand = false, EvenHorizontalBand = false, FirstRowFirstColumn = false, FirstRowLastColumn = false, LastRowFirstColumn = false, LastRowLastColumn = false }; TableCellWidth tableCellWidth1 = new TableCellWidth() { Type = TableWidthUnitValues.Dxa }; tableCellProperties1.Append(conditionalFormatStyle2); tableCellProperties1.Append(tableCellWidth1); Paragraph paragraph1 = new Paragraph() { RsidParagraphMarkRevision = "00451032", RsidParagraphAddition = "00D149A8", RsidParagraphProperties = "00AD5D8A", RsidRunAdditionDefault = "00D149A8" }; ParagraphProperties paragraphProperties1 = new ParagraphProperties(); ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties(); RunFonts runFonts1 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman", ComplexScript = "Times New Roman" }; FontSize fontSize1 = new FontSize() { Val = "28" }; FontSizeComplexScript fontSizeComplexScript1 = new FontSizeComplexScript() { Val = "28" }; paragraphMarkRunProperties1.Append(runFonts1); paragraphMarkRunProperties1.Append(fontSize1); paragraphMarkRunProperties1.Append(fontSizeComplexScript1); paragraphProperties1.Append(paragraphMarkRunProperties1); Run run1 = new Run(); RunProperties runProperties2 = new RunProperties(); RunFonts runFonts2 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman", ComplexScript = "Times New Roman" }; FontSize fontSize2 = new FontSize() { Val = "28" }; FontSizeComplexScript fontSizeComplexScript2 = new FontSizeComplexScript() { Val = "28" }; runProperties2.Append(runFonts2); runProperties2.Append(fontSize2); runProperties2.Append(fontSizeComplexScript2); Text text1 = new Text(); text1.Text = column.ColumnHeader; run1.Append(runProperties2); run1.Append(text1); paragraph1.Append(paragraphProperties1); paragraph1.Append(run1); tableCell1.Append(tableCellProperties1); tableCell1.Append(paragraph1); return(tableCell1); }
public static TableCell CreateColumnCell(ColumnTable column) { TableCell tableCell = new TableCell(); TableCellProperties tableCellProperties = new TableCellProperties(); DocumentFormat.OpenXml.Wordprocessing.ConditionalFormatStyle conditionalFormatStyleCell1 = new ConditionalFormatStyle() { Val = "001000000000", FirstRow = false, LastRow = false, FirstColumn = true, LastColumn = false, OddVerticalBand = false, EvenVerticalBand = false, OddHorizontalBand = false, EvenHorizontalBand = false, FirstRowFirstColumn = false, FirstRowLastColumn = false, LastRowFirstColumn = false, LastRowLastColumn = false }; DocumentFormat.OpenXml.Wordprocessing.TableCellWidth tableCellWidth1 = new TableCellWidth() { Type = TableWidthUnitValues.Dxa }; tableCellProperties.Append(conditionalFormatStyleCell1); tableCellProperties.Append(tableCellWidth1); SdtBlock sdtBlockSub = new SdtBlock(); SdtProperties sdtProperties = new SdtProperties(); RunProperties runProperties = new RunProperties(); RunFonts runFonts1 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman", ComplexScript = "Times New Roman" }; FontSize fontSize1 = new FontSize() { Val = "28" }; FontSizeComplexScript fontSizeComplexScript1 = new FontSizeComplexScript() { Val = "28" }; runProperties.Append(runFonts1); runProperties.Append(fontSize1); runProperties.Append(fontSizeComplexScript1); SdtAlias sdtAliasSub = new SdtAlias() { Val = column.ColumnField }; Tag tagCell = new Tag() { Val = column.ColumnField }; SdtId sdtIdCell = new SdtId() { Val = -2144724967 }; SdtPlaceholder sdtPlaceholderCell1 = new SdtPlaceholder(); DocPartReference docPartReferenceCell1 = new DocPartReference() { Val = "941489452D594FF2A513A53EEFA3E58F" }; sdtPlaceholderCell1.Append(docPartReferenceCell1); sdtProperties.Append(runProperties); sdtProperties.Append(sdtAliasSub); sdtProperties.Append(tagCell); sdtProperties.Append(sdtIdCell); sdtProperties.Append(sdtPlaceholderCell1); SdtContentBlock sdtContentBlockSub = new SdtContentBlock(); Paragraph paragraphCell = new Paragraph() { RsidParagraphAddition = "00C03259", RsidParagraphProperties = "00BB7EFE", RsidRunAdditionDefault = "00C03259" }; ParagraphProperties paragraphProperties1 = new ParagraphProperties(); ParagraphMarkRunProperties paragraphMarkRunPropertiesCell = new ParagraphMarkRunProperties(); RunFonts runFonts2 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman", ComplexScript = "Times New Roman" }; FontSize fontSize2 = new FontSize() { Val = "28" }; FontSizeComplexScript fontSizeComplexScript2 = new FontSizeComplexScript() { Val = "28" }; paragraphMarkRunPropertiesCell.Append(runFonts2); paragraphMarkRunPropertiesCell.Append(fontSize2); paragraphMarkRunPropertiesCell.Append(fontSizeComplexScript2); paragraphProperties1.Append(paragraphMarkRunPropertiesCell); Run runCell = new Run(); RunProperties runPropertiesCell = new RunProperties(); RunFonts runFonts3 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman", ComplexScript = "Times New Roman" }; Bold bold1 = new Bold() { Val = false }; FontSize fontSize3 = new FontSize() { Val = "28" }; FontSizeComplexScript fontSizeComplexScript3 = new FontSizeComplexScript() { Val = "28" }; runPropertiesCell.Append(runFonts3); runPropertiesCell.Append(bold1); runPropertiesCell.Append(fontSize3); runPropertiesCell.Append(fontSizeComplexScript3); Text textCell = new Text(); textCell.Text = column.ColumnHeader; runCell.Append(runPropertiesCell); runCell.Append(textCell); paragraphCell.Append(paragraphProperties1); paragraphCell.Append(runCell); sdtContentBlockSub.Append(paragraphCell); sdtBlockSub.Append(sdtProperties); sdtBlockSub.Append(sdtContentBlockSub); tableCell.Append(tableCellProperties); tableCell.Append(sdtBlockSub); return(tableCell); }
private void GenerarExamen(int cantidadExamenes = 1, int cantidadCopias = 1) { string resultPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).ToString(cultureInfo) + "\\Test.docx"; using (WordprocessingDocument document = WordprocessingDocument.Create(resultPath, WordprocessingDocumentType.Document)) { var diccionarioBloqueCuestionarioCopy = new Dictionary <string, BloqueCuestionario>(); var listBloqueCuestionarioCopy = new List <BloqueCuestionario>(); // listaBloqueCuestionarioCopy = listaBloqueCuestionario; diccionarioBloqueCuestionarioCopy = diccionarioBloqueCuestionarioEstructurado; listBloqueCuestionarioCopy = diccionarioBloqueCuestionarioCopy.Values.ToList(); MainDocumentPart mainPart = document.AddMainDocumentPart(); mainPart.Document = new Document(); Body body = mainPart.Document.AppendChild(new Body()); int contadorNumberingId = 0; for (int i = 0; i < cantidadExamenes; i++) { if (true) { Random rnd = new Random((int)DateTime.Now.Ticks); listBloqueCuestionarioCopy.Shuffle(rnd); } for (int j = 0; j < cantidadCopias; j++) { if (i > 0 || j > 0) { InsertarSaltoDePagina(body); } contadorNumberingId++; foreach (var item in diccionarioBloqueCuestionarioCopy.Values) { ParagraphProperties paragraphProperties = new ParagraphProperties(); ParagraphStyleId paragraphStyleId = new ParagraphStyleId() { Val = "ListParagraph" }; NumberingProperties numberingProperties = new NumberingProperties(); NumberingLevelReference numberingLevelReference = new NumberingLevelReference() { Val = 0 }; NumberingId numberingId = new NumberingId() { Val = contadorNumberingId }; //Val is 1, 2, 3 etc based on your numberingid in your numbering element NumberingFormat numberingFormat = new NumberingFormat() { Val = NumberFormatValues.UpperLetter }; numberingProperties.Append(numberingLevelReference); numberingProperties.Append(numberingFormat); numberingProperties.Append(numberingId); paragraphProperties.Append(paragraphStyleId); paragraphProperties.Append(numberingProperties); Paragraph para = body.AppendChild(new Paragraph()); para.Append(paragraphProperties); Run run = para.AppendChild(new Run()); run.AppendChild(new Text(item.Pregunta.InnerText.Substring(1).Trim(' '))); } } } } if (diccionarioBloqueCuestionarioEstructurado.Count > 0) { if (MessageBox.Show(Mensajes.AbrirArchivoGenerado + "\n" + resultPath, Mensajes.ArchivoGeneradoCorrectamenteTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.FileName = "WINWORD.EXE"; startInfo.Arguments = resultPath; Process.Start(startInfo); } } else { Mensajes.NoExistenDatosParaEstructurar(); } }
public void ProcessRequest(System.Data.DataTable dt, string docFileName) { using (MemoryStream mem = new MemoryStream()) { // Create Document using (WordprocessingDocument wordDocument = WordprocessingDocument.Create(mem, WordprocessingDocumentType.Document, true)) { // Add a main document part. MainDocumentPart mainPart = wordDocument.AddMainDocumentPart(); StyleDefinitionsPart stylePart = mainPart.AddNewPart <StyleDefinitionsPart>(); RunProperties rPrNormal = new RunProperties(); RunFonts rFont1 = new RunFonts(); //rFont1.Ascii = "Times New Roman"; //rPrNormal.Append(rFont1); rPrNormal.Append(new DocumentFormat.OpenXml.Wordprocessing.FontSize() { Val = "24" }); DocumentFormat.OpenXml.Wordprocessing.Style style1 = new DocumentFormat.OpenXml.Wordprocessing.Style(); style1.StyleId = "myText"; style1.Append(new Name() { Val = "text" }); style1.Append(rPrNormal); stylePart.Styles = new Styles(); stylePart.Styles.Append(style1); RunProperties rPr = new RunProperties(); Color color = new Color() { Val = "FF0000" }; RunFonts rFont = new RunFonts(); //rFont.Ascii = "Times New Roman"; //rPr.Append(color); //rPr.Append(rFont); rPr.Append(new Bold()); rPr.Append(new DocumentFormat.OpenXml.Wordprocessing.FontSize() { Val = "24" }); DocumentFormat.OpenXml.Wordprocessing.Style style = new DocumentFormat.OpenXml.Wordprocessing.Style(); style.StyleId = "myHeading1"; style.Append(new Name() { Val = "My Heading 1" }); style.Append(new NextParagraphStyle() { Val = "Normal" }); style.Append(rPr); stylePart.Styles = new Styles(); stylePart.Styles.Append(style); stylePart.Styles.Save(); // Create the document structure and add some text. mainPart.Document = new DocumentFormat.OpenXml.Wordprocessing.Document(); Body body = mainPart.Document.AppendChild(new Body()); ParagraphProperties Normal_pPr = new ParagraphProperties(new ParagraphStyleId() { Val = "myText" }); foreach (DataRow row in dt.Rows) { Paragraph paraTo = body.AppendChild(new Paragraph()); Run runHead = paraTo.AppendChild(new Run()); RunProperties rpHead = new RunProperties(); rpHead.Append(new Bold()); runHead.Append(rpHead); runHead.AppendChild(new Text("R.Sundaram")); runHead.AppendChild(new Text("" + row["AName"])); runHead.AppendChild(new Break()); runHead.AppendChild(new Text("Chief Techno Economic Officer")); runHead.AppendChild(new Break()); runHead.AppendChild(new Break()); Run runTo = paraTo.AppendChild(new Run()); runTo.AppendChild(new Text("To")); runTo.AppendChild(new Break()); runTo.AppendChild(new Text("" + row["ContactName"])); runTo.AppendChild(new Break()); runTo.AppendChild(new Text("" + row["Address1"])); runTo.AppendChild(new Break()); runTo.AppendChild(new Text("" + row["Address2"])); Paragraph paraDate = body.AppendChild(new Paragraph()); ParagraphProperties ppDate = new ParagraphProperties(); Justification dateAlign = new Justification() { Val = JustificationValues.Right }; ppDate.Append(dateAlign); paraDate.Append(ppDate); Run runDate = paraDate.AppendChild(new Run()); runDate.AppendChild(new Text("Date : " + DateTime.Now.ToShortDateString())); Paragraph paraTitle = body.AppendChild(new Paragraph()); ParagraphProperties heading_pPr = new ParagraphProperties(); heading_pPr.ParagraphStyleId = new ParagraphStyleId() { Val = "myHeading1" }; Justification centerHeading = new Justification() { Val = JustificationValues.Center }; heading_pPr.Append(centerHeading); paraTitle.Append(heading_pPr); Run runTitle = paraTitle.AppendChild(new Run()); runTitle.AppendChild(new Text("SUB : TECHNOLOGY TRANSFER - IP Licensing, Collaboration")); Paragraph para = body.AppendChild(new Paragraph()); Run run = para.AppendChild(new Run()); run.AppendChild(new Text("Dear Sir / Madam,")); Paragraph para1 = body.AppendChild(new Paragraph(new ParagraphProperties(new SpacingBetweenLines() { After = "120" }))); Run run1 = para1.AppendChild(new Run()); run1.AppendChild(new Text("Greetings from IIT Madras!")); Paragraph para2 = body.AppendChild(new Paragraph(new ParagraphProperties(new SpacingBetweenLines() { After = "120" }))); Run run2 = para2.AppendChild(new Run()); Text para21Text = new Text() { Text = "Indian Institute of Technology Madras, is a leading Institute for Technology Research and Education. Enclosed is a brief flier on the institute. Further details are available at ", Space = SpaceProcessingModeValues.Preserve }; run2.AppendChild(para21Text); RunProperties rpBold = new RunProperties(); Bold bold = new Bold(); rpBold.Append(bold); Text para22Text = new Text() { Text = "https://www.iitm.ac.in" }; run2.AppendChild(rpBold); run2.AppendChild(para22Text); Paragraph para3 = body.AppendChild(new Paragraph(new ParagraphProperties(new SpacingBetweenLines() { After = "120" }))); Run run3 = para3.AppendChild(new Run()); run3.AppendChild(new Text("Researchers at the institute have developed following technology with potential application in your industry. Details are as follows:")); Paragraph para4 = body.AppendChild(new Paragraph(new ParagraphProperties(new Indentation() { Left = "500" }, new SpacingBetweenLines() { After = "120" }))); Run run4 = para4.AppendChild(new Run()); Text para41Text = new Text() { Text = "IP Type : ", Space = SpaceProcessingModeValues.Preserve }; RunProperties rpBold4 = new RunProperties(); rpBold4.Append(new Bold()); run4.AppendChild(rpBold4); rpBold4.Append(para41Text); Run run41 = para4.AppendChild(new Run()); Text para42Text = new Text() { Text = "" + row["PType"] }; run41.Append(para42Text); Paragraph para5 = body.AppendChild(new Paragraph(new ParagraphProperties(new Indentation() { Left = "500" }, new Justification() { Val = JustificationValues.Both }, new SpacingBetweenLines() { After = "120" }))); Run run5 = para5.AppendChild(new Run()); RunProperties rprun5 = new RunProperties(); rprun5.Append(new Bold()); run5.Append(rprun5); Text para51Text = new Text() { Text = "Title : ", Space = SpaceProcessingModeValues.Preserve }; run5.Append(para51Text); Run run51 = para5.AppendChild(new Run()); run51.AppendChild(new Text("" + row["Title"])); Paragraph para6 = body.AppendChild(new Paragraph(new ParagraphProperties(new Indentation() { Left = "500" }, new SpacingBetweenLines() { After = "120" }))); Run run6 = para6.AppendChild(new Run()); RunProperties rp6 = new RunProperties(); rp6.Append(new Bold()); run6.Append(rp6); Text para61Text = new Text() { Text = "Reference : ", Space = SpaceProcessingModeValues.Preserve }; run6.Append(para61Text); Run run61 = para6.AppendChild(new Run()); run61.Append(new Text("Application Number : " + row["ApplicationNo"] + " Filing Date : " + row["FilingDt"])); Paragraph para7 = body.AppendChild(new Paragraph(new ParagraphProperties(new Indentation() { Left = "500" }, new Justification() { Val = JustificationValues.Both }, new SpacingBetweenLines() { After = "120" }))); Run run7 = para7.AppendChild(new Run()); RunProperties rp7 = new RunProperties(); rp7.Append(new Bold()); run7.Append(rp7); Text para71Text = new Text() { Text = "Abstract : ", Space = SpaceProcessingModeValues.Preserve }; run7.Append(para71Text); Run run71 = para7.AppendChild(new Run()); run71.AppendChild(new Text("" + row["Specification"])); Paragraph para8 = body.AppendChild(new Paragraph(new ParagraphProperties(new SpacingBetweenLines() { After = "120" }))); Run run8 = para8.AppendChild(new Run()); Text para81Text = new Text() { Text = "We are writing to check your interest in the technology for Licensing, or further development. Other related technologies may be accessed at ", Space = SpaceProcessingModeValues.Preserve }; run8.Append(para81Text); Text para82Text = new Text() { Text = "https://icandsr.iitm.ac.in/IPR" }; RunProperties rp8 = new RunProperties(); rp8.Append(new Bold()); run8.Append(rp8); run8.Append(para82Text); Paragraph para10 = body.AppendChild(new Paragraph(new ParagraphProperties(new SpacingBetweenLines() { After = "120" }))); Run run10 = para10.AppendChild(new Run()); run10.AppendChild(new Text("We are looking forward to your interest and feedback.")); Paragraph para11 = body.AppendChild(new Paragraph()); Run run11 = para11.AppendChild(new Run()); run11.AppendChild(new Text("Yours sincerely,")); Paragraph para12 = body.AppendChild(new Paragraph()); ParagraphProperties Design_pPr = new ParagraphProperties(); Design_pPr.ParagraphStyleId = new ParagraphStyleId() { Val = "myHeading1" }; para12.Append(Design_pPr); Run run12 = para12.AppendChild(new Run()); run12.AppendChild(new Break()); run12.AppendChild(new Text("[CTEO]")); Paragraph tt1 = new Paragraph(new Run(new Break() { Type = BreakValues.Page })); body.Append(tt1); } //Paragraph p232= new Paragraph(); // ParagraphProperties pp220 = new ParagraphProperties(); //SectionProperties sp1 = new SectionProperties(); //.PrependChild<RunProperties>(rPrNormal); mainPart.Document.Save(); } System.Web.HttpContext.Current.Response.ContentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"; System.Web.HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=" + docFileName); mem.Seek(0, SeekOrigin.Begin); mem.WriteTo(System.Web.HttpContext.Current.Response.OutputStream); System.Web.HttpContext.Current.Response.Flush(); System.Web.HttpContext.Current.Response.End(); } }
/// <summary> /// Initialize new cell content object. /// </summary> /// <param name="textValue">The content of cell.</param> /// <returns>The TableCell object.</returns> public virtual TableCell NewTableCellData(string textValue, string width = "") { //create cell object and its properties TableCell tableCell = new TableCell(); TableCellProperties tableCellProperties = new TableCellProperties(); ConditionalFormatStyle conditionalFormatStyle = new ConditionalFormatStyle() { Val = "001000000000" }; HideMark hideMark = new HideMark(); tableCellProperties.Append(conditionalFormatStyle); // Set Width string specificWidth = "2394"; specificWidth = !string.IsNullOrEmpty(width) ? width : specificWidth; TableCellWidth tableCellWidth = new TableCellWidth() { Width = specificWidth, Type = TableWidthUnitValues.Dxa }; tableCellProperties.Append(tableCellWidth); tableCellProperties.Append(hideMark); //create paragrpah object and its properties Paragraph paragraph = new Paragraph() { RsidParagraphAddition = "004D1DA5", RsidRunAdditionDefault = "004D1DA5" }; ParagraphProperties paragraphProperties = new ParagraphProperties(); Justification justification = new Justification() { Val = JustificationValues.Center }; paragraphProperties.Append(justification); //create Run and Text Run run = new Run(); Text text = new Text(); //add content in Text text.Text = textValue; //add Text to Run run.Append(text); //add Run to paragraph paragraph.Append(paragraphProperties); paragraph.Append(run); //add Paragraph to cell tableCell.Append(tableCellProperties); tableCell.Append(paragraph); return(tableCell); }
Paragraph _build_title(string text) { var p_title = new Paragraph() { RsidParagraphMarkRevision = "00080948", RsidParagraphAddition = "000545D0", RsidParagraphProperties = "00080948", RsidRunAdditionDefault = "00080948" }; var pp_title = new ParagraphProperties() { SpacingBetweenLines = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }, Justification = new Justification() { Val = JustificationValues.Center } }; var pmrp_title = new ParagraphMarkRunProperties(); pmrp_title.Append(new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman", ComplexScript = "Times New Roman" }); pmrp_title.Append(new Bold()); pmrp_title.Append(new FontSize() { Val = "28" }); pp_title.Append(pmrp_title); var run_title = new Run() { RsidRunProperties = "00080948", RunProperties = new RunProperties() { RunFonts = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman", ComplexScript = "Times New Roman" }, Bold = new Bold(), FontSize = new FontSize() { Val = "28" } } }; run_title.Append(new Text() { Text = text }); p_title.Append(pp_title); p_title.Append(run_title); return(p_title); }
// Generates content of footnotesPart1. private void GenerateFootnotesPart1Content(FootnotesPart footnotesPart1) { Footnotes footnotes1 = new Footnotes() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } }; footnotes1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"); footnotes1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); footnotes1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); footnotes1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); footnotes1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); footnotes1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); footnotes1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"); footnotes1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"); footnotes1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); footnotes1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); footnotes1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); footnotes1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"); footnotes1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk"); footnotes1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml"); footnotes1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"); Footnote footnote1 = new Footnote() { Type = FootnoteEndnoteValues.Separator, Id = -1 }; Paragraph paragraph57 = new Paragraph() { RsidParagraphAddition = "00571FC0", RsidRunAdditionDefault = "00571FC0" }; ParagraphProperties paragraphProperties55 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines45 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; paragraphProperties55.Append(spacingBetweenLines45); Run run61 = new Run(); SeparatorMark separatorMark2 = new SeparatorMark(); run61.Append(separatorMark2); paragraph57.Append(paragraphProperties55); paragraph57.Append(run61); footnote1.Append(paragraph57); Footnote footnote2 = new Footnote() { Type = FootnoteEndnoteValues.ContinuationSeparator, Id = 0 }; Paragraph paragraph58 = new Paragraph() { RsidParagraphAddition = "00571FC0", RsidRunAdditionDefault = "00571FC0" }; ParagraphProperties paragraphProperties56 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines46 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; paragraphProperties56.Append(spacingBetweenLines46); Run run62 = new Run(); ContinuationSeparatorMark continuationSeparatorMark2 = new ContinuationSeparatorMark(); run62.Append(continuationSeparatorMark2); paragraph58.Append(paragraphProperties56); paragraph58.Append(run62); footnote2.Append(paragraph58); footnotes1.Append(footnote1); footnotes1.Append(footnote2); footnotesPart1.Footnotes = footnotes1; }
//..................................................................... /// <summary> /// /// </summary> /// <returns></returns> private Paragraph MakeParaImage02( ) { Paragraph paragraph6 = new Paragraph( ) { RsidParagraphAddition = "00F8033B", RsidRunAdditionDefault = "00F8033B" }; ParagraphProperties paragraphProperties6 = new ParagraphProperties( ); ParagraphMarkRunProperties paragraphMarkRunProperties6 = new ParagraphMarkRunProperties( ); RunFonts runFonts9 = new RunFonts( ) { Hint = FontTypeHintValues.EastAsia }; paragraphMarkRunProperties6.Append(runFonts9); paragraphProperties6.Append(paragraphMarkRunProperties6); Run run4 = new Run( ); RunProperties runProperties4 = new RunProperties( ); RunFonts runFonts10 = new RunFonts( ) { Hint = FontTypeHintValues.EastAsia }; NoProof noProof2 = new NoProof( ); runProperties4.Append(runFonts10); runProperties4.Append(noProof2); Drawing drawing2 = new Drawing( ); Wp.Inline inline2 = new Wp.Inline( ) { DistanceFromTop = ( UInt32Value )0U, DistanceFromBottom = ( UInt32Value )0U, DistanceFromLeft = ( UInt32Value )0U, DistanceFromRight = ( UInt32Value )0U }; Wp.Extent extent2 = new Wp.Extent( ) { Cx = 2534004L, Cy = 800212L }; Wp.EffectExtent effectExtent2 = new Wp.EffectExtent( ) { LeftEdge = 0L, TopEdge = 0L, RightEdge = 0L, BottomEdge = 0L }; Wp.DocProperties docProperties2 = new Wp.DocProperties( ) { Id = ( UInt32Value )3U, Name = "图片 3" }; Wp.NonVisualGraphicFrameDrawingProperties nonVisualGraphicFrameDrawingProperties2 = new Wp.NonVisualGraphicFrameDrawingProperties( ); A.GraphicFrameLocks graphicFrameLocks2 = new A.GraphicFrameLocks( ) { NoChangeAspect = true }; graphicFrameLocks2.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); nonVisualGraphicFrameDrawingProperties2.Append(graphicFrameLocks2); A.Graphic graphic2 = new A.Graphic( ); graphic2.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); A.GraphicData graphicData2 = new A.GraphicData( ) { Uri = "http://schemas.openxmlformats.org/drawingml/2006/picture" }; Pic.Picture picture2 = new Pic.Picture( ); picture2.AddNamespaceDeclaration("pic", "http://schemas.openxmlformats.org/drawingml/2006/picture"); Pic.NonVisualPictureProperties nonVisualPictureProperties2 = new Pic.NonVisualPictureProperties( ); Pic.NonVisualDrawingProperties nonVisualDrawingProperties2 = new Pic.NonVisualDrawingProperties( ) { Id = ( UInt32Value )0U, Name = "test-pic2.png" }; Pic.NonVisualPictureDrawingProperties nonVisualPictureDrawingProperties2 = new Pic.NonVisualPictureDrawingProperties( ); nonVisualPictureProperties2.Append(nonVisualDrawingProperties2); nonVisualPictureProperties2.Append(nonVisualPictureDrawingProperties2); Pic.BlipFill blipFill2 = new Pic.BlipFill( ); A.Blip blip2 = new A.Blip( ) { Embed = "rId6" }; A.BlipExtensionList blipExtensionList2 = new A.BlipExtensionList( ); A.BlipExtension blipExtension2 = new A.BlipExtension( ) { Uri = "{28A0092B-C50C-407E-A947-70E740481C1C}" }; A14.UseLocalDpi useLocalDpi2 = new A14.UseLocalDpi( ) { Val = false }; useLocalDpi2.AddNamespaceDeclaration("a14", "http://schemas.microsoft.com/office/drawing/2010/main"); blipExtension2.Append(useLocalDpi2); blipExtensionList2.Append(blipExtension2); blip2.Append(blipExtensionList2); A.Stretch stretch2 = new A.Stretch( ); A.FillRectangle fillRectangle2 = new A.FillRectangle( ); stretch2.Append(fillRectangle2); blipFill2.Append(blip2); blipFill2.Append(stretch2); Pic.ShapeProperties shapeProperties2 = new Pic.ShapeProperties( ); A.Transform2D transform2D2 = new A.Transform2D( ); A.Offset offset2 = new A.Offset( ) { X = 0L, Y = 0L }; A.Extents extents2 = new A.Extents( ) { Cx = 2534004L, Cy = 800212L }; transform2D2.Append(offset2); transform2D2.Append(extents2); A.PresetGeometry presetGeometry2 = new A.PresetGeometry( ) { Preset = A.ShapeTypeValues.Rectangle }; A.AdjustValueList adjustValueList2 = new A.AdjustValueList( ); presetGeometry2.Append(adjustValueList2); shapeProperties2.Append(transform2D2); shapeProperties2.Append(presetGeometry2); picture2.Append(nonVisualPictureProperties2); picture2.Append(blipFill2); picture2.Append(shapeProperties2); graphicData2.Append(picture2); graphic2.Append(graphicData2); inline2.Append(extent2); inline2.Append(effectExtent2); inline2.Append(docProperties2); inline2.Append(nonVisualGraphicFrameDrawingProperties2); inline2.Append(graphic2); drawing2.Append(inline2); run4.Append(runProperties4); run4.Append(drawing2); paragraph6.Append(paragraphProperties6); paragraph6.Append(run4); return(paragraph6); }
// Generates content of mainDocumentPart1. private void GenerateMainDocumentPart1Content(MainDocumentPart mainDocumentPart1, objPatientContract obj) { Document document1 = new Document() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } }; document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"); document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"); document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"); document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"); document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk"); document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml"); document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"); Body body1 = new Body(); Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00900A10", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties1 = new ParagraphProperties(); WidowControl widowControl1 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE1 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN1 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent1 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties(); RunFonts runFonts1 = new RunFonts() { Ascii = "New Roman", HighAnsi = "New Roman", EastAsia = "New Roman", ComplexScript = "Times New Roman" }; FontSize fontSize1 = new FontSize() { Val = "24" }; FontSizeComplexScript fontSizeComplexScript1 = new FontSizeComplexScript() { Val = "24" }; paragraphMarkRunProperties1.Append(runFonts1); paragraphMarkRunProperties1.Append(fontSize1); paragraphMarkRunProperties1.Append(fontSizeComplexScript1); paragraphProperties1.Append(widowControl1); paragraphProperties1.Append(autoSpaceDE1); paragraphProperties1.Append(autoSpaceDN1); paragraphProperties1.Append(adjustRightIndent1); paragraphProperties1.Append(spacingBetweenLines1); paragraphProperties1.Append(paragraphMarkRunProperties1); paragraph1.Append(paragraphProperties1); Paragraph paragraph2 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00900A10", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties2 = new ParagraphProperties(); WidowControl widowControl2 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE2 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN2 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent2 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines2 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties(); RunFonts runFonts2 = new RunFonts() { Ascii = "New Roman", HighAnsi = "New Roman", EastAsia = "New Roman", ComplexScript = "Times New Roman" }; FontSize fontSize2 = new FontSize() { Val = "24" }; FontSizeComplexScript fontSizeComplexScript2 = new FontSizeComplexScript() { Val = "24" }; paragraphMarkRunProperties2.Append(runFonts2); paragraphMarkRunProperties2.Append(fontSize2); paragraphMarkRunProperties2.Append(fontSizeComplexScript2); paragraphProperties2.Append(widowControl2); paragraphProperties2.Append(autoSpaceDE2); paragraphProperties2.Append(autoSpaceDN2); paragraphProperties2.Append(adjustRightIndent2); paragraphProperties2.Append(spacingBetweenLines2); paragraphProperties2.Append(paragraphMarkRunProperties2); paragraph2.Append(paragraphProperties2); Paragraph paragraph3 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00900A10", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties3 = new ParagraphProperties(); WidowControl widowControl3 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE3 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN3 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent3 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines3 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; Justification justification1 = new Justification() { Val = JustificationValues.Center }; ParagraphMarkRunProperties paragraphMarkRunProperties3 = new ParagraphMarkRunProperties(); RunFonts runFonts3 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize3 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript3 = new FontSizeComplexScript() { Val = "20" }; paragraphMarkRunProperties3.Append(runFonts3); paragraphMarkRunProperties3.Append(fontSize3); paragraphMarkRunProperties3.Append(fontSizeComplexScript3); paragraphProperties3.Append(widowControl3); paragraphProperties3.Append(autoSpaceDE3); paragraphProperties3.Append(autoSpaceDN3); paragraphProperties3.Append(adjustRightIndent3); paragraphProperties3.Append(spacingBetweenLines3); paragraphProperties3.Append(justification1); paragraphProperties3.Append(paragraphMarkRunProperties3); Run run1 = new Run(); RunProperties runProperties1 = new RunProperties(); RunFonts runFonts4 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize4 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript4 = new FontSizeComplexScript() { Val = "20" }; runProperties1.Append(runFonts4); runProperties1.Append(fontSize4); runProperties1.Append(fontSizeComplexScript4); Text text1 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text1.Text = " "; run1.Append(runProperties1); run1.Append(text1); Run run2 = new Run() { RsidRunAddition = "00D60978" }; RunProperties runProperties2 = new RunProperties(); RunFonts runFonts5 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold1 = new Bold(); BoldComplexScript boldComplexScript1 = new BoldComplexScript(); FontSize fontSize5 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript5 = new FontSizeComplexScript() { Val = "20" }; runProperties2.Append(runFonts5); runProperties2.Append(bold1); runProperties2.Append(boldComplexScript1); runProperties2.Append(fontSize5); runProperties2.Append(fontSizeComplexScript5); Text text2 = new Text(); text2.Text = "МИКРОБИОЛОГИЧЕСКОЕ ИССЛЕДОВАНИЕ"; run2.Append(runProperties2); run2.Append(text2); Run run3 = new Run(); RunProperties runProperties3 = new RunProperties(); RunFonts runFonts6 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold2 = new Bold(); BoldComplexScript boldComplexScript2 = new BoldComplexScript(); FontSize fontSize6 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript6 = new FontSizeComplexScript() { Val = "20" }; runProperties3.Append(runFonts6); runProperties3.Append(bold2); runProperties3.Append(boldComplexScript2); runProperties3.Append(fontSize6); runProperties3.Append(fontSizeComplexScript6); Text text3 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text3.Text = " № "; run3.Append(runProperties3); run3.Append(text3); Run run4 = new Run() { RsidRunAddition = "00D60978" }; RunProperties runProperties4 = new RunProperties(); RunFonts runFonts7 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold3 = new Bold(); BoldComplexScript boldComplexScript3 = new BoldComplexScript(); FontSize fontSize7 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript7 = new FontSizeComplexScript() { Val = "20" }; runProperties4.Append(runFonts7); runProperties4.Append(bold3); runProperties4.Append(boldComplexScript3); runProperties4.Append(fontSize7); runProperties4.Append(fontSizeComplexScript7); Text text4 = new Text(); text4.Text = obj.SampleID ; run4.Append(runProperties4); run4.Append(text4); paragraph3.Append(paragraphProperties3); paragraph3.Append(run1); paragraph3.Append(run2); paragraph3.Append(run3); paragraph3.Append(run4); Paragraph paragraph4 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00900A10", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties4 = new ParagraphProperties(); WidowControl widowControl4 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE4 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN4 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent4 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines4 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; Justification justification2 = new Justification() { Val = JustificationValues.Center }; ParagraphMarkRunProperties paragraphMarkRunProperties4 = new ParagraphMarkRunProperties(); RunFonts runFonts8 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize8 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript8 = new FontSizeComplexScript() { Val = "20" }; paragraphMarkRunProperties4.Append(runFonts8); paragraphMarkRunProperties4.Append(fontSize8); paragraphMarkRunProperties4.Append(fontSizeComplexScript8); paragraphProperties4.Append(widowControl4); paragraphProperties4.Append(autoSpaceDE4); paragraphProperties4.Append(autoSpaceDN4); paragraphProperties4.Append(adjustRightIndent4); paragraphProperties4.Append(spacingBetweenLines4); paragraphProperties4.Append(justification2); paragraphProperties4.Append(paragraphMarkRunProperties4); paragraph4.Append(paragraphProperties4); Table table1 = new Table(); TableProperties tableProperties1 = new TableProperties(); TableStyle tableStyle1 = new TableStyle() { Val = "a3" }; TableWidth tableWidth1 = new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto }; TableBorders tableBorders1 = new TableBorders(); TopBorder topBorder1 = new TopBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; tableBorders1.Append(topBorder1); tableBorders1.Append(leftBorder1); tableBorders1.Append(bottomBorder1); tableBorders1.Append(rightBorder1); tableBorders1.Append(insideHorizontalBorder1); tableBorders1.Append(insideVerticalBorder1); TableLayout tableLayout1 = new TableLayout() { Type = TableLayoutValues.Fixed }; TableLook tableLook1 = new TableLook() { Val = "0000", FirstRow = false, LastRow = false, FirstColumn = false, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = false }; tableProperties1.Append(tableStyle1); tableProperties1.Append(tableWidth1); tableProperties1.Append(tableBorders1); tableProperties1.Append(tableLayout1); tableProperties1.Append(tableLook1); TableGrid tableGrid1 = new TableGrid(); GridColumn gridColumn1 = new GridColumn() { Width = "3500" }; GridColumn gridColumn2 = new GridColumn() { Width = "5500" }; tableGrid1.Append(gridColumn1); tableGrid1.Append(gridColumn2); TableRow tableRow1 = new TableRow() { RsidTableRowAddition = "00900A10", RsidTableRowProperties = "00D60978" }; TableRowProperties tableRowProperties1 = new TableRowProperties(); TableRowHeight tableRowHeight1 = new TableRowHeight() { Val = (UInt32Value)262U }; tableRowProperties1.Append(tableRowHeight1); TableCell tableCell1 = new TableCell(); TableCellProperties tableCellProperties1 = new TableCellProperties(); TableCellWidth tableCellWidth1 = new TableCellWidth() { Width = "3500", Type = TableWidthUnitValues.Dxa }; tableCellProperties1.Append(tableCellWidth1); Paragraph paragraph5 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties5 = new ParagraphProperties(); WidowControl widowControl5 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE5 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN5 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent5 = new AdjustRightIndent() { Val = false }; ParagraphMarkRunProperties paragraphMarkRunProperties5 = new ParagraphMarkRunProperties(); RunFonts runFonts9 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize9 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript9 = new FontSizeComplexScript() { Val = "20" }; paragraphMarkRunProperties5.Append(runFonts9); paragraphMarkRunProperties5.Append(fontSize9); paragraphMarkRunProperties5.Append(fontSizeComplexScript9); paragraphProperties5.Append(widowControl5); paragraphProperties5.Append(autoSpaceDE5); paragraphProperties5.Append(autoSpaceDN5); paragraphProperties5.Append(adjustRightIndent5); paragraphProperties5.Append(paragraphMarkRunProperties5); Run run5 = new Run(); RunProperties runProperties5 = new RunProperties(); RunFonts runFonts10 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold4 = new Bold(); BoldComplexScript boldComplexScript4 = new BoldComplexScript(); FontSize fontSize10 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript10 = new FontSizeComplexScript() { Val = "20" }; runProperties5.Append(runFonts10); runProperties5.Append(bold4); runProperties5.Append(boldComplexScript4); runProperties5.Append(fontSize10); runProperties5.Append(fontSizeComplexScript10); Text text5 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text5.Text = "Лечебное учреждение: "; run5.Append(runProperties5); run5.Append(text5); paragraph5.Append(paragraphProperties5); paragraph5.Append(run5); tableCell1.Append(tableCellProperties1); tableCell1.Append(paragraph5); TableCell tableCell2 = new TableCell(); TableCellProperties tableCellProperties2 = new TableCellProperties(); TableCellWidth tableCellWidth2 = new TableCellWidth() { Width = "5500", Type = TableWidthUnitValues.Dxa }; tableCellProperties2.Append(tableCellWidth2); Paragraph paragraph6 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties6 = new ParagraphProperties(); WidowControl widowControl6 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE6 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN6 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent6 = new AdjustRightIndent() { Val = false }; ParagraphMarkRunProperties paragraphMarkRunProperties6 = new ParagraphMarkRunProperties(); RunFonts runFonts11 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize11 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript11 = new FontSizeComplexScript() { Val = "20" }; paragraphMarkRunProperties6.Append(runFonts11); paragraphMarkRunProperties6.Append(fontSize11); paragraphMarkRunProperties6.Append(fontSizeComplexScript11); paragraphProperties6.Append(widowControl6); paragraphProperties6.Append(autoSpaceDE6); paragraphProperties6.Append(autoSpaceDN6); paragraphProperties6.Append(adjustRightIndent6); paragraphProperties6.Append(paragraphMarkRunProperties6); Run run6 = new Run(); RunProperties runProperties6 = new RunProperties(); RunFonts runFonts12 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize12 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript12 = new FontSizeComplexScript() { Val = "20" }; runProperties6.Append(runFonts12); runProperties6.Append(fontSize12); runProperties6.Append(fontSizeComplexScript12); Text text6 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text6.Text = obj.Clinic ; run6.Append(runProperties6); run6.Append(text6); paragraph6.Append(paragraphProperties6); paragraph6.Append(run6); tableCell2.Append(tableCellProperties2); tableCell2.Append(paragraph6); tableRow1.Append(tableRowProperties1); tableRow1.Append(tableCell1); tableRow1.Append(tableCell2); TableRow tableRow2 = new TableRow() { RsidTableRowAddition = "00900A10", RsidTableRowProperties = "00D60978" }; TableRowProperties tableRowProperties2 = new TableRowProperties(); TableRowHeight tableRowHeight2 = new TableRowHeight() { Val = (UInt32Value)262U }; tableRowProperties2.Append(tableRowHeight2); TableCell tableCell3 = new TableCell(); TableCellProperties tableCellProperties3 = new TableCellProperties(); TableCellWidth tableCellWidth3 = new TableCellWidth() { Width = "3500", Type = TableWidthUnitValues.Dxa }; tableCellProperties3.Append(tableCellWidth3); Paragraph paragraph7 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties7 = new ParagraphProperties(); WidowControl widowControl7 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE7 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN7 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent7 = new AdjustRightIndent() { Val = false }; ParagraphMarkRunProperties paragraphMarkRunProperties7 = new ParagraphMarkRunProperties(); RunFonts runFonts13 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize13 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript13 = new FontSizeComplexScript() { Val = "20" }; paragraphMarkRunProperties7.Append(runFonts13); paragraphMarkRunProperties7.Append(fontSize13); paragraphMarkRunProperties7.Append(fontSizeComplexScript13); paragraphProperties7.Append(widowControl7); paragraphProperties7.Append(autoSpaceDE7); paragraphProperties7.Append(autoSpaceDN7); paragraphProperties7.Append(adjustRightIndent7); paragraphProperties7.Append(paragraphMarkRunProperties7); Run run7 = new Run(); RunProperties runProperties7 = new RunProperties(); RunFonts runFonts14 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold5 = new Bold(); BoldComplexScript boldComplexScript5 = new BoldComplexScript(); FontSize fontSize14 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript14 = new FontSizeComplexScript() { Val = "20" }; runProperties7.Append(runFonts14); runProperties7.Append(bold5); runProperties7.Append(boldComplexScript5); runProperties7.Append(fontSize14); runProperties7.Append(fontSizeComplexScript14); Text text7 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text7.Text = "Врач: "; run7.Append(runProperties7); run7.Append(text7); paragraph7.Append(paragraphProperties7); paragraph7.Append(run7); tableCell3.Append(tableCellProperties3); tableCell3.Append(paragraph7); TableCell tableCell4 = new TableCell(); TableCellProperties tableCellProperties4 = new TableCellProperties(); TableCellWidth tableCellWidth4 = new TableCellWidth() { Width = "5500", Type = TableWidthUnitValues.Dxa }; tableCellProperties4.Append(tableCellWidth4); Paragraph paragraph8 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties8 = new ParagraphProperties(); WidowControl widowControl8 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE8 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN8 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent8 = new AdjustRightIndent() { Val = false }; ParagraphMarkRunProperties paragraphMarkRunProperties8 = new ParagraphMarkRunProperties(); RunFonts runFonts15 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize15 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript15 = new FontSizeComplexScript() { Val = "20" }; paragraphMarkRunProperties8.Append(runFonts15); paragraphMarkRunProperties8.Append(fontSize15); paragraphMarkRunProperties8.Append(fontSizeComplexScript15); paragraphProperties8.Append(widowControl8); paragraphProperties8.Append(autoSpaceDE8); paragraphProperties8.Append(autoSpaceDN8); paragraphProperties8.Append(adjustRightIndent8); paragraphProperties8.Append(paragraphMarkRunProperties8); ProofError proofError1 = new ProofError() { Type = ProofingErrorValues.SpellStart }; Run run8 = new Run(); RunProperties runProperties8 = new RunProperties(); RunFonts runFonts16 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize16 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript16 = new FontSizeComplexScript() { Val = "20" }; runProperties8.Append(runFonts16); runProperties8.Append(fontSize16); runProperties8.Append(fontSizeComplexScript16); Text text8 = new Text(); text8.Text = obj.DoctorFIO ; run8.Append(runProperties8); run8.Append(text8); ProofError proofError2 = new ProofError() { Type = ProofingErrorValues.SpellEnd }; Run run9 = new Run(); RunProperties runProperties9 = new RunProperties(); RunFonts runFonts17 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize17 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript17 = new FontSizeComplexScript() { Val = "20" }; runProperties9.Append(runFonts17); runProperties9.Append(fontSize17); runProperties9.Append(fontSizeComplexScript17); Text text9 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text9.Text = ""; run9.Append(runProperties9); run9.Append(text9); paragraph8.Append(paragraphProperties8); paragraph8.Append(proofError1); paragraph8.Append(run8); paragraph8.Append(proofError2); paragraph8.Append(run9); tableCell4.Append(tableCellProperties4); tableCell4.Append(paragraph8); BookmarkStart bookmarkStart1 = new BookmarkStart() { Name = "_GoBack", Id = "0" }; BookmarkEnd bookmarkEnd1 = new BookmarkEnd() { Id = "0" }; tableRow2.Append(tableRowProperties2); tableRow2.Append(tableCell3); tableRow2.Append(tableCell4); tableRow2.Append(bookmarkStart1); tableRow2.Append(bookmarkEnd1); TableRow tableRow3 = new TableRow() { RsidTableRowAddition = "00900A10", RsidTableRowProperties = "00D60978" }; TableRowProperties tableRowProperties3 = new TableRowProperties(); TableRowHeight tableRowHeight3 = new TableRowHeight() { Val = (UInt32Value)262U }; tableRowProperties3.Append(tableRowHeight3); TableCell tableCell5 = new TableCell(); TableCellProperties tableCellProperties5 = new TableCellProperties(); TableCellWidth tableCellWidth5 = new TableCellWidth() { Width = "3500", Type = TableWidthUnitValues.Dxa }; tableCellProperties5.Append(tableCellWidth5); Paragraph paragraph9 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties9 = new ParagraphProperties(); WidowControl widowControl9 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE9 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN9 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent9 = new AdjustRightIndent() { Val = false }; ParagraphMarkRunProperties paragraphMarkRunProperties9 = new ParagraphMarkRunProperties(); RunFonts runFonts18 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize18 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript18 = new FontSizeComplexScript() { Val = "20" }; paragraphMarkRunProperties9.Append(runFonts18); paragraphMarkRunProperties9.Append(fontSize18); paragraphMarkRunProperties9.Append(fontSizeComplexScript18); paragraphProperties9.Append(widowControl9); paragraphProperties9.Append(autoSpaceDE9); paragraphProperties9.Append(autoSpaceDN9); paragraphProperties9.Append(adjustRightIndent9); paragraphProperties9.Append(paragraphMarkRunProperties9); Run run10 = new Run(); RunProperties runProperties10 = new RunProperties(); RunFonts runFonts19 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold6 = new Bold(); BoldComplexScript boldComplexScript6 = new BoldComplexScript(); FontSize fontSize19 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript19 = new FontSizeComplexScript() { Val = "20" }; runProperties10.Append(runFonts19); runProperties10.Append(bold6); runProperties10.Append(boldComplexScript6); runProperties10.Append(fontSize19); runProperties10.Append(fontSizeComplexScript19); Text text10 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text10.Text = "Пациент: "; run10.Append(runProperties10); run10.Append(text10); paragraph9.Append(paragraphProperties9); paragraph9.Append(run10); tableCell5.Append(tableCellProperties5); tableCell5.Append(paragraph9); TableCell tableCell6 = new TableCell(); TableCellProperties tableCellProperties6 = new TableCellProperties(); TableCellWidth tableCellWidth6 = new TableCellWidth() { Width = "5500", Type = TableWidthUnitValues.Dxa }; tableCellProperties6.Append(tableCellWidth6); Paragraph paragraph10 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties10 = new ParagraphProperties(); WidowControl widowControl10 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE10 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN10 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent10 = new AdjustRightIndent() { Val = false }; ParagraphMarkRunProperties paragraphMarkRunProperties10 = new ParagraphMarkRunProperties(); RunFonts runFonts20 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize20 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript20 = new FontSizeComplexScript() { Val = "20" }; paragraphMarkRunProperties10.Append(runFonts20); paragraphMarkRunProperties10.Append(fontSize20); paragraphMarkRunProperties10.Append(fontSizeComplexScript20); paragraphProperties10.Append(widowControl10); paragraphProperties10.Append(autoSpaceDE10); paragraphProperties10.Append(autoSpaceDN10); paragraphProperties10.Append(adjustRightIndent10); paragraphProperties10.Append(paragraphMarkRunProperties10); Run run11 = new Run(); RunProperties runProperties11 = new RunProperties(); RunFonts runFonts21 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize21 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript21 = new FontSizeComplexScript() { Val = "20" }; runProperties11.Append(runFonts21); runProperties11.Append(fontSize21); runProperties11.Append(fontSizeComplexScript21); Text text11 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text11.Text = obj.PatientFIO ; run11.Append(runProperties11); run11.Append(text11); paragraph10.Append(paragraphProperties10); paragraph10.Append(run11); tableCell6.Append(tableCellProperties6); tableCell6.Append(paragraph10); tableRow3.Append(tableRowProperties3); tableRow3.Append(tableCell5); tableRow3.Append(tableCell6); TableRow tableRow4 = new TableRow() { RsidTableRowAddition = "00900A10", RsidTableRowProperties = "00D60978" }; TableRowProperties tableRowProperties4 = new TableRowProperties(); TableRowHeight tableRowHeight4 = new TableRowHeight() { Val = (UInt32Value)262U }; tableRowProperties4.Append(tableRowHeight4); TableCell tableCell7 = new TableCell(); TableCellProperties tableCellProperties7 = new TableCellProperties(); TableCellWidth tableCellWidth7 = new TableCellWidth() { Width = "3500", Type = TableWidthUnitValues.Dxa }; tableCellProperties7.Append(tableCellWidth7); Paragraph paragraph11 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties11 = new ParagraphProperties(); WidowControl widowControl11 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE11 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN11 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent11 = new AdjustRightIndent() { Val = false }; ParagraphMarkRunProperties paragraphMarkRunProperties11 = new ParagraphMarkRunProperties(); RunFonts runFonts22 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize22 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript22 = new FontSizeComplexScript() { Val = "20" }; paragraphMarkRunProperties11.Append(runFonts22); paragraphMarkRunProperties11.Append(fontSize22); paragraphMarkRunProperties11.Append(fontSizeComplexScript22); paragraphProperties11.Append(widowControl11); paragraphProperties11.Append(autoSpaceDE11); paragraphProperties11.Append(autoSpaceDN11); paragraphProperties11.Append(adjustRightIndent11); paragraphProperties11.Append(paragraphMarkRunProperties11); Run run12 = new Run(); RunProperties runProperties12 = new RunProperties(); RunFonts runFonts23 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold7 = new Bold(); BoldComplexScript boldComplexScript7 = new BoldComplexScript(); FontSize fontSize23 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript23 = new FontSizeComplexScript() { Val = "20" }; runProperties12.Append(runFonts23); runProperties12.Append(bold7); runProperties12.Append(boldComplexScript7); runProperties12.Append(fontSize23); runProperties12.Append(fontSizeComplexScript23); Text text12 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text12.Text = "Дата рождения: "; run12.Append(runProperties12); run12.Append(text12); paragraph11.Append(paragraphProperties11); paragraph11.Append(run12); tableCell7.Append(tableCellProperties7); tableCell7.Append(paragraph11); TableCell tableCell8 = new TableCell(); TableCellProperties tableCellProperties8 = new TableCellProperties(); TableCellWidth tableCellWidth8 = new TableCellWidth() { Width = "5500", Type = TableWidthUnitValues.Dxa }; tableCellProperties8.Append(tableCellWidth8); Paragraph paragraph12 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties12 = new ParagraphProperties(); WidowControl widowControl12 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE12 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN12 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent12 = new AdjustRightIndent() { Val = false }; ParagraphMarkRunProperties paragraphMarkRunProperties12 = new ParagraphMarkRunProperties(); RunFonts runFonts24 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize24 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript24 = new FontSizeComplexScript() { Val = "20" }; paragraphMarkRunProperties12.Append(runFonts24); paragraphMarkRunProperties12.Append(fontSize24); paragraphMarkRunProperties12.Append(fontSizeComplexScript24); paragraphProperties12.Append(widowControl12); paragraphProperties12.Append(autoSpaceDE12); paragraphProperties12.Append(autoSpaceDN12); paragraphProperties12.Append(adjustRightIndent12); paragraphProperties12.Append(paragraphMarkRunProperties12); Run run13 = new Run(); RunProperties runProperties13 = new RunProperties(); RunFonts runFonts25 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize25 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript25 = new FontSizeComplexScript() { Val = "20" }; runProperties13.Append(runFonts25); runProperties13.Append(fontSize25); runProperties13.Append(fontSizeComplexScript25); Text text13 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text13.Text = obj.BirthDate ; run13.Append(runProperties13); run13.Append(text13); paragraph12.Append(paragraphProperties12); paragraph12.Append(run13); tableCell8.Append(tableCellProperties8); tableCell8.Append(paragraph12); tableRow4.Append(tableRowProperties4); tableRow4.Append(tableCell7); tableRow4.Append(tableCell8); TableRow tableRow5 = new TableRow() { RsidTableRowAddition = "00900A10", RsidTableRowProperties = "00D60978" }; TableRowProperties tableRowProperties5 = new TableRowProperties(); TableRowHeight tableRowHeight5 = new TableRowHeight() { Val = (UInt32Value)262U }; tableRowProperties5.Append(tableRowHeight5); TableCell tableCell9 = new TableCell(); TableCellProperties tableCellProperties9 = new TableCellProperties(); TableCellWidth tableCellWidth9 = new TableCellWidth() { Width = "3500", Type = TableWidthUnitValues.Dxa }; tableCellProperties9.Append(tableCellWidth9); Paragraph paragraph13 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties13 = new ParagraphProperties(); WidowControl widowControl13 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE13 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN13 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent13 = new AdjustRightIndent() { Val = false }; ParagraphMarkRunProperties paragraphMarkRunProperties13 = new ParagraphMarkRunProperties(); RunFonts runFonts26 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize26 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript26 = new FontSizeComplexScript() { Val = "20" }; paragraphMarkRunProperties13.Append(runFonts26); paragraphMarkRunProperties13.Append(fontSize26); paragraphMarkRunProperties13.Append(fontSizeComplexScript26); paragraphProperties13.Append(widowControl13); paragraphProperties13.Append(autoSpaceDE13); paragraphProperties13.Append(autoSpaceDN13); paragraphProperties13.Append(adjustRightIndent13); paragraphProperties13.Append(paragraphMarkRunProperties13); Run run14 = new Run(); RunProperties runProperties14 = new RunProperties(); RunFonts runFonts27 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold8 = new Bold(); BoldComplexScript boldComplexScript8 = new BoldComplexScript(); FontSize fontSize27 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript27 = new FontSizeComplexScript() { Val = "20" }; runProperties14.Append(runFonts27); runProperties14.Append(bold8); runProperties14.Append(boldComplexScript8); runProperties14.Append(fontSize27); runProperties14.Append(fontSizeComplexScript27); Text text14 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text14.Text = "Клинический материал: "; run14.Append(runProperties14); run14.Append(text14); paragraph13.Append(paragraphProperties13); paragraph13.Append(run14); tableCell9.Append(tableCellProperties9); tableCell9.Append(paragraph13); TableCell tableCell10 = new TableCell(); TableCellProperties tableCellProperties10 = new TableCellProperties(); TableCellWidth tableCellWidth10 = new TableCellWidth() { Width = "5500", Type = TableWidthUnitValues.Dxa }; tableCellProperties10.Append(tableCellWidth10); Paragraph paragraph14 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties14 = new ParagraphProperties(); WidowControl widowControl14 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE14 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN14 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent14 = new AdjustRightIndent() { Val = false }; ParagraphMarkRunProperties paragraphMarkRunProperties14 = new ParagraphMarkRunProperties(); RunFonts runFonts28 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize28 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript28 = new FontSizeComplexScript() { Val = "20" }; paragraphMarkRunProperties14.Append(runFonts28); paragraphMarkRunProperties14.Append(fontSize28); paragraphMarkRunProperties14.Append(fontSizeComplexScript28); paragraphProperties14.Append(widowControl14); paragraphProperties14.Append(autoSpaceDE14); paragraphProperties14.Append(autoSpaceDN14); paragraphProperties14.Append(adjustRightIndent14); paragraphProperties14.Append(paragraphMarkRunProperties14); Run run15 = new Run(); RunProperties runProperties15 = new RunProperties(); RunFonts runFonts29 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize29 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript29 = new FontSizeComplexScript() { Val = "20" }; runProperties15.Append(runFonts29); runProperties15.Append(fontSize29); runProperties15.Append(fontSizeComplexScript29); Text text15 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text15.Text = obj.ClinicMaterial ; run15.Append(runProperties15); run15.Append(text15); paragraph14.Append(paragraphProperties14); paragraph14.Append(run15); tableCell10.Append(tableCellProperties10); tableCell10.Append(paragraph14); tableRow5.Append(tableRowProperties5); tableRow5.Append(tableCell9); tableRow5.Append(tableCell10); TableRow tableRow6 = new TableRow() { RsidTableRowAddition = "00900A10", RsidTableRowProperties = "00D60978" }; TableRowProperties tableRowProperties6 = new TableRowProperties(); TableRowHeight tableRowHeight6 = new TableRowHeight() { Val = (UInt32Value)262U }; tableRowProperties6.Append(tableRowHeight6); TableCell tableCell11 = new TableCell(); TableCellProperties tableCellProperties11 = new TableCellProperties(); TableCellWidth tableCellWidth11 = new TableCellWidth() { Width = "3500", Type = TableWidthUnitValues.Dxa }; tableCellProperties11.Append(tableCellWidth11); Paragraph paragraph15 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties15 = new ParagraphProperties(); WidowControl widowControl15 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE15 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN15 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent15 = new AdjustRightIndent() { Val = false }; ParagraphMarkRunProperties paragraphMarkRunProperties15 = new ParagraphMarkRunProperties(); RunFonts runFonts30 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize30 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript30 = new FontSizeComplexScript() { Val = "20" }; paragraphMarkRunProperties15.Append(runFonts30); paragraphMarkRunProperties15.Append(fontSize30); paragraphMarkRunProperties15.Append(fontSizeComplexScript30); paragraphProperties15.Append(widowControl15); paragraphProperties15.Append(autoSpaceDE15); paragraphProperties15.Append(autoSpaceDN15); paragraphProperties15.Append(adjustRightIndent15); paragraphProperties15.Append(paragraphMarkRunProperties15); Run run16 = new Run(); RunProperties runProperties16 = new RunProperties(); RunFonts runFonts31 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold9 = new Bold(); BoldComplexScript boldComplexScript9 = new BoldComplexScript(); FontSize fontSize31 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript31 = new FontSizeComplexScript() { Val = "20" }; runProperties16.Append(runFonts31); runProperties16.Append(bold9); runProperties16.Append(boldComplexScript9); runProperties16.Append(fontSize31); runProperties16.Append(fontSizeComplexScript31); Text text16 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text16.Text = "Дата доставки материала: "; run16.Append(runProperties16); run16.Append(text16); paragraph15.Append(paragraphProperties15); paragraph15.Append(run16); tableCell11.Append(tableCellProperties11); tableCell11.Append(paragraph15); TableCell tableCell12 = new TableCell(); TableCellProperties tableCellProperties12 = new TableCellProperties(); TableCellWidth tableCellWidth12 = new TableCellWidth() { Width = "5500", Type = TableWidthUnitValues.Dxa }; tableCellProperties12.Append(tableCellWidth12); Paragraph paragraph16 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties16 = new ParagraphProperties(); WidowControl widowControl16 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE16 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN16 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent16 = new AdjustRightIndent() { Val = false }; ParagraphMarkRunProperties paragraphMarkRunProperties16 = new ParagraphMarkRunProperties(); RunFonts runFonts32 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize32 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript32 = new FontSizeComplexScript() { Val = "20" }; paragraphMarkRunProperties16.Append(runFonts32); paragraphMarkRunProperties16.Append(fontSize32); paragraphMarkRunProperties16.Append(fontSizeComplexScript32); paragraphProperties16.Append(widowControl16); paragraphProperties16.Append(autoSpaceDE16); paragraphProperties16.Append(autoSpaceDN16); paragraphProperties16.Append(adjustRightIndent16); paragraphProperties16.Append(paragraphMarkRunProperties16); Run run17 = new Run(); RunProperties runProperties17 = new RunProperties(); RunFonts runFonts33 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize33 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript33 = new FontSizeComplexScript() { Val = "20" }; runProperties17.Append(runFonts33); runProperties17.Append(fontSize33); runProperties17.Append(fontSizeComplexScript33); Text text17 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text17.Text = obj.DateDeliverySample ; run17.Append(runProperties17); run17.Append(text17); paragraph16.Append(paragraphProperties16); paragraph16.Append(run17); tableCell12.Append(tableCellProperties12); tableCell12.Append(paragraph16); tableRow6.Append(tableRowProperties6); tableRow6.Append(tableCell11); tableRow6.Append(tableCell12); TableRow tableRow7 = new TableRow() { RsidTableRowAddition = "00900A10", RsidTableRowProperties = "00D60978" }; TableRowProperties tableRowProperties7 = new TableRowProperties(); TableRowHeight tableRowHeight7 = new TableRowHeight() { Val = (UInt32Value)262U }; tableRowProperties7.Append(tableRowHeight7); TableCell tableCell13 = new TableCell(); TableCellProperties tableCellProperties13 = new TableCellProperties(); TableCellWidth tableCellWidth13 = new TableCellWidth() { Width = "3500", Type = TableWidthUnitValues.Dxa }; tableCellProperties13.Append(tableCellWidth13); Paragraph paragraph17 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00D60978" }; ParagraphProperties paragraphProperties17 = new ParagraphProperties(); WidowControl widowControl17 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE17 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN17 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent17 = new AdjustRightIndent() { Val = false }; ParagraphMarkRunProperties paragraphMarkRunProperties17 = new ParagraphMarkRunProperties(); RunFonts runFonts34 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize34 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript34 = new FontSizeComplexScript() { Val = "20" }; paragraphMarkRunProperties17.Append(runFonts34); paragraphMarkRunProperties17.Append(fontSize34); paragraphMarkRunProperties17.Append(fontSizeComplexScript34); paragraphProperties17.Append(widowControl17); paragraphProperties17.Append(autoSpaceDE17); paragraphProperties17.Append(autoSpaceDN17); paragraphProperties17.Append(adjustRightIndent17); paragraphProperties17.Append(paragraphMarkRunProperties17); Run run18 = new Run(); RunProperties runProperties18 = new RunProperties(); RunFonts runFonts35 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold10 = new Bold(); BoldComplexScript boldComplexScript10 = new BoldComplexScript(); FontSize fontSize35 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript35 = new FontSizeComplexScript() { Val = "20" }; runProperties18.Append(runFonts35); runProperties18.Append(bold10); runProperties18.Append(boldComplexScript10); runProperties18.Append(fontSize35); runProperties18.Append(fontSizeComplexScript35); Text text18 = new Text(); text18.Text = "Дата забора материала:"; run18.Append(runProperties18); run18.Append(text18); Run run19 = new Run(); RunProperties runProperties19 = new RunProperties(); RunFonts runFonts36 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold11 = new Bold(); BoldComplexScript boldComplexScript11 = new BoldComplexScript(); FontSize fontSize36 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript36 = new FontSizeComplexScript() { Val = "20" }; runProperties19.Append(runFonts36); runProperties19.Append(bold11); runProperties19.Append(boldComplexScript11); runProperties19.Append(fontSize36); runProperties19.Append(fontSizeComplexScript36); Text text19 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text19.Text = ""; run19.Append(runProperties19); run19.Append(text19); paragraph17.Append(paragraphProperties17); paragraph17.Append(run18); paragraph17.Append(run19); tableCell13.Append(tableCellProperties13); tableCell13.Append(paragraph17); TableCell tableCell14 = new TableCell(); TableCellProperties tableCellProperties14 = new TableCellProperties(); TableCellWidth tableCellWidth14 = new TableCellWidth() { Width = "5500", Type = TableWidthUnitValues.Dxa }; tableCellProperties14.Append(tableCellWidth14); Paragraph paragraph18 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00D60978" }; ParagraphProperties paragraphProperties18 = new ParagraphProperties(); WidowControl widowControl18 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE18 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN18 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent18 = new AdjustRightIndent() { Val = false }; ParagraphMarkRunProperties paragraphMarkRunProperties18 = new ParagraphMarkRunProperties(); RunFonts runFonts37 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize37 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript37 = new FontSizeComplexScript() { Val = "20" }; paragraphMarkRunProperties18.Append(runFonts37); paragraphMarkRunProperties18.Append(fontSize37); paragraphMarkRunProperties18.Append(fontSizeComplexScript37); paragraphProperties18.Append(widowControl18); paragraphProperties18.Append(autoSpaceDE18); paragraphProperties18.Append(autoSpaceDN18); paragraphProperties18.Append(adjustRightIndent18); paragraphProperties18.Append(paragraphMarkRunProperties18); Run run20 = new Run(); RunProperties runProperties20 = new RunProperties(); RunFonts runFonts38 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize38 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript38 = new FontSizeComplexScript() { Val = "20" }; runProperties20.Append(runFonts38); runProperties20.Append(fontSize38); runProperties20.Append(fontSizeComplexScript38); Text text20 = new Text(); text20.Text = obj.DateRecieveSample; run20.Append(runProperties20); run20.Append(text20); paragraph18.Append(paragraphProperties18); paragraph18.Append(run20); tableCell14.Append(tableCellProperties14); tableCell14.Append(paragraph18); tableRow7.Append(tableRowProperties7); tableRow7.Append(tableCell13); tableRow7.Append(tableCell14); table1.Append(tableProperties1); table1.Append(tableGrid1); table1.Append(tableRow1); table1.Append(tableRow2); table1.Append(tableRow3); table1.Append(tableRow4); table1.Append(tableRow5); table1.Append(tableRow6); table1.Append(tableRow7); Paragraph paragraph19 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00900A10", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties19 = new ParagraphProperties(); WidowControl widowControl19 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE19 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN19 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent19 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines5 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; Justification justification3 = new Justification() { Val = JustificationValues.Center }; ParagraphMarkRunProperties paragraphMarkRunProperties19 = new ParagraphMarkRunProperties(); RunFonts runFonts39 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize39 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript39 = new FontSizeComplexScript() { Val = "20" }; paragraphMarkRunProperties19.Append(runFonts39); paragraphMarkRunProperties19.Append(fontSize39); paragraphMarkRunProperties19.Append(fontSizeComplexScript39); paragraphProperties19.Append(widowControl19); paragraphProperties19.Append(autoSpaceDE19); paragraphProperties19.Append(autoSpaceDN19); paragraphProperties19.Append(adjustRightIndent19); paragraphProperties19.Append(spacingBetweenLines5); paragraphProperties19.Append(justification3); paragraphProperties19.Append(paragraphMarkRunProperties19); paragraph19.Append(paragraphProperties19); Paragraph paragraph20 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00900A10", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties20 = new ParagraphProperties(); WidowControl widowControl20 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE20 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN20 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent20 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines6 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; Justification justification4 = new Justification() { Val = JustificationValues.Center }; ParagraphMarkRunProperties paragraphMarkRunProperties20 = new ParagraphMarkRunProperties(); RunFonts runFonts40 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize40 = new FontSize() { Val = "20" }; FontSizeComplexScript fontSizeComplexScript40 = new FontSizeComplexScript() { Val = "20" }; paragraphMarkRunProperties20.Append(runFonts40); paragraphMarkRunProperties20.Append(fontSize40); paragraphMarkRunProperties20.Append(fontSizeComplexScript40); paragraphProperties20.Append(widowControl20); paragraphProperties20.Append(autoSpaceDE20); paragraphProperties20.Append(autoSpaceDN20); paragraphProperties20.Append(adjustRightIndent20); paragraphProperties20.Append(spacingBetweenLines6); paragraphProperties20.Append(justification4); paragraphProperties20.Append(paragraphMarkRunProperties20); paragraph20.Append(paragraphProperties20); Paragraph paragraph21 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00900A10", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties21 = new ParagraphProperties(); WidowControl widowControl21 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE21 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN21 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent21 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines7 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties21 = new ParagraphMarkRunProperties(); RunFonts runFonts41 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize41 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript41 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties21.Append(runFonts41); paragraphMarkRunProperties21.Append(fontSize41); paragraphMarkRunProperties21.Append(fontSizeComplexScript41); paragraphProperties21.Append(widowControl21); paragraphProperties21.Append(autoSpaceDE21); paragraphProperties21.Append(autoSpaceDN21); paragraphProperties21.Append(adjustRightIndent21); paragraphProperties21.Append(spacingBetweenLines7); paragraphProperties21.Append(paragraphMarkRunProperties21); Run run21 = new Run(); RunProperties runProperties21 = new RunProperties(); RunFonts runFonts42 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize42 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript42 = new FontSizeComplexScript() { Val = "16" }; runProperties21.Append(runFonts42); runProperties21.Append(fontSize42); runProperties21.Append(fontSizeComplexScript42); Text text21 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text21.Text = " "; run21.Append(runProperties21); run21.Append(text21); Run run22 = new Run(); RunProperties runProperties22 = new RunProperties(); RunFonts runFonts43 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold12 = new Bold(); BoldComplexScript boldComplexScript12 = new BoldComplexScript(); FontSize fontSize43 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript43 = new FontSizeComplexScript() { Val = "16" }; runProperties22.Append(runFonts43); runProperties22.Append(bold12); runProperties22.Append(boldComplexScript12); runProperties22.Append(fontSize43); runProperties22.Append(fontSizeComplexScript43); Text text22 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text22.Text = "Список заказанных анализов "; run22.Append(runProperties22); run22.Append(text22); paragraph21.Append(paragraphProperties21); paragraph21.Append(run21); paragraph21.Append(run22); Paragraph paragraph22 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00900A10", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties22 = new ParagraphProperties(); WidowControl widowControl22 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE22 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN22 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent22 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines8 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties22 = new ParagraphMarkRunProperties(); RunFonts runFonts44 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize44 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript44 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties22.Append(runFonts44); paragraphMarkRunProperties22.Append(fontSize44); paragraphMarkRunProperties22.Append(fontSizeComplexScript44); paragraphProperties22.Append(widowControl22); paragraphProperties22.Append(autoSpaceDE22); paragraphProperties22.Append(autoSpaceDN22); paragraphProperties22.Append(adjustRightIndent22); paragraphProperties22.Append(spacingBetweenLines8); paragraphProperties22.Append(paragraphMarkRunProperties22); paragraph22.Append(paragraphProperties22); ///////////////////////////// // ТАБЛИЦА СПИСОК АНАЛИЗОВ // ////////////////////////////////////////////////////////////////////// Table table2 = new Table(); TableProperties tableProperties2 = new TableProperties(); TableWidth tableWidth2 = new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto }; TableIndentation tableIndentation1 = new TableIndentation() { Width = 30, Type = TableWidthUnitValues.Dxa }; TableCellMarginDefault tableCellMarginDefault1 = new TableCellMarginDefault(); TableCellLeftMargin tableCellLeftMargin1 = new TableCellLeftMargin() { Width = 30, Type = TableWidthValues.Dxa }; TableCellRightMargin tableCellRightMargin1 = new TableCellRightMargin() { Width = 30, Type = TableWidthValues.Dxa }; tableCellMarginDefault1.Append(tableCellLeftMargin1); tableCellMarginDefault1.Append(tableCellRightMargin1); TableLook tableLook2 = new TableLook() { Val = "0000", FirstRow = false, LastRow = false, FirstColumn = false, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = false }; tableProperties2.Append(tableWidth2); tableProperties2.Append(tableIndentation1); tableProperties2.Append(tableCellMarginDefault1); tableProperties2.Append(tableLook2); TableGrid tableGrid2 = new TableGrid(); GridColumn gridColumn3 = new GridColumn() { Width = "500" }; GridColumn gridColumn4 = new GridColumn() { Width = "1000" }; GridColumn gridColumn5 = new GridColumn() { Width = "5500" }; GridColumn gridColumn6 = new GridColumn() { Width = "1500" }; tableGrid2.Append(gridColumn3); tableGrid2.Append(gridColumn4); tableGrid2.Append(gridColumn5); tableGrid2.Append(gridColumn6); // // новая строка таблицы // TableRow tableRow8 = new TableRow() { RsidTableRowAddition = "00900A10", RsidTableRowProperties = "00B819CE" }; TableRowProperties tableRowProperties8 = new TableRowProperties(); TableRowHeight tableRowHeight8 = new TableRowHeight() { Val = (UInt32Value)262U }; TableHeader tableHeader1 = new TableHeader(); tableRowProperties8.Append(tableRowHeight8); tableRowProperties8.Append(tableHeader1); TableCell tableCell15 = new TableCell(); TableCellProperties tableCellProperties15 = new TableCellProperties(); TableCellWidth tableCellWidth15 = new TableCellWidth() { Width = "500", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders1 = new TableCellBorders(); TopBorder topBorder2 = new TopBorder() { Val = BorderValues.Nil }; LeftBorder leftBorder2 = new LeftBorder() { Val = BorderValues.Nil }; BottomBorder bottomBorder2 = new BottomBorder() { Val = BorderValues.Nil }; RightBorder rightBorder2 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders1.Append(topBorder2); tableCellBorders1.Append(leftBorder2); tableCellBorders1.Append(bottomBorder2); tableCellBorders1.Append(rightBorder2); tableCellProperties15.Append(tableCellWidth15); tableCellProperties15.Append(tableCellBorders1); Paragraph paragraph23 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties23 = new ParagraphProperties(); WidowControl widowControl23 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE23 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN23 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent23 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines9 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties23 = new ParagraphMarkRunProperties(); RunFonts runFonts45 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize45 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript45 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties23.Append(runFonts45); paragraphMarkRunProperties23.Append(fontSize45); paragraphMarkRunProperties23.Append(fontSizeComplexScript45); paragraphProperties23.Append(widowControl23); paragraphProperties23.Append(autoSpaceDE23); paragraphProperties23.Append(autoSpaceDN23); paragraphProperties23.Append(adjustRightIndent23); paragraphProperties23.Append(spacingBetweenLines9); paragraphProperties23.Append(paragraphMarkRunProperties23); Run run23 = new Run(); RunProperties runProperties23 = new RunProperties(); RunFonts runFonts46 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold13 = new Bold(); BoldComplexScript boldComplexScript13 = new BoldComplexScript(); Italic italic1 = new Italic(); ItalicComplexScript italicComplexScript1 = new ItalicComplexScript(); FontSize fontSize46 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript46 = new FontSizeComplexScript() { Val = "16" }; Underline underline1 = new Underline() { Val = UnderlineValues.Single }; runProperties23.Append(runFonts46); runProperties23.Append(bold13); runProperties23.Append(boldComplexScript13); runProperties23.Append(italic1); runProperties23.Append(italicComplexScript1); runProperties23.Append(fontSize46); runProperties23.Append(fontSizeComplexScript46); runProperties23.Append(underline1); Text text23 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text23.Text = "№ "; run23.Append(runProperties23); run23.Append(text23); paragraph23.Append(paragraphProperties23); paragraph23.Append(run23); tableCell15.Append(tableCellProperties15); tableCell15.Append(paragraph23); TableCell tableCell16 = new TableCell(); TableCellProperties tableCellProperties16 = new TableCellProperties(); TableCellWidth tableCellWidth16 = new TableCellWidth() { Width = "1000", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders2 = new TableCellBorders(); TopBorder topBorder3 = new TopBorder() { Val = BorderValues.Nil }; LeftBorder leftBorder3 = new LeftBorder() { Val = BorderValues.Nil }; BottomBorder bottomBorder3 = new BottomBorder() { Val = BorderValues.Nil }; RightBorder rightBorder3 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders2.Append(topBorder3); tableCellBorders2.Append(leftBorder3); tableCellBorders2.Append(bottomBorder3); tableCellBorders2.Append(rightBorder3); tableCellProperties16.Append(tableCellWidth16); tableCellProperties16.Append(tableCellBorders2); Paragraph paragraph24 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties24 = new ParagraphProperties(); WidowControl widowControl24 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE24 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN24 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent24 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines10 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; Justification justification5 = new Justification() { Val = JustificationValues.Center }; ParagraphMarkRunProperties paragraphMarkRunProperties24 = new ParagraphMarkRunProperties(); RunFonts runFonts47 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize47 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript47 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties24.Append(runFonts47); paragraphMarkRunProperties24.Append(fontSize47); paragraphMarkRunProperties24.Append(fontSizeComplexScript47); paragraphProperties24.Append(widowControl24); paragraphProperties24.Append(autoSpaceDE24); paragraphProperties24.Append(autoSpaceDN24); paragraphProperties24.Append(adjustRightIndent24); paragraphProperties24.Append(spacingBetweenLines10); paragraphProperties24.Append(justification5); paragraphProperties24.Append(paragraphMarkRunProperties24); Run run24 = new Run(); RunProperties runProperties24 = new RunProperties(); RunFonts runFonts48 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold14 = new Bold(); BoldComplexScript boldComplexScript14 = new BoldComplexScript(); Italic italic2 = new Italic(); ItalicComplexScript italicComplexScript2 = new ItalicComplexScript(); FontSize fontSize48 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript48 = new FontSizeComplexScript() { Val = "16" }; Underline underline2 = new Underline() { Val = UnderlineValues.Single }; runProperties24.Append(runFonts48); runProperties24.Append(bold14); runProperties24.Append(boldComplexScript14); runProperties24.Append(italic2); runProperties24.Append(italicComplexScript2); runProperties24.Append(fontSize48); runProperties24.Append(fontSizeComplexScript48); runProperties24.Append(underline2); Text text24 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text24.Text = "Код "; run24.Append(runProperties24); run24.Append(text24); paragraph24.Append(paragraphProperties24); paragraph24.Append(run24); tableCell16.Append(tableCellProperties16); tableCell16.Append(paragraph24); TableCell tableCell17 = new TableCell(); TableCellProperties tableCellProperties17 = new TableCellProperties(); TableCellWidth tableCellWidth17 = new TableCellWidth() { Width = "5500", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders3 = new TableCellBorders(); TopBorder topBorder4 = new TopBorder() { Val = BorderValues.Nil }; LeftBorder leftBorder4 = new LeftBorder() { Val = BorderValues.Nil }; BottomBorder bottomBorder4 = new BottomBorder() { Val = BorderValues.Nil }; RightBorder rightBorder4 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders3.Append(topBorder4); tableCellBorders3.Append(leftBorder4); tableCellBorders3.Append(bottomBorder4); tableCellBorders3.Append(rightBorder4); tableCellProperties17.Append(tableCellWidth17); tableCellProperties17.Append(tableCellBorders3); Paragraph paragraph25 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties25 = new ParagraphProperties(); WidowControl widowControl25 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE25 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN25 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent25 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines11 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties25 = new ParagraphMarkRunProperties(); RunFonts runFonts49 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize49 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript49 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties25.Append(runFonts49); paragraphMarkRunProperties25.Append(fontSize49); paragraphMarkRunProperties25.Append(fontSizeComplexScript49); paragraphProperties25.Append(widowControl25); paragraphProperties25.Append(autoSpaceDE25); paragraphProperties25.Append(autoSpaceDN25); paragraphProperties25.Append(adjustRightIndent25); paragraphProperties25.Append(spacingBetweenLines11); paragraphProperties25.Append(paragraphMarkRunProperties25); Run run25 = new Run(); RunProperties runProperties25 = new RunProperties(); RunFonts runFonts50 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold15 = new Bold(); BoldComplexScript boldComplexScript15 = new BoldComplexScript(); Italic italic3 = new Italic(); ItalicComplexScript italicComplexScript3 = new ItalicComplexScript(); FontSize fontSize50 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript50 = new FontSizeComplexScript() { Val = "16" }; Underline underline3 = new Underline() { Val = UnderlineValues.Single }; runProperties25.Append(runFonts50); runProperties25.Append(bold15); runProperties25.Append(boldComplexScript15); runProperties25.Append(italic3); runProperties25.Append(italicComplexScript3); runProperties25.Append(fontSize50); runProperties25.Append(fontSizeComplexScript50); runProperties25.Append(underline3); Text text25 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text25.Text = "Тип анализа "; run25.Append(runProperties25); run25.Append(text25); paragraph25.Append(paragraphProperties25); paragraph25.Append(run25); tableCell17.Append(tableCellProperties17); tableCell17.Append(paragraph25); TableCell tableCell18 = new TableCell(); TableCellProperties tableCellProperties18 = new TableCellProperties(); TableCellWidth tableCellWidth18 = new TableCellWidth() { Width = "1500", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders4 = new TableCellBorders(); TopBorder topBorder5 = new TopBorder() { Val = BorderValues.Nil }; LeftBorder leftBorder5 = new LeftBorder() { Val = BorderValues.Nil }; BottomBorder bottomBorder5 = new BottomBorder() { Val = BorderValues.Nil }; RightBorder rightBorder5 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders4.Append(topBorder5); tableCellBorders4.Append(leftBorder5); tableCellBorders4.Append(bottomBorder5); tableCellBorders4.Append(rightBorder5); tableCellProperties18.Append(tableCellWidth18); tableCellProperties18.Append(tableCellBorders4); Paragraph paragraph26 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties26 = new ParagraphProperties(); WidowControl widowControl26 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE26 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN26 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent26 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines12 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties26 = new ParagraphMarkRunProperties(); RunFonts runFonts51 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize51 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript51 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties26.Append(runFonts51); paragraphMarkRunProperties26.Append(fontSize51); paragraphMarkRunProperties26.Append(fontSizeComplexScript51); paragraphProperties26.Append(widowControl26); paragraphProperties26.Append(autoSpaceDE26); paragraphProperties26.Append(autoSpaceDN26); paragraphProperties26.Append(adjustRightIndent26); paragraphProperties26.Append(spacingBetweenLines12); paragraphProperties26.Append(paragraphMarkRunProperties26); Run run26 = new Run(); RunProperties runProperties26 = new RunProperties(); RunFonts runFonts52 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold16 = new Bold(); BoldComplexScript boldComplexScript16 = new BoldComplexScript(); Italic italic4 = new Italic(); ItalicComplexScript italicComplexScript4 = new ItalicComplexScript(); FontSize fontSize52 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript52 = new FontSizeComplexScript() { Val = "16" }; Underline underline4 = new Underline() { Val = UnderlineValues.Single }; runProperties26.Append(runFonts52); runProperties26.Append(bold16); runProperties26.Append(boldComplexScript16); runProperties26.Append(italic4); runProperties26.Append(italicComplexScript4); runProperties26.Append(fontSize52); runProperties26.Append(fontSizeComplexScript52); runProperties26.Append(underline4); Text text26 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text26.Text = "Стоимость "; run26.Append(runProperties26); run26.Append(text26); paragraph26.Append(paragraphProperties26); paragraph26.Append(run26); tableCell18.Append(tableCellProperties18); tableCell18.Append(paragraph26); tableRow8.Append(tableRowProperties8); tableRow8.Append(tableCell15); tableRow8.Append(tableCell16); tableRow8.Append(tableCell17); tableRow8.Append(tableCell18); TableRow tableRow9 = new TableRow() { RsidTableRowAddition = "00900A10", RsidTableRowProperties = "00B819CE" }; TableRowProperties tableRowProperties9 = new TableRowProperties(); TableRowHeight tableRowHeight9 = new TableRowHeight() { Val = (UInt32Value)262U }; tableRowProperties9.Append(tableRowHeight9); TableCell tableCell19 = new TableCell(); TableCellProperties tableCellProperties19 = new TableCellProperties(); TableCellWidth tableCellWidth19 = new TableCellWidth() { Width = "500", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders5 = new TableCellBorders(); TopBorder topBorder6 = new TopBorder() { Val = BorderValues.Nil }; LeftBorder leftBorder6 = new LeftBorder() { Val = BorderValues.Nil }; BottomBorder bottomBorder6 = new BottomBorder() { Val = BorderValues.Nil }; RightBorder rightBorder6 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders5.Append(topBorder6); tableCellBorders5.Append(leftBorder6); tableCellBorders5.Append(bottomBorder6); tableCellBorders5.Append(rightBorder6); tableCellProperties19.Append(tableCellWidth19); tableCellProperties19.Append(tableCellBorders5); Paragraph paragraph27 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties27 = new ParagraphProperties(); WidowControl widowControl27 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE27 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN27 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent27 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines13 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties27 = new ParagraphMarkRunProperties(); RunFonts runFonts53 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize53 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript53 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties27.Append(runFonts53); paragraphMarkRunProperties27.Append(fontSize53); paragraphMarkRunProperties27.Append(fontSizeComplexScript53); paragraphProperties27.Append(widowControl27); paragraphProperties27.Append(autoSpaceDE27); paragraphProperties27.Append(autoSpaceDN27); paragraphProperties27.Append(adjustRightIndent27); paragraphProperties27.Append(spacingBetweenLines13); paragraphProperties27.Append(paragraphMarkRunProperties27); // //Закончился ввод шапки таблицы // // //Началось заполнение данных таблицы // foreach (var itemAnalysis in obj.AnalysisList) { Run run27 = new Run(); RunProperties runProperties27 = new RunProperties(); RunFonts runFonts54 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize54 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript54 = new FontSizeComplexScript() { Val = "16" }; runProperties27.Append(runFonts54); runProperties27.Append(fontSize54); runProperties27.Append(fontSizeComplexScript54); Text text27 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text27.Text = itemAnalysis.AnalysisPosition ; run27.Append(runProperties27); run27.Append(text27); paragraph27.Append(paragraphProperties27); paragraph27.Append(run27); tableCell19.Append(tableCellProperties19); tableCell19.Append(paragraph27); TableCell tableCell20 = new TableCell(); TableCellProperties tableCellProperties20 = new TableCellProperties(); TableCellWidth tableCellWidth20 = new TableCellWidth() { Width = "1000", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders6 = new TableCellBorders(); TopBorder topBorder7 = new TopBorder() { Val = BorderValues.Nil }; LeftBorder leftBorder7 = new LeftBorder() { Val = BorderValues.Nil }; BottomBorder bottomBorder7 = new BottomBorder() { Val = BorderValues.Nil }; RightBorder rightBorder7 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders6.Append(topBorder7); tableCellBorders6.Append(leftBorder7); tableCellBorders6.Append(bottomBorder7); tableCellBorders6.Append(rightBorder7); tableCellProperties20.Append(tableCellWidth20); tableCellProperties20.Append(tableCellBorders6); Paragraph paragraph28 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties28 = new ParagraphProperties(); WidowControl widowControl28 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE28 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN28 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent28 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines14 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; Justification justification6 = new Justification() { Val = JustificationValues.Center }; ParagraphMarkRunProperties paragraphMarkRunProperties28 = new ParagraphMarkRunProperties(); RunFonts runFonts55 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize55 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript55 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties28.Append(runFonts55); paragraphMarkRunProperties28.Append(fontSize55); paragraphMarkRunProperties28.Append(fontSizeComplexScript55); paragraphProperties28.Append(widowControl28); paragraphProperties28.Append(autoSpaceDE28); paragraphProperties28.Append(autoSpaceDN28); paragraphProperties28.Append(adjustRightIndent28); paragraphProperties28.Append(spacingBetweenLines14); paragraphProperties28.Append(justification6); paragraphProperties28.Append(paragraphMarkRunProperties28); Run run28 = new Run(); RunProperties runProperties28 = new RunProperties(); RunFonts runFonts56 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize56 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript56 = new FontSizeComplexScript() { Val = "16" }; runProperties28.Append(runFonts56); runProperties28.Append(fontSize56); runProperties28.Append(fontSizeComplexScript56); Text text28 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text28.Text = itemAnalysis.AnalysisCode ; run28.Append(runProperties28); run28.Append(text28); paragraph28.Append(paragraphProperties28); paragraph28.Append(run28); tableCell20.Append(tableCellProperties20); tableCell20.Append(paragraph28); TableCell tableCell21 = new TableCell(); TableCellProperties tableCellProperties21 = new TableCellProperties(); TableCellWidth tableCellWidth21 = new TableCellWidth() { Width = "5500", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders7 = new TableCellBorders(); TopBorder topBorder8 = new TopBorder() { Val = BorderValues.Nil }; LeftBorder leftBorder8 = new LeftBorder() { Val = BorderValues.Nil }; BottomBorder bottomBorder8 = new BottomBorder() { Val = BorderValues.Nil }; RightBorder rightBorder8 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders7.Append(topBorder8); tableCellBorders7.Append(leftBorder8); tableCellBorders7.Append(bottomBorder8); tableCellBorders7.Append(rightBorder8); tableCellProperties21.Append(tableCellWidth21); tableCellProperties21.Append(tableCellBorders7); Paragraph paragraph29 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties29 = new ParagraphProperties(); WidowControl widowControl29 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE29 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN29 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent29 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines15 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties29 = new ParagraphMarkRunProperties(); RunFonts runFonts57 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize57 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript57 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties29.Append(runFonts57); paragraphMarkRunProperties29.Append(fontSize57); paragraphMarkRunProperties29.Append(fontSizeComplexScript57); paragraphProperties29.Append(widowControl29); paragraphProperties29.Append(autoSpaceDE29); paragraphProperties29.Append(autoSpaceDN29); paragraphProperties29.Append(adjustRightIndent29); paragraphProperties29.Append(spacingBetweenLines15); paragraphProperties29.Append(paragraphMarkRunProperties29); Run run29 = new Run(); RunProperties runProperties29 = new RunProperties(); RunFonts runFonts58 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize58 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript58 = new FontSizeComplexScript() { Val = "16" }; runProperties29.Append(runFonts58); runProperties29.Append(fontSize58); runProperties29.Append(fontSizeComplexScript58); Text text29 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text29.Text = itemAnalysis.AnalysisDescription ; run29.Append(runProperties29); run29.Append(text29); paragraph29.Append(paragraphProperties29); paragraph29.Append(run29); tableCell21.Append(tableCellProperties21); tableCell21.Append(paragraph29); TableCell tableCell22 = new TableCell(); TableCellProperties tableCellProperties22 = new TableCellProperties(); TableCellWidth tableCellWidth22 = new TableCellWidth() { Width = "1500", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders8 = new TableCellBorders(); TopBorder topBorder9 = new TopBorder() { Val = BorderValues.Nil }; LeftBorder leftBorder9 = new LeftBorder() { Val = BorderValues.Nil }; BottomBorder bottomBorder9 = new BottomBorder() { Val = BorderValues.Nil }; RightBorder rightBorder9 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders8.Append(topBorder9); tableCellBorders8.Append(leftBorder9); tableCellBorders8.Append(bottomBorder9); tableCellBorders8.Append(rightBorder9); tableCellProperties22.Append(tableCellWidth22); tableCellProperties22.Append(tableCellBorders8); Paragraph paragraph30 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties30 = new ParagraphProperties(); WidowControl widowControl30 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE30 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN30 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent30 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines16 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties30 = new ParagraphMarkRunProperties(); RunFonts runFonts59 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize59 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript59 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties30.Append(runFonts59); paragraphMarkRunProperties30.Append(fontSize59); paragraphMarkRunProperties30.Append(fontSizeComplexScript59); paragraphProperties30.Append(widowControl30); paragraphProperties30.Append(autoSpaceDE30); paragraphProperties30.Append(autoSpaceDN30); paragraphProperties30.Append(adjustRightIndent30); paragraphProperties30.Append(spacingBetweenLines16); paragraphProperties30.Append(paragraphMarkRunProperties30); Run run30 = new Run(); RunProperties runProperties30 = new RunProperties(); RunFonts runFonts60 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize60 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript60 = new FontSizeComplexScript() { Val = "16" }; runProperties30.Append(runFonts60); runProperties30.Append(fontSize60); runProperties30.Append(fontSizeComplexScript60); Text text30 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text30.Text = itemAnalysis.AnalysisPrice ; run30.Append(runProperties30); run30.Append(text30); paragraph30.Append(paragraphProperties30); paragraph30.Append(run30); tableCell22.Append(tableCellProperties22); tableCell22.Append(paragraph30); tableRow9.Append(tableRowProperties9); tableRow9.Append(tableCell19); tableRow9.Append(tableCell20); tableRow9.Append(tableCell21); tableRow9.Append(tableCell22); } // //Заканчиваем ввод таблицы // table2.Append(tableProperties2); table2.Append(tableGrid2); table2.Append(tableRow8); table2.Append(tableRow9); Paragraph paragraph31 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00900A10", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties31 = new ParagraphProperties(); WidowControl widowControl31 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE31 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN31 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent31 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines17 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties31 = new ParagraphMarkRunProperties(); RunFonts runFonts61 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize61 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript61 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties31.Append(runFonts61); paragraphMarkRunProperties31.Append(fontSize61); paragraphMarkRunProperties31.Append(fontSizeComplexScript61); paragraphProperties31.Append(widowControl31); paragraphProperties31.Append(autoSpaceDE31); paragraphProperties31.Append(autoSpaceDN31); paragraphProperties31.Append(adjustRightIndent31); paragraphProperties31.Append(spacingBetweenLines17); paragraphProperties31.Append(paragraphMarkRunProperties31); paragraph31.Append(paragraphProperties31); Paragraph paragraph32 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00900A10", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties32 = new ParagraphProperties(); WidowControl widowControl32 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE32 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN32 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent32 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines18 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties32 = new ParagraphMarkRunProperties(); RunFonts runFonts62 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize62 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript62 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties32.Append(runFonts62); paragraphMarkRunProperties32.Append(fontSize62); paragraphMarkRunProperties32.Append(fontSizeComplexScript62); paragraphProperties32.Append(widowControl32); paragraphProperties32.Append(autoSpaceDE32); paragraphProperties32.Append(autoSpaceDN32); paragraphProperties32.Append(adjustRightIndent32); paragraphProperties32.Append(spacingBetweenLines18); paragraphProperties32.Append(paragraphMarkRunProperties32); paragraph32.Append(paragraphProperties32); Paragraph paragraph33 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00900A10", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties33 = new ParagraphProperties(); WidowControl widowControl33 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE33 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN33 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent33 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines19 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties33 = new ParagraphMarkRunProperties(); RunFonts runFonts63 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize63 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript63 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties33.Append(runFonts63); paragraphMarkRunProperties33.Append(fontSize63); paragraphMarkRunProperties33.Append(fontSizeComplexScript63); paragraphProperties33.Append(widowControl33); paragraphProperties33.Append(autoSpaceDE33); paragraphProperties33.Append(autoSpaceDN33); paragraphProperties33.Append(adjustRightIndent33); paragraphProperties33.Append(spacingBetweenLines19); paragraphProperties33.Append(paragraphMarkRunProperties33); Run run31 = new Run(); RunProperties runProperties31 = new RunProperties(); RunFonts runFonts64 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize64 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript64 = new FontSizeComplexScript() { Val = "16" }; runProperties31.Append(runFonts64); runProperties31.Append(fontSize64); runProperties31.Append(fontSizeComplexScript64); Text text31 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text31.Text = " "; run31.Append(runProperties31); run31.Append(text31); Run run32 = new Run(); RunProperties runProperties32 = new RunProperties(); RunFonts runFonts65 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold17 = new Bold(); BoldComplexScript boldComplexScript17 = new BoldComplexScript(); FontSize fontSize65 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript65 = new FontSizeComplexScript() { Val = "16" }; runProperties32.Append(runFonts65); runProperties32.Append(bold17); runProperties32.Append(boldComplexScript17); runProperties32.Append(fontSize65); runProperties32.Append(fontSizeComplexScript65); Text text32 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text32.Text = "Дополнительные услуги "; run32.Append(runProperties32); run32.Append(text32); paragraph33.Append(paragraphProperties33); paragraph33.Append(run31); paragraph33.Append(run32); Paragraph paragraph34 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00900A10", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties34 = new ParagraphProperties(); WidowControl widowControl34 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE34 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN34 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent34 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines20 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties34 = new ParagraphMarkRunProperties(); RunFonts runFonts66 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize66 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript66 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties34.Append(runFonts66); paragraphMarkRunProperties34.Append(fontSize66); paragraphMarkRunProperties34.Append(fontSizeComplexScript66); paragraphProperties34.Append(widowControl34); paragraphProperties34.Append(autoSpaceDE34); paragraphProperties34.Append(autoSpaceDN34); paragraphProperties34.Append(adjustRightIndent34); paragraphProperties34.Append(spacingBetweenLines20); paragraphProperties34.Append(paragraphMarkRunProperties34); paragraph34.Append(paragraphProperties34); ///////////////////////////////////////////// // Начинается ввод таблицы с дополнительными услугами //////////////////////////////////////////////// Table table3 = new Table(); TableProperties tableProperties3 = new TableProperties(); TableWidth tableWidth3 = new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto }; TableIndentation tableIndentation2 = new TableIndentation() { Width = 30, Type = TableWidthUnitValues.Dxa }; TableLayout tableLayout2 = new TableLayout() { Type = TableLayoutValues.Fixed }; TableCellMarginDefault tableCellMarginDefault2 = new TableCellMarginDefault(); TableCellLeftMargin tableCellLeftMargin2 = new TableCellLeftMargin() { Width = 30, Type = TableWidthValues.Dxa }; TableCellRightMargin tableCellRightMargin2 = new TableCellRightMargin() { Width = 30, Type = TableWidthValues.Dxa }; tableCellMarginDefault2.Append(tableCellLeftMargin2); tableCellMarginDefault2.Append(tableCellRightMargin2); TableLook tableLook3 = new TableLook() { Val = "0000", FirstRow = false, LastRow = false, FirstColumn = false, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = false }; tableProperties3.Append(tableWidth3); tableProperties3.Append(tableIndentation2); tableProperties3.Append(tableLayout2); tableProperties3.Append(tableCellMarginDefault2); tableProperties3.Append(tableLook3); TableGrid tableGrid3 = new TableGrid(); GridColumn gridColumn7 = new GridColumn() { Width = "500" }; GridColumn gridColumn8 = new GridColumn() { Width = "1000" }; GridColumn gridColumn9 = new GridColumn() { Width = "5500" }; GridColumn gridColumn10 = new GridColumn() { Width = "1500" }; tableGrid3.Append(gridColumn7); tableGrid3.Append(gridColumn8); tableGrid3.Append(gridColumn9); tableGrid3.Append(gridColumn10); // // Пошло заполнение данных // foreach (var itemAddService in obj.AddServiceList) { TableRow tableRow10 = new TableRow() { RsidTableRowAddition = "00900A10", RsidTableRowProperties = "00B819CE" }; TableRowProperties tableRowProperties10 = new TableRowProperties(); TableRowHeight tableRowHeight10 = new TableRowHeight() { Val = (UInt32Value)262U }; tableRowProperties10.Append(tableRowHeight10); TableCell tableCell23 = new TableCell(); TableCellProperties tableCellProperties23 = new TableCellProperties(); TableCellWidth tableCellWidth23 = new TableCellWidth() { Width = "500", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders9 = new TableCellBorders(); TopBorder topBorder10 = new TopBorder() { Val = BorderValues.Nil }; LeftBorder leftBorder10 = new LeftBorder() { Val = BorderValues.Nil }; BottomBorder bottomBorder10 = new BottomBorder() { Val = BorderValues.Nil }; RightBorder rightBorder10 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders9.Append(topBorder10); tableCellBorders9.Append(leftBorder10); tableCellBorders9.Append(bottomBorder10); tableCellBorders9.Append(rightBorder10); tableCellProperties23.Append(tableCellWidth23); tableCellProperties23.Append(tableCellBorders9); Paragraph paragraph35 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties35 = new ParagraphProperties(); WidowControl widowControl35 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE35 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN35 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent35 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines21 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties35 = new ParagraphMarkRunProperties(); RunFonts runFonts67 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize67 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript67 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties35.Append(runFonts67); paragraphMarkRunProperties35.Append(fontSize67); paragraphMarkRunProperties35.Append(fontSizeComplexScript67); paragraphProperties35.Append(widowControl35); paragraphProperties35.Append(autoSpaceDE35); paragraphProperties35.Append(autoSpaceDN35); paragraphProperties35.Append(adjustRightIndent35); paragraphProperties35.Append(spacingBetweenLines21); paragraphProperties35.Append(paragraphMarkRunProperties35); Run run33 = new Run(); RunProperties runProperties33 = new RunProperties(); RunFonts runFonts68 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize68 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript68 = new FontSizeComplexScript() { Val = "16" }; runProperties33.Append(runFonts68); runProperties33.Append(fontSize68); runProperties33.Append(fontSizeComplexScript68); Text text33 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text33.Text = itemAddService.AddServicePosition ; run33.Append(runProperties33); run33.Append(text33); paragraph35.Append(paragraphProperties35); paragraph35.Append(run33); tableCell23.Append(tableCellProperties23); tableCell23.Append(paragraph35); TableCell tableCell24 = new TableCell(); TableCellProperties tableCellProperties24 = new TableCellProperties(); TableCellWidth tableCellWidth24 = new TableCellWidth() { Width = "1000", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders10 = new TableCellBorders(); TopBorder topBorder11 = new TopBorder() { Val = BorderValues.Nil }; LeftBorder leftBorder11 = new LeftBorder() { Val = BorderValues.Nil }; BottomBorder bottomBorder11 = new BottomBorder() { Val = BorderValues.Nil }; RightBorder rightBorder11 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders10.Append(topBorder11); tableCellBorders10.Append(leftBorder11); tableCellBorders10.Append(bottomBorder11); tableCellBorders10.Append(rightBorder11); tableCellProperties24.Append(tableCellWidth24); tableCellProperties24.Append(tableCellBorders10); Paragraph paragraph36 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties36 = new ParagraphProperties(); WidowControl widowControl36 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE36 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN36 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent36 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines22 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; Justification justification7 = new Justification() { Val = JustificationValues.Center }; ParagraphMarkRunProperties paragraphMarkRunProperties36 = new ParagraphMarkRunProperties(); RunFonts runFonts69 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize69 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript69 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties36.Append(runFonts69); paragraphMarkRunProperties36.Append(fontSize69); paragraphMarkRunProperties36.Append(fontSizeComplexScript69); paragraphProperties36.Append(widowControl36); paragraphProperties36.Append(autoSpaceDE36); paragraphProperties36.Append(autoSpaceDN36); paragraphProperties36.Append(adjustRightIndent36); paragraphProperties36.Append(spacingBetweenLines22); paragraphProperties36.Append(justification7); paragraphProperties36.Append(paragraphMarkRunProperties36); Run run34 = new Run(); RunProperties runProperties34 = new RunProperties(); RunFonts runFonts70 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize70 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript70 = new FontSizeComplexScript() { Val = "16" }; runProperties34.Append(runFonts70); runProperties34.Append(fontSize70); runProperties34.Append(fontSizeComplexScript70); Text text34 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text34.Text = itemAddService.AddServiceCode ; run34.Append(runProperties34); run34.Append(text34); paragraph36.Append(paragraphProperties36); paragraph36.Append(run34); tableCell24.Append(tableCellProperties24); tableCell24.Append(paragraph36); TableCell tableCell25 = new TableCell(); TableCellProperties tableCellProperties25 = new TableCellProperties(); TableCellWidth tableCellWidth25 = new TableCellWidth() { Width = "5500", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders11 = new TableCellBorders(); TopBorder topBorder12 = new TopBorder() { Val = BorderValues.Nil }; LeftBorder leftBorder12 = new LeftBorder() { Val = BorderValues.Nil }; BottomBorder bottomBorder12 = new BottomBorder() { Val = BorderValues.Nil }; RightBorder rightBorder12 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders11.Append(topBorder12); tableCellBorders11.Append(leftBorder12); tableCellBorders11.Append(bottomBorder12); tableCellBorders11.Append(rightBorder12); tableCellProperties25.Append(tableCellWidth25); tableCellProperties25.Append(tableCellBorders11); Paragraph paragraph37 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties37 = new ParagraphProperties(); WidowControl widowControl37 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE37 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN37 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent37 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines23 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties37 = new ParagraphMarkRunProperties(); RunFonts runFonts71 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize71 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript71 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties37.Append(runFonts71); paragraphMarkRunProperties37.Append(fontSize71); paragraphMarkRunProperties37.Append(fontSizeComplexScript71); paragraphProperties37.Append(widowControl37); paragraphProperties37.Append(autoSpaceDE37); paragraphProperties37.Append(autoSpaceDN37); paragraphProperties37.Append(adjustRightIndent37); paragraphProperties37.Append(spacingBetweenLines23); paragraphProperties37.Append(paragraphMarkRunProperties37); Run run35 = new Run(); RunProperties runProperties35 = new RunProperties(); RunFonts runFonts72 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize72 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript72 = new FontSizeComplexScript() { Val = "16" }; runProperties35.Append(runFonts72); runProperties35.Append(fontSize72); runProperties35.Append(fontSizeComplexScript72); Text text35 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text35.Text = itemAddService.AddServiceDescription ; run35.Append(runProperties35); run35.Append(text35); paragraph37.Append(paragraphProperties37); paragraph37.Append(run35); tableCell25.Append(tableCellProperties25); tableCell25.Append(paragraph37); TableCell tableCell26 = new TableCell(); TableCellProperties tableCellProperties26 = new TableCellProperties(); TableCellWidth tableCellWidth26 = new TableCellWidth() { Width = "1500", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders12 = new TableCellBorders(); TopBorder topBorder13 = new TopBorder() { Val = BorderValues.Nil }; LeftBorder leftBorder13 = new LeftBorder() { Val = BorderValues.Nil }; BottomBorder bottomBorder13 = new BottomBorder() { Val = BorderValues.Nil }; RightBorder rightBorder13 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders12.Append(topBorder13); tableCellBorders12.Append(leftBorder13); tableCellBorders12.Append(bottomBorder13); tableCellBorders12.Append(rightBorder13); tableCellProperties26.Append(tableCellWidth26); tableCellProperties26.Append(tableCellBorders12); Paragraph paragraph38 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties38 = new ParagraphProperties(); WidowControl widowControl38 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE38 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN38 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent38 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines24 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties38 = new ParagraphMarkRunProperties(); RunFonts runFonts73 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize73 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript73 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties38.Append(runFonts73); paragraphMarkRunProperties38.Append(fontSize73); paragraphMarkRunProperties38.Append(fontSizeComplexScript73); paragraphProperties38.Append(widowControl38); paragraphProperties38.Append(autoSpaceDE38); paragraphProperties38.Append(autoSpaceDN38); paragraphProperties38.Append(adjustRightIndent38); paragraphProperties38.Append(spacingBetweenLines24); paragraphProperties38.Append(paragraphMarkRunProperties38); Run run36 = new Run(); RunProperties runProperties36 = new RunProperties(); RunFonts runFonts74 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize74 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript74 = new FontSizeComplexScript() { Val = "16" }; runProperties36.Append(runFonts74); runProperties36.Append(fontSize74); runProperties36.Append(fontSizeComplexScript74); Text text36 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text36.Text = itemAddService.AddServicePrice ; run36.Append(runProperties36); run36.Append(text36); paragraph38.Append(paragraphProperties38); paragraph38.Append(run36); tableCell26.Append(tableCellProperties26); tableCell26.Append(paragraph38); tableRow10.Append(tableRowProperties10); tableRow10.Append(tableCell23); tableRow10.Append(tableCell24); tableRow10.Append(tableCell25); tableRow10.Append(tableCell26); table3.Append(tableProperties3); table3.Append(tableGrid3); table3.Append(tableRow10); } Paragraph paragraph39 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00900A10", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties39 = new ParagraphProperties(); WidowControl widowControl39 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE39 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN39 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent39 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines25 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties39 = new ParagraphMarkRunProperties(); RunFonts runFonts75 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize75 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript75 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties39.Append(runFonts75); paragraphMarkRunProperties39.Append(fontSize75); paragraphMarkRunProperties39.Append(fontSizeComplexScript75); paragraphProperties39.Append(widowControl39); paragraphProperties39.Append(autoSpaceDE39); paragraphProperties39.Append(autoSpaceDN39); paragraphProperties39.Append(adjustRightIndent39); paragraphProperties39.Append(spacingBetweenLines25); paragraphProperties39.Append(paragraphMarkRunProperties39); paragraph39.Append(paragraphProperties39); Paragraph paragraph40 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00900A10", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties40 = new ParagraphProperties(); WidowControl widowControl40 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE40 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN40 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent40 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines26 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties40 = new ParagraphMarkRunProperties(); RunFonts runFonts76 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize76 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript76 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties40.Append(runFonts76); paragraphMarkRunProperties40.Append(fontSize76); paragraphMarkRunProperties40.Append(fontSizeComplexScript76); paragraphProperties40.Append(widowControl40); paragraphProperties40.Append(autoSpaceDE40); paragraphProperties40.Append(autoSpaceDN40); paragraphProperties40.Append(adjustRightIndent40); paragraphProperties40.Append(spacingBetweenLines26); paragraphProperties40.Append(paragraphMarkRunProperties40); paragraph40.Append(paragraphProperties40); Paragraph paragraph41 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00900A10", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties41 = new ParagraphProperties(); WidowControl widowControl41 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE41 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN41 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent41 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines27 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties41 = new ParagraphMarkRunProperties(); RunFonts runFonts77 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize77 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript77 = new FontSizeComplexScript() { Val = "18" }; paragraphMarkRunProperties41.Append(runFonts77); paragraphMarkRunProperties41.Append(fontSize77); paragraphMarkRunProperties41.Append(fontSizeComplexScript77); paragraphProperties41.Append(widowControl41); paragraphProperties41.Append(autoSpaceDE41); paragraphProperties41.Append(autoSpaceDN41); paragraphProperties41.Append(adjustRightIndent41); paragraphProperties41.Append(spacingBetweenLines27); paragraphProperties41.Append(paragraphMarkRunProperties41); Run run37 = new Run(); RunProperties runProperties37 = new RunProperties(); RunFonts runFonts78 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize78 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript78 = new FontSizeComplexScript() { Val = "18" }; runProperties37.Append(runFonts78); runProperties37.Append(fontSize78); runProperties37.Append(fontSizeComplexScript78); Text text37 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text37.Text = " "; run37.Append(runProperties37); run37.Append(text37); Run run38 = new Run(); RunProperties runProperties38 = new RunProperties(); RunFonts runFonts79 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; Bold bold18 = new Bold(); BoldComplexScript boldComplexScript18 = new BoldComplexScript(); FontSize fontSize79 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript79 = new FontSizeComplexScript() { Val = "18" }; runProperties38.Append(runFonts79); runProperties38.Append(bold18); runProperties38.Append(boldComplexScript18); runProperties38.Append(fontSize79); runProperties38.Append(fontSizeComplexScript79); Text text38 = new Text(); text38.Text = "Итого на общую сумму: " + obj.TotalSum ; run38.Append(runProperties38); run38.Append(text38); paragraph41.Append(paragraphProperties41); paragraph41.Append(run37); paragraph41.Append(run38); Paragraph paragraph42 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00900A10", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties42 = new ParagraphProperties(); WidowControl widowControl42 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE42 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN42 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent42 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines28 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties42 = new ParagraphMarkRunProperties(); RunFonts runFonts80 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize80 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript80 = new FontSizeComplexScript() { Val = "18" }; paragraphMarkRunProperties42.Append(runFonts80); paragraphMarkRunProperties42.Append(fontSize80); paragraphMarkRunProperties42.Append(fontSizeComplexScript80); paragraphProperties42.Append(widowControl42); paragraphProperties42.Append(autoSpaceDE42); paragraphProperties42.Append(autoSpaceDN42); paragraphProperties42.Append(adjustRightIndent42); paragraphProperties42.Append(spacingBetweenLines28); paragraphProperties42.Append(paragraphMarkRunProperties42); paragraph42.Append(paragraphProperties42); Paragraph paragraph43 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00900A10", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties43 = new ParagraphProperties(); WidowControl widowControl43 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE43 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN43 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent43 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines29 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties43 = new ParagraphMarkRunProperties(); RunFonts runFonts81 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize81 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript81 = new FontSizeComplexScript() { Val = "18" }; paragraphMarkRunProperties43.Append(runFonts81); paragraphMarkRunProperties43.Append(fontSize81); paragraphMarkRunProperties43.Append(fontSizeComplexScript81); paragraphProperties43.Append(widowControl43); paragraphProperties43.Append(autoSpaceDE43); paragraphProperties43.Append(autoSpaceDN43); paragraphProperties43.Append(adjustRightIndent43); paragraphProperties43.Append(spacingBetweenLines29); paragraphProperties43.Append(paragraphMarkRunProperties43); paragraph43.Append(paragraphProperties43); Paragraph paragraph44 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00900A10", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties44 = new ParagraphProperties(); WidowControl widowControl44 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE44 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN44 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent44 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines30 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties44 = new ParagraphMarkRunProperties(); RunFonts runFonts82 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize82 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript82 = new FontSizeComplexScript() { Val = "18" }; paragraphMarkRunProperties44.Append(runFonts82); paragraphMarkRunProperties44.Append(fontSize82); paragraphMarkRunProperties44.Append(fontSizeComplexScript82); paragraphProperties44.Append(widowControl44); paragraphProperties44.Append(autoSpaceDE44); paragraphProperties44.Append(autoSpaceDN44); paragraphProperties44.Append(adjustRightIndent44); paragraphProperties44.Append(spacingBetweenLines30); paragraphProperties44.Append(paragraphMarkRunProperties44); paragraph44.Append(paragraphProperties44); Table table4 = new Table(); TableProperties tableProperties4 = new TableProperties(); TableWidth tableWidth4 = new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto }; TableIndentation tableIndentation3 = new TableIndentation() { Width = 30, Type = TableWidthUnitValues.Dxa }; TableLayout tableLayout3 = new TableLayout() { Type = TableLayoutValues.Fixed }; TableCellMarginDefault tableCellMarginDefault3 = new TableCellMarginDefault(); TableCellLeftMargin tableCellLeftMargin3 = new TableCellLeftMargin() { Width = 30, Type = TableWidthValues.Dxa }; TableCellRightMargin tableCellRightMargin3 = new TableCellRightMargin() { Width = 30, Type = TableWidthValues.Dxa }; tableCellMarginDefault3.Append(tableCellLeftMargin3); tableCellMarginDefault3.Append(tableCellRightMargin3); TableLook tableLook4 = new TableLook() { Val = "0000", FirstRow = false, LastRow = false, FirstColumn = false, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = false }; tableProperties4.Append(tableWidth4); tableProperties4.Append(tableIndentation3); tableProperties4.Append(tableLayout3); tableProperties4.Append(tableCellMarginDefault3); tableProperties4.Append(tableLook4); TableGrid tableGrid4 = new TableGrid(); GridColumn gridColumn11 = new GridColumn() { Width = "2000" }; GridColumn gridColumn12 = new GridColumn() { Width = "2000" }; GridColumn gridColumn13 = new GridColumn() { Width = "2500" }; GridColumn gridColumn14 = new GridColumn() { Width = "3000" }; tableGrid4.Append(gridColumn11); tableGrid4.Append(gridColumn12); tableGrid4.Append(gridColumn13); tableGrid4.Append(gridColumn14); TableRow tableRow11 = new TableRow() { RsidTableRowAddition = "00900A10", RsidTableRowProperties = "00B819CE" }; TableRowProperties tableRowProperties11 = new TableRowProperties(); TableRowHeight tableRowHeight11 = new TableRowHeight() { Val = (UInt32Value)262U }; TableHeader tableHeader2 = new TableHeader(); tableRowProperties11.Append(tableRowHeight11); tableRowProperties11.Append(tableHeader2); TableCell tableCell27 = new TableCell(); TableCellProperties tableCellProperties27 = new TableCellProperties(); TableCellWidth tableCellWidth27 = new TableCellWidth() { Width = "2000", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders13 = new TableCellBorders(); TopBorder topBorder14 = new TopBorder() { Val = BorderValues.Nil }; LeftBorder leftBorder14 = new LeftBorder() { Val = BorderValues.Nil }; BottomBorder bottomBorder14 = new BottomBorder() { Val = BorderValues.Nil }; RightBorder rightBorder14 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders13.Append(topBorder14); tableCellBorders13.Append(leftBorder14); tableCellBorders13.Append(bottomBorder14); tableCellBorders13.Append(rightBorder14); tableCellProperties27.Append(tableCellWidth27); tableCellProperties27.Append(tableCellBorders13); Paragraph paragraph45 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties45 = new ParagraphProperties(); WidowControl widowControl45 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE45 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN45 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent45 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines31 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties45 = new ParagraphMarkRunProperties(); RunFonts runFonts83 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize83 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript83 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties45.Append(runFonts83); paragraphMarkRunProperties45.Append(fontSize83); paragraphMarkRunProperties45.Append(fontSizeComplexScript83); paragraphProperties45.Append(widowControl45); paragraphProperties45.Append(autoSpaceDE45); paragraphProperties45.Append(autoSpaceDN45); paragraphProperties45.Append(adjustRightIndent45); paragraphProperties45.Append(spacingBetweenLines31); paragraphProperties45.Append(paragraphMarkRunProperties45); Run run39 = new Run(); RunProperties runProperties39 = new RunProperties(); RunFonts runFonts84 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize84 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript84 = new FontSizeComplexScript() { Val = "16" }; runProperties39.Append(runFonts84); runProperties39.Append(fontSize84); runProperties39.Append(fontSizeComplexScript84); Text text39 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text39.Text = "Подпись пациента: "; run39.Append(runProperties39); run39.Append(text39); paragraph45.Append(paragraphProperties45); paragraph45.Append(run39); tableCell27.Append(tableCellProperties27); tableCell27.Append(paragraph45); TableCell tableCell28 = new TableCell(); TableCellProperties tableCellProperties28 = new TableCellProperties(); TableCellWidth tableCellWidth28 = new TableCellWidth() { Width = "2000", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders14 = new TableCellBorders(); TopBorder topBorder15 = new TopBorder() { Val = BorderValues.Nil }; LeftBorder leftBorder15 = new LeftBorder() { Val = BorderValues.Nil }; BottomBorder bottomBorder15 = new BottomBorder() { Val = BorderValues.Nil }; RightBorder rightBorder15 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders14.Append(topBorder15); tableCellBorders14.Append(leftBorder15); tableCellBorders14.Append(bottomBorder15); tableCellBorders14.Append(rightBorder15); tableCellProperties28.Append(tableCellWidth28); tableCellProperties28.Append(tableCellBorders14); Paragraph paragraph46 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties46 = new ParagraphProperties(); WidowControl widowControl46 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE46 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN46 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent46 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines32 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; Justification justification8 = new Justification() { Val = JustificationValues.Center }; ParagraphMarkRunProperties paragraphMarkRunProperties46 = new ParagraphMarkRunProperties(); RunFonts runFonts85 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize85 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript85 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties46.Append(runFonts85); paragraphMarkRunProperties46.Append(fontSize85); paragraphMarkRunProperties46.Append(fontSizeComplexScript85); paragraphProperties46.Append(widowControl46); paragraphProperties46.Append(autoSpaceDE46); paragraphProperties46.Append(autoSpaceDN46); paragraphProperties46.Append(adjustRightIndent46); paragraphProperties46.Append(spacingBetweenLines32); paragraphProperties46.Append(justification8); paragraphProperties46.Append(paragraphMarkRunProperties46); Run run40 = new Run(); RunProperties runProperties40 = new RunProperties(); RunFonts runFonts86 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize86 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript86 = new FontSizeComplexScript() { Val = "16" }; runProperties40.Append(runFonts86); runProperties40.Append(fontSize86); runProperties40.Append(fontSizeComplexScript86); Text text40 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text40.Text = "___________________ "; run40.Append(runProperties40); run40.Append(text40); paragraph46.Append(paragraphProperties46); paragraph46.Append(run40); tableCell28.Append(tableCellProperties28); tableCell28.Append(paragraph46); TableCell tableCell29 = new TableCell(); TableCellProperties tableCellProperties29 = new TableCellProperties(); TableCellWidth tableCellWidth29 = new TableCellWidth() { Width = "2500", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders15 = new TableCellBorders(); TopBorder topBorder16 = new TopBorder() { Val = BorderValues.Nil }; LeftBorder leftBorder16 = new LeftBorder() { Val = BorderValues.Nil }; BottomBorder bottomBorder16 = new BottomBorder() { Val = BorderValues.Nil }; RightBorder rightBorder16 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders15.Append(topBorder16); tableCellBorders15.Append(leftBorder16); tableCellBorders15.Append(bottomBorder16); tableCellBorders15.Append(rightBorder16); tableCellProperties29.Append(tableCellWidth29); tableCellProperties29.Append(tableCellBorders15); Paragraph paragraph47 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties47 = new ParagraphProperties(); WidowControl widowControl47 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE47 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN47 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent47 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines33 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; Justification justification9 = new Justification() { Val = JustificationValues.Center }; ParagraphMarkRunProperties paragraphMarkRunProperties47 = new ParagraphMarkRunProperties(); RunFonts runFonts87 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize87 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript87 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties47.Append(runFonts87); paragraphMarkRunProperties47.Append(fontSize87); paragraphMarkRunProperties47.Append(fontSizeComplexScript87); paragraphProperties47.Append(widowControl47); paragraphProperties47.Append(autoSpaceDE47); paragraphProperties47.Append(autoSpaceDN47); paragraphProperties47.Append(adjustRightIndent47); paragraphProperties47.Append(spacingBetweenLines33); paragraphProperties47.Append(justification9); paragraphProperties47.Append(paragraphMarkRunProperties47); Run run41 = new Run(); RunProperties runProperties41 = new RunProperties(); RunFonts runFonts88 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize88 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript88 = new FontSizeComplexScript() { Val = "16" }; runProperties41.Append(runFonts88); runProperties41.Append(fontSize88); runProperties41.Append(fontSizeComplexScript88); Text text41 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text41.Text = "("+obj.PatientFIO + ")"; run41.Append(runProperties41); run41.Append(text41); paragraph47.Append(paragraphProperties47); paragraph47.Append(run41); tableCell29.Append(tableCellProperties29); tableCell29.Append(paragraph47); TableCell tableCell30 = new TableCell(); TableCellProperties tableCellProperties30 = new TableCellProperties(); TableCellWidth tableCellWidth30 = new TableCellWidth() { Width = "3000", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders16 = new TableCellBorders(); TopBorder topBorder17 = new TopBorder() { Val = BorderValues.Nil }; LeftBorder leftBorder17 = new LeftBorder() { Val = BorderValues.Nil }; BottomBorder bottomBorder17 = new BottomBorder() { Val = BorderValues.Nil }; RightBorder rightBorder17 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders16.Append(topBorder17); tableCellBorders16.Append(leftBorder17); tableCellBorders16.Append(bottomBorder17); tableCellBorders16.Append(rightBorder17); tableCellProperties30.Append(tableCellWidth30); tableCellProperties30.Append(tableCellBorders16); Paragraph paragraph48 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00B819CE", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties48 = new ParagraphProperties(); WidowControl widowControl48 = new WidowControl() { Val = false }; AutoSpaceDE autoSpaceDE48 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN48 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent48 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines34 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphMarkRunProperties paragraphMarkRunProperties48 = new ParagraphMarkRunProperties(); RunFonts runFonts89 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize89 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript89 = new FontSizeComplexScript() { Val = "16" }; paragraphMarkRunProperties48.Append(runFonts89); paragraphMarkRunProperties48.Append(fontSize89); paragraphMarkRunProperties48.Append(fontSizeComplexScript89); paragraphProperties48.Append(widowControl48); paragraphProperties48.Append(autoSpaceDE48); paragraphProperties48.Append(autoSpaceDN48); paragraphProperties48.Append(adjustRightIndent48); paragraphProperties48.Append(spacingBetweenLines34); paragraphProperties48.Append(paragraphMarkRunProperties48); Run run42 = new Run(); RunProperties runProperties42 = new RunProperties(); RunFonts runFonts90 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" }; FontSize fontSize90 = new FontSize() { Val = "16" }; FontSizeComplexScript fontSizeComplexScript90 = new FontSizeComplexScript() { Val = "16" }; runProperties42.Append(runFonts90); runProperties42.Append(fontSize90); runProperties42.Append(fontSizeComplexScript90); Text text42 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text42.Text = "Дата: " + DateTime.Now; run42.Append(runProperties42); run42.Append(text42); paragraph48.Append(paragraphProperties48); paragraph48.Append(run42); tableCell30.Append(tableCellProperties30); tableCell30.Append(paragraph48); tableRow11.Append(tableRowProperties11); tableRow11.Append(tableCell27); tableRow11.Append(tableCell28); tableRow11.Append(tableCell29); tableRow11.Append(tableCell30); table4.Append(tableProperties4); table4.Append(tableGrid4); table4.Append(tableRow11); Paragraph paragraph49 = new Paragraph() { RsidParagraphAddition = "00900A10", RsidParagraphProperties = "00900A10", RsidRunAdditionDefault = "00900A10" }; Paragraph paragraph50 = new Paragraph() { RsidParagraphMarkRevision = "00900A10", RsidParagraphAddition = "00945FC6", RsidParagraphProperties = "00900A10", RsidRunAdditionDefault = "00945FC6" }; SectionProperties sectionProperties1 = new SectionProperties() { RsidRPr = "00900A10", RsidR = "00945FC6" }; HeaderReference headerReference1 = new HeaderReference() { Type = HeaderFooterValues.Default, Id = "rId7" }; FooterReference footerReference1 = new FooterReference() { Type = HeaderFooterValues.Default, Id = "rId8" }; PageSize pageSize1 = new PageSize() { Width = (UInt32Value)12240U, Height = (UInt32Value)15840U }; PageMargin pageMargin1 = new PageMargin() { Top = 1134, Right = (UInt32Value)850U, Bottom = 1134, Left = (UInt32Value)1701U, Header = (UInt32Value)720U, Footer = (UInt32Value)720U, Gutter = (UInt32Value)0U }; Columns columns1 = new Columns() { Space = "720" }; NoEndnote noEndnote1 = new NoEndnote(); sectionProperties1.Append(headerReference1); sectionProperties1.Append(footerReference1); sectionProperties1.Append(pageSize1); sectionProperties1.Append(pageMargin1); sectionProperties1.Append(columns1); sectionProperties1.Append(noEndnote1); body1.Append(paragraph1); body1.Append(paragraph2); body1.Append(paragraph3); body1.Append(paragraph4); body1.Append(table1); body1.Append(paragraph19); body1.Append(paragraph20); body1.Append(paragraph21); body1.Append(paragraph22); body1.Append(table2); body1.Append(paragraph31); body1.Append(paragraph32); body1.Append(paragraph33); body1.Append(paragraph34); body1.Append(table3); body1.Append(paragraph39); body1.Append(paragraph40); body1.Append(paragraph41); body1.Append(paragraph42); body1.Append(paragraph43); body1.Append(paragraph44); body1.Append(table4); body1.Append(paragraph49); body1.Append(paragraph50); body1.Append(sectionProperties1); document1.Append(body1); mainDocumentPart1.Document = document1; }
public static void GenerateFootnotesPart1Content(FootnotesPart footnotesPart1) { var footnotes1 = new Footnotes { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15 w16se w16cid wp14" } }; footnotes1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"); footnotes1.AddNamespaceDeclaration("cx", "http://schemas.microsoft.com/office/drawing/2014/chartex"); footnotes1.AddNamespaceDeclaration("cx1", "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex"); footnotes1.AddNamespaceDeclaration("cx2", "http://schemas.microsoft.com/office/drawing/2015/10/21/chartex"); footnotes1.AddNamespaceDeclaration("cx3", "http://schemas.microsoft.com/office/drawing/2016/5/9/chartex"); footnotes1.AddNamespaceDeclaration("cx4", "http://schemas.microsoft.com/office/drawing/2016/5/10/chartex"); footnotes1.AddNamespaceDeclaration("cx5", "http://schemas.microsoft.com/office/drawing/2016/5/11/chartex"); footnotes1.AddNamespaceDeclaration("cx6", "http://schemas.microsoft.com/office/drawing/2016/5/12/chartex"); footnotes1.AddNamespaceDeclaration("cx7", "http://schemas.microsoft.com/office/drawing/2016/5/13/chartex"); footnotes1.AddNamespaceDeclaration("cx8", "http://schemas.microsoft.com/office/drawing/2016/5/14/chartex"); footnotes1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); footnotes1.AddNamespaceDeclaration("aink", "http://schemas.microsoft.com/office/drawing/2016/ink"); footnotes1.AddNamespaceDeclaration("am3d", "http://schemas.microsoft.com/office/drawing/2017/model3d"); footnotes1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); footnotes1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); footnotes1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); footnotes1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); footnotes1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"); footnotes1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"); footnotes1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); footnotes1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); footnotes1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); footnotes1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml"); footnotes1.AddNamespaceDeclaration("w16cid", "http://schemas.microsoft.com/office/word/2016/wordml/cid"); footnotes1.AddNamespaceDeclaration("w16se", "http://schemas.microsoft.com/office/word/2015/wordml/symex"); footnotes1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"); footnotes1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk"); footnotes1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml"); footnotes1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"); var footnote1 = new Footnote { Type = FootnoteEndnoteValues.Separator, Id = -1 }; var paragraph274 = new Paragraph { RsidParagraphAddition = "003C529E", RsidRunAdditionDefault = "003C529E", ParagraphId = "46435F23", TextId = "77777777" }; var paragraphProperties177 = new ParagraphProperties(); var spacingBetweenLines173 = new SpacingBetweenLines { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; paragraphProperties177.Append(spacingBetweenLines173); var run403 = new Run(); var separatorMark2 = new SeparatorMark(); run403.Append(separatorMark2); paragraph274.Append(paragraphProperties177); paragraph274.Append(run403); footnote1.Append(paragraph274); var footnote2 = new Footnote { Type = FootnoteEndnoteValues.ContinuationSeparator, Id = 0 }; var paragraph275 = new Paragraph { RsidParagraphAddition = "003C529E", RsidRunAdditionDefault = "003C529E", ParagraphId = "69C342F4", TextId = "77777777" }; var paragraphProperties178 = new ParagraphProperties(); var spacingBetweenLines174 = new SpacingBetweenLines { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; paragraphProperties178.Append(spacingBetweenLines174); var run404 = new Run(); var continuationSeparatorMark2 = new ContinuationSeparatorMark(); run404.Append(continuationSeparatorMark2); paragraph275.Append(paragraphProperties178); paragraph275.Append(run404); footnote2.Append(paragraph275); footnotes1.Append(footnote1); footnotes1.Append(footnote2); footnotesPart1.Footnotes = footnotes1; }
public static void GenerateHeaderPart1Content(HeaderPart headerPart1, GenerationData data) { var header1 = new Header { MCAttributes = new MarkupCompatibilityAttributes { Ignorable = "w14 w15 w16se w16cid wp14" } }; header1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"); header1.AddNamespaceDeclaration("cx", "http://schemas.microsoft.com/office/drawing/2014/chartex"); header1.AddNamespaceDeclaration("cx1", "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex"); header1.AddNamespaceDeclaration("cx2", "http://schemas.microsoft.com/office/drawing/2015/10/21/chartex"); header1.AddNamespaceDeclaration("cx3", "http://schemas.microsoft.com/office/drawing/2016/5/9/chartex"); header1.AddNamespaceDeclaration("cx4", "http://schemas.microsoft.com/office/drawing/2016/5/10/chartex"); header1.AddNamespaceDeclaration("cx5", "http://schemas.microsoft.com/office/drawing/2016/5/11/chartex"); header1.AddNamespaceDeclaration("cx6", "http://schemas.microsoft.com/office/drawing/2016/5/12/chartex"); header1.AddNamespaceDeclaration("cx7", "http://schemas.microsoft.com/office/drawing/2016/5/13/chartex"); header1.AddNamespaceDeclaration("cx8", "http://schemas.microsoft.com/office/drawing/2016/5/14/chartex"); header1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); header1.AddNamespaceDeclaration("aink", "http://schemas.microsoft.com/office/drawing/2016/ink"); header1.AddNamespaceDeclaration("am3d", "http://schemas.microsoft.com/office/drawing/2017/model3d"); header1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); header1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); header1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); header1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); header1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"); header1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"); header1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); header1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); header1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); header1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml"); header1.AddNamespaceDeclaration("w16cid", "http://schemas.microsoft.com/office/word/2016/wordml/cid"); header1.AddNamespaceDeclaration("w16se", "http://schemas.microsoft.com/office/word/2015/wordml/symex"); header1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"); header1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk"); header1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml"); header1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"); var table12 = new Table(); var tableProperties12 = new TableProperties(); var tableWidth12 = new TableWidth { Width = "0", Type = TableWidthUnitValues.Auto }; var tableIndentation12 = new TableIndentation { Width = 10, Type = TableWidthUnitValues.Dxa }; var tableCellMarginDefault12 = new TableCellMarginDefault(); var tableCellLeftMargin12 = new TableCellLeftMargin { Width = 10, Type = TableWidthValues.Dxa }; var tableCellRightMargin12 = new TableCellRightMargin { Width = 10, Type = TableWidthValues.Dxa }; tableCellMarginDefault12.Append(tableCellLeftMargin12); tableCellMarginDefault12.Append(tableCellRightMargin12); var tableLook12 = new TableLook { Val = "0000" }; tableProperties12.Append(tableWidth12); tableProperties12.Append(tableIndentation12); tableProperties12.Append(tableCellMarginDefault12); tableProperties12.Append(tableLook12); var tableGrid12 = new TableGrid(); var gridColumn39 = new GridColumn { Width = "8980" }; tableGrid12.Append(gridColumn39); var tableRow79 = new TableRow { RsidTableRowAddition = "009B2C1D", ParagraphId = "07A74B1D", TextId = "77777777" }; var tableCell180 = new TableCell(); var tableCellProperties180 = new TableCellProperties(); var tableCellWidth180 = new TableCellWidth { Width = "9000", Type = TableWidthUnitValues.Dxa }; var shading8 = new Shading { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "1C75BC" }; tableCellProperties180.Append(tableCellWidth180); tableCellProperties180.Append(shading8); var paragraph276 = new Paragraph { RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "0007641E", ParagraphId = "7EE08DA7", TextId = "2A892E24" }; var paragraphProperties179 = new ParagraphProperties(); var spacingBetweenLines175 = new SpacingBetweenLines { Before = "10", After = "10" }; var justification13 = new Justification { Val = JustificationValues.Center }; paragraphProperties179.Append(spacingBetweenLines175); paragraphProperties179.Append(justification13); var run405 = new Run(); var runProperties395 = new RunProperties(); var bold57 = new Bold(); var caps1 = new Caps(); var color12 = new Color { Val = "FFFFFF" }; var fontSize370 = new FontSize { Val = "21" }; var fontSizeComplexScript367 = new FontSizeComplexScript { Val = "21" }; runProperties395.Append(bold57); runProperties395.Append(caps1); runProperties395.Append(color12); runProperties395.Append(fontSize370); runProperties395.Append(fontSizeComplexScript367); var text368 = new Text { Text = data.TitleArea.Name }; run405.Append(runProperties395); run405.Append(text368); paragraph276.Append(paragraphProperties179); paragraph276.Append(run405); tableCell180.Append(tableCellProperties180); tableCell180.Append(paragraph276); tableRow79.Append(tableCell180); table12.Append(tableProperties12); table12.Append(tableGrid12); table12.Append(tableRow79); header1.Append(table12); headerPart1.Header = header1; }
public void FillTableCell(int tableIndex, int colIndex, int rowIndex, TextBoxProps tbp) { Table table = doc.MainDocumentPart.Document.Body.Elements <Table>().ElementAt(tableIndex); // Find the second row in the table. TableRow row = table.Elements <TableRow>().ElementAt(rowIndex); // Find the third cell in the row. TableCell cell = row.Elements <TableCell>().ElementAt(colIndex); // Find the first paragraph in the table cell. Paragraph p = cell.Elements <Paragraph>().First(); Picture pict = new Picture(); DocumentFormat.OpenXml.Vml.Shape s = new DocumentFormat.OpenXml.Vml.Shape() { Style = "position:absolute;top:" + (tbp.y * 3.79).ToString() + ";left:" + (tbp.x * 4).ToString() + ";width:" + (tbp.width * 3.79).ToString() + ";height:" + (tbp.height * 3.79).ToString() + ";margin-left:0pt;margin-top:0pt;rotation:0;v-rotate-letters:true;mso-rotate:90", Filled = false, Stroked = false }; //DocumentFormat.OpenXml.Vml.Shapetype st = new DocumentFormat.OpenXml.Vml.Shapetype(); //st. DocumentFormat.OpenXml.Vml.TextBox tb = new DocumentFormat.OpenXml.Vml.TextBox() { Inset = "0,0,0,0" }; Paragraph par = new Paragraph(); ParagraphProperties paragraphProperties = new ParagraphProperties(); SpacingBetweenLines spacing = new SpacingBetweenLines() { Line = "240", LineRule = LineSpacingRuleValues.Auto, Before = "0", After = "0" }; paragraphProperties.Append(spacing); paragraphProperties.Append(new ParagraphStyleId() { Val = "No Spacing" }); par.Append(paragraphProperties); Run r = new Run(); RunProperties rPr = new RunProperties(new RunFonts() { HighAnsi = tbp.font.Name, Ascii = tbp.font.Name, ComplexScript = tbp.font.Name }, new FontSize() { Val = ((int)(tbp.font.Size * 2)).ToString() }, new DocumentFormat.OpenXml.Wordprocessing.Color() { Val = tbp.color.R.ToString("X2") + tbp.color.G.ToString("X2") + tbp.color.B.ToString("X2") }); // fontsize in half-points r.PrependChild <RunProperties>(rPr); r.Append(new Text(tbp.text)); par.Append(r); TextBoxContent tbc = new TextBoxContent(); tbc.Append(par); tb.Append(tbc); s.Append(tb); pict.Append(s); p.Append(new Run(pict)); // Set the text for the run. //Text t = r.Elements<Text>().First(); //t.Text = txt; }
//..................................................................... /// <summary> /// /// </summary> /// <returns></returns> private Paragraph MakeParaImage03( ) { Paragraph paragraph10 = new Paragraph( ) { RsidParagraphAddition = "00F8033B", RsidRunAdditionDefault = "00F8033B" }; ParagraphProperties paragraphProperties10 = new ParagraphProperties( ); ParagraphMarkRunProperties paragraphMarkRunProperties10 = new ParagraphMarkRunProperties( ); RunFonts runFonts15 = new RunFonts( ) { Hint = FontTypeHintValues.EastAsia }; paragraphMarkRunProperties10.Append(runFonts15); paragraphProperties10.Append(paragraphMarkRunProperties10); Run run6 = new Run( ); RunProperties runProperties6 = new RunProperties( ); RunFonts runFonts16 = new RunFonts( ) { Hint = FontTypeHintValues.EastAsia }; NoProof noProof3 = new NoProof( ); runProperties6.Append(runFonts16); runProperties6.Append(noProof3); Drawing drawing3 = new Drawing( ); Wp.Inline inline3 = new Wp.Inline( ) { DistanceFromTop = ( UInt32Value )0U, DistanceFromBottom = ( UInt32Value )0U, DistanceFromLeft = ( UInt32Value )0U, DistanceFromRight = ( UInt32Value )0U }; Wp.Extent extent3 = new Wp.Extent( ) { Cx = 1943371L, Cy = 1991003L }; Wp.EffectExtent effectExtent3 = new Wp.EffectExtent( ) { LeftEdge = 0L, TopEdge = 0L, RightEdge = 0L, BottomEdge = 9525L }; Wp.DocProperties docProperties3 = new Wp.DocProperties( ) { Id = ( UInt32Value )4U, Name = "图片 4" }; Wp.NonVisualGraphicFrameDrawingProperties nonVisualGraphicFrameDrawingProperties3 = new Wp.NonVisualGraphicFrameDrawingProperties( ); A.GraphicFrameLocks graphicFrameLocks3 = new A.GraphicFrameLocks( ) { NoChangeAspect = true }; graphicFrameLocks3.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); nonVisualGraphicFrameDrawingProperties3.Append(graphicFrameLocks3); A.Graphic graphic3 = new A.Graphic( ); graphic3.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); A.GraphicData graphicData3 = new A.GraphicData( ) { Uri = "http://schemas.openxmlformats.org/drawingml/2006/picture" }; Pic.Picture picture3 = new Pic.Picture( ); picture3.AddNamespaceDeclaration("pic", "http://schemas.openxmlformats.org/drawingml/2006/picture"); Pic.NonVisualPictureProperties nonVisualPictureProperties3 = new Pic.NonVisualPictureProperties( ); Pic.NonVisualDrawingProperties nonVisualDrawingProperties3 = new Pic.NonVisualDrawingProperties( ) { Id = ( UInt32Value )0U, Name = "test-pic3.png" }; Pic.NonVisualPictureDrawingProperties nonVisualPictureDrawingProperties3 = new Pic.NonVisualPictureDrawingProperties( ); nonVisualPictureProperties3.Append(nonVisualDrawingProperties3); nonVisualPictureProperties3.Append(nonVisualPictureDrawingProperties3); Pic.BlipFill blipFill3 = new Pic.BlipFill( ); A.Blip blip3 = new A.Blip( ) { Embed = "rId7" }; A.BlipExtensionList blipExtensionList3 = new A.BlipExtensionList( ); A.BlipExtension blipExtension3 = new A.BlipExtension( ) { Uri = "{28A0092B-C50C-407E-A947-70E740481C1C}" }; A14.UseLocalDpi useLocalDpi3 = new A14.UseLocalDpi( ) { Val = false }; useLocalDpi3.AddNamespaceDeclaration("a14", "http://schemas.microsoft.com/office/drawing/2010/main"); blipExtension3.Append(useLocalDpi3); blipExtensionList3.Append(blipExtension3); blip3.Append(blipExtensionList3); A.Stretch stretch3 = new A.Stretch( ); A.FillRectangle fillRectangle3 = new A.FillRectangle( ); stretch3.Append(fillRectangle3); blipFill3.Append(blip3); blipFill3.Append(stretch3); Pic.ShapeProperties shapeProperties3 = new Pic.ShapeProperties( ); A.Transform2D transform2D3 = new A.Transform2D( ); A.Offset offset3 = new A.Offset( ) { X = 0L, Y = 0L }; A.Extents extents3 = new A.Extents( ) { Cx = 1943371L, Cy = 1991003L }; transform2D3.Append(offset3); transform2D3.Append(extents3); A.PresetGeometry presetGeometry3 = new A.PresetGeometry( ) { Preset = A.ShapeTypeValues.Rectangle }; A.AdjustValueList adjustValueList3 = new A.AdjustValueList( ); presetGeometry3.Append(adjustValueList3); shapeProperties3.Append(transform2D3); shapeProperties3.Append(presetGeometry3); picture3.Append(nonVisualPictureProperties3); picture3.Append(blipFill3); picture3.Append(shapeProperties3); graphicData3.Append(picture3); graphic3.Append(graphicData3); inline3.Append(extent3); inline3.Append(effectExtent3); inline3.Append(docProperties3); inline3.Append(nonVisualGraphicFrameDrawingProperties3); inline3.Append(graphic3); drawing3.Append(inline3); run6.Append(runProperties6); run6.Append(drawing3); paragraph10.Append(paragraphProperties10); paragraph10.Append(run6); return(paragraph10); }
/// <summary> /// Adding Table to document /// </summary> /// <param name="text">Segment text</param> /// <param name="style">Name of Segment style</param> public void AddTable(int Cols, int Rows, int cellHeight = 0, int cellWidth = 0) { // Create an empty table. Table table = new Table(); // Create a TableProperties object and specify its border information. TableProperties tblProp = new TableProperties( new TableBorders( new TopBorder() { Val = new EnumValue <BorderValues>(BorderValues.None), Size = 1 }, new BottomBorder() { Val = new EnumValue <BorderValues>(BorderValues.None), Size = 1 }, new LeftBorder() { Val = new EnumValue <BorderValues>(BorderValues.None), Size = 1 }, new RightBorder() { Val = new EnumValue <BorderValues>(BorderValues.None), Size = 1 }, new InsideHorizontalBorder() { Val = new EnumValue <BorderValues>(BorderValues.None), Size = 1 }, new InsideVerticalBorder() { Val = new EnumValue <BorderValues>(BorderValues.None), Size = 1 } ), new TableJustification() { Val = TableRowAlignmentValues.Center } ); // Append the TableProperties object to the empty table. table.AppendChild <TableProperties>(tblProp); TableRow tr; TableCell tc; for (int i = 0; i < Rows; i++) { if (cellHeight > 0) { tr = new TableRow(new TableRowProperties(new TableRowHeight() { Val = (UInt32Value)(cellHeight * 50.8 + 1) })); } else { tr = new TableRow(); } tr.Append(); for (int j = 0; j < Cols; j++) { tc = new TableCell(); // Specify the width property of the table cell. if (cellWidth > 0) { tc.Append(new TableCellProperties(new TableCellWidth() { Type = TableWidthUnitValues.Dxa, Width = (cellWidth * 50.8 + 1).ToString() })); } else { tc.Append(new TableCellProperties(new TableCellWidth() { Type = TableWidthUnitValues.Dxa, Width = "2400" })); } SpacingBetweenLines spacing = new SpacingBetweenLines() { Line = "240", LineRule = LineSpacingRuleValues.Auto, Before = "0", After = "0" }; ParagraphProperties paragraphProperties = new ParagraphProperties(); Paragraph paragraph = new Paragraph(); paragraphProperties.Append(spacing); paragraphProperties.Append(new ParagraphStyleId() { Val = "No Spacing" }); paragraph.Append(paragraphProperties); paragraph.Append(new Run(new Text(""))); tc.Append(paragraph); tr.Append(tc); } table.Append(tr); } doc.MainDocumentPart.Document.Body.Append(table); // Specify the table cell content. //tc1.Append(new Paragraph(new Run(new Text("Hello, World!")))); //tc1.Append(new Paragraph(new Run(element))); // ------------ // Create a second table cell by copying the OuterXml value of the first table cell. //TableCell tc2 = new TableCell(tc1.OuterXml); // ----- Create new Paragraph ----- /*Paragraph p = newParagraph(text, style); * * Table t = new Table() * * doc.MainDocumentPart.Document.Body.AppendChild(p); * * // ----- Create new Paragraf ----- * Paragraf parItem = _newParagraf(p); // create new Paragraf * List.Add(parItem);*/ }
//..................................................................... /// <summary> /// /// </summary> /// <returns></returns> private Paragraph MakeParaImage01( ) { Paragraph paragraph2 = new Paragraph( ) { RsidParagraphAddition = "00F8033B", RsidRunAdditionDefault = "00F8033B" }; ParagraphProperties paragraphProperties2 = new ParagraphProperties( ); ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties( ); RunFonts runFonts3 = new RunFonts( ) { Hint = FontTypeHintValues.EastAsia }; paragraphMarkRunProperties2.Append(runFonts3); paragraphProperties2.Append(paragraphMarkRunProperties2); BookmarkStart bookmarkStart1 = new BookmarkStart( ) { Name = "_GoBack", Id = "0" }; Run run2 = new Run( ); RunProperties runProperties2 = new RunProperties( ); RunFonts runFonts4 = new RunFonts( ) { Hint = FontTypeHintValues.EastAsia }; NoProof noProof1 = new NoProof( ); runProperties2.Append(runFonts4); runProperties2.Append(noProof1); Drawing drawing1 = new Drawing( ); Wp.Inline inline1 = new Wp.Inline( ) { DistanceFromTop = ( UInt32Value )0U, DistanceFromBottom = ( UInt32Value )0U, DistanceFromLeft = ( UInt32Value )0U, DistanceFromRight = ( UInt32Value )0U }; Wp.Extent extent1 = new Wp.Extent( ) { Cx = 2048161L, Cy = 3029373L }; Wp.EffectExtent effectExtent1 = new Wp.EffectExtent( ) { LeftEdge = 0L, TopEdge = 0L, RightEdge = 9525L, BottomEdge = 0L }; Wp.DocProperties docProperties1 = new Wp.DocProperties( ) { Id = ( UInt32Value )2U, Name = "图片 2" }; Wp.NonVisualGraphicFrameDrawingProperties nonVisualGraphicFrameDrawingProperties1 = new Wp.NonVisualGraphicFrameDrawingProperties( ); A.GraphicFrameLocks graphicFrameLocks1 = new A.GraphicFrameLocks( ) { NoChangeAspect = true }; graphicFrameLocks1.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); nonVisualGraphicFrameDrawingProperties1.Append(graphicFrameLocks1); A.Graphic graphic1 = new A.Graphic( ); graphic1.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); A.GraphicData graphicData1 = new A.GraphicData( ) { Uri = "http://schemas.openxmlformats.org/drawingml/2006/picture" }; Pic.Picture picture1 = new Pic.Picture( ); picture1.AddNamespaceDeclaration("pic", "http://schemas.openxmlformats.org/drawingml/2006/picture"); Pic.NonVisualPictureProperties nonVisualPictureProperties1 = new Pic.NonVisualPictureProperties( ); Pic.NonVisualDrawingProperties nonVisualDrawingProperties1 = new Pic.NonVisualDrawingProperties( ) { Id = ( UInt32Value )0U, Name = "test-pic1.png" }; Pic.NonVisualPictureDrawingProperties nonVisualPictureDrawingProperties1 = new Pic.NonVisualPictureDrawingProperties( ); nonVisualPictureProperties1.Append(nonVisualDrawingProperties1); nonVisualPictureProperties1.Append(nonVisualPictureDrawingProperties1); Pic.BlipFill blipFill1 = new Pic.BlipFill( ); A.Blip blip1 = new A.Blip( ) { Embed = "rId5" }; A.BlipExtensionList blipExtensionList1 = new A.BlipExtensionList( ); A.BlipExtension blipExtension1 = new A.BlipExtension( ) { Uri = "{28A0092B-C50C-407E-A947-70E740481C1C}" }; A14.UseLocalDpi useLocalDpi1 = new A14.UseLocalDpi( ) { Val = false }; useLocalDpi1.AddNamespaceDeclaration("a14", "http://schemas.microsoft.com/office/drawing/2010/main"); blipExtension1.Append(useLocalDpi1); blipExtensionList1.Append(blipExtension1); blip1.Append(blipExtensionList1); A.Stretch stretch1 = new A.Stretch( ); A.FillRectangle fillRectangle1 = new A.FillRectangle( ); stretch1.Append(fillRectangle1); blipFill1.Append(blip1); blipFill1.Append(stretch1); Pic.ShapeProperties shapeProperties1 = new Pic.ShapeProperties( ); A.Transform2D transform2D1 = new A.Transform2D( ); A.Offset offset1 = new A.Offset( ) { X = 0L, Y = 0L }; A.Extents extents1 = new A.Extents( ) { Cx = 2048161L, Cy = 3029373L }; transform2D1.Append(offset1); transform2D1.Append(extents1); A.PresetGeometry presetGeometry1 = new A.PresetGeometry( ) { Preset = A.ShapeTypeValues.Rectangle }; A.AdjustValueList adjustValueList1 = new A.AdjustValueList( ); presetGeometry1.Append(adjustValueList1); shapeProperties1.Append(transform2D1); shapeProperties1.Append(presetGeometry1); picture1.Append(nonVisualPictureProperties1); picture1.Append(blipFill1); picture1.Append(shapeProperties1); graphicData1.Append(picture1); graphic1.Append(graphicData1); inline1.Append(extent1); inline1.Append(effectExtent1); inline1.Append(docProperties1); inline1.Append(nonVisualGraphicFrameDrawingProperties1); inline1.Append(graphic1); drawing1.Append(inline1); run2.Append(runProperties2); run2.Append(drawing1); BookmarkEnd bookmarkEnd1 = new BookmarkEnd( ) { Id = "0" }; paragraph2.Append(paragraphProperties2); paragraph2.Append(bookmarkStart1); paragraph2.Append(run2); paragraph2.Append(bookmarkEnd1); return(paragraph2); }
// Generates content of mainDocumentPart1. private void GenerateMainDocumentPart1Content(MainDocumentPart mainDocumentPart1) { Document document1 = new Document() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15 wp14" } }; document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"); document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"); document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"); document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); document1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml"); document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"); document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk"); document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml"); document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"); Body body1 = new Body(); Paragraph paragraph1 = new Paragraph() { RsidParagraphMarkRevision = "00AB286F", RsidParagraphAddition = "00BC116E", RsidParagraphProperties = "00BC116E", RsidRunAdditionDefault = "00BC116E" }; ParagraphProperties paragraphProperties1 = new ParagraphProperties(); ParagraphBorders paragraphBorders1 = new ParagraphBorders(); BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)1U }; paragraphBorders1.Append(bottomBorder1); ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties(); RunFonts runFonts1 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold1 = new Bold(); FontSize fontSize1 = new FontSize() { Val = "26" }; paragraphMarkRunProperties1.Append(runFonts1); paragraphMarkRunProperties1.Append(bold1); paragraphMarkRunProperties1.Append(fontSize1); paragraphProperties1.Append(paragraphBorders1); paragraphProperties1.Append(paragraphMarkRunProperties1); Run run1 = new Run() { RsidRunProperties = "00AB286F" }; RunProperties runProperties1 = new RunProperties(); RunFonts runFonts2 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold2 = new Bold(); FontSize fontSize2 = new FontSize() { Val = "26" }; runProperties1.Append(runFonts2); runProperties1.Append(bold2); runProperties1.Append(fontSize2); Text text1 = new Text(); text1.Text = "Monthly Freight Report"; run1.Append(runProperties1); run1.Append(text1); Run run2 = new Run() { RsidRunAddition = "00D26AC8" }; RunProperties runProperties2 = new RunProperties(); RunFonts runFonts3 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold3 = new Bold(); FontSize fontSize3 = new FontSize() { Val = "26" }; runProperties2.Append(runFonts3); runProperties2.Append(bold3); runProperties2.Append(fontSize3); Text text2 = new Text(); text2.Text = ": " + title; run2.Append(runProperties2); run2.Append(text2); paragraph1.Append(paragraphProperties1); paragraph1.Append(run1); paragraph1.Append(run2); Paragraph paragraph2 = new Paragraph() { RsidParagraphMarkRevision = "004C4FC4", RsidParagraphAddition = "00BC116E", RsidRunAdditionDefault = "00BC116E" }; ParagraphProperties paragraphProperties2 = new ParagraphProperties(); ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties(); RunFonts runFonts4 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; paragraphMarkRunProperties2.Append(runFonts4); paragraphProperties2.Append(paragraphMarkRunProperties2); paragraph2.Append(paragraphProperties2); Table table1 = new Table(); TableProperties tableProperties1 = new TableProperties(); TableStyle tableStyle1 = new TableStyle() { Val = "TableGrid" }; TableWidth tableWidth1 = new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto }; TableBorders tableBorders1 = new TableBorders(); LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; tableBorders1.Append(leftBorder1); tableBorders1.Append(rightBorder1); TableLook tableLook1 = new TableLook() { Val = "04A0", FirstRow = true, LastRow = false, FirstColumn = true, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = true }; tableProperties1.Append(tableStyle1); tableProperties1.Append(tableWidth1); tableProperties1.Append(tableBorders1); tableProperties1.Append(tableLook1); TableGrid tableGrid1 = new TableGrid(); GridColumn gridColumn1 = new GridColumn() { Width = "2254" }; GridColumn gridColumn2 = new GridColumn() { Width = "2254" }; GridColumn gridColumn3 = new GridColumn() { Width = "2254" }; GridColumn gridColumn4 = new GridColumn() { Width = "2254" }; tableGrid1.Append(gridColumn1); tableGrid1.Append(gridColumn2); tableGrid1.Append(gridColumn3); tableGrid1.Append(gridColumn4); TableRow tableRow1 = new TableRow() { RsidTableRowMarkRevision = "004C4FC4", RsidTableRowAddition = "00BC116E", RsidTableRowProperties = "00962641" }; TableCell tableCell1 = new TableCell(); TableCellProperties tableCellProperties1 = new TableCellProperties(); TableCellWidth tableCellWidth1 = new TableCellWidth() { Width = "2254", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders1 = new TableCellBorders(); TopBorder topBorder1 = new TopBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U }; LeftBorder leftBorder2 = new LeftBorder() { Val = BorderValues.Nil }; BottomBorder bottomBorder2 = new BottomBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U }; RightBorder rightBorder2 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders1.Append(topBorder1); tableCellBorders1.Append(leftBorder2); tableCellBorders1.Append(bottomBorder2); tableCellBorders1.Append(rightBorder2); tableCellProperties1.Append(tableCellWidth1); tableCellProperties1.Append(tableCellBorders1); Paragraph paragraph3 = new Paragraph() { RsidParagraphMarkRevision = "004C4FC4", RsidParagraphAddition = "00BC116E", RsidParagraphProperties = "00962641", RsidRunAdditionDefault = "00BC116E" }; ParagraphProperties paragraphProperties3 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { Before = "60", After = "60" }; ParagraphMarkRunProperties paragraphMarkRunProperties3 = new ParagraphMarkRunProperties(); RunFonts runFonts5 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold4 = new Bold(); paragraphMarkRunProperties3.Append(runFonts5); paragraphMarkRunProperties3.Append(bold4); paragraphProperties3.Append(spacingBetweenLines1); paragraphProperties3.Append(paragraphMarkRunProperties3); Run run3 = new Run() { RsidRunProperties = "004C4FC4" }; RunProperties runProperties3 = new RunProperties(); RunFonts runFonts6 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold5 = new Bold(); runProperties3.Append(runFonts6); runProperties3.Append(bold5); Text text3 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text3.Text = "Invoice Date "; run3.Append(runProperties3); run3.Append(text3); paragraph3.Append(paragraphProperties3); paragraph3.Append(run3); tableCell1.Append(tableCellProperties1); tableCell1.Append(paragraph3); TableCell tableCell2 = new TableCell(); TableCellProperties tableCellProperties2 = new TableCellProperties(); TableCellWidth tableCellWidth2 = new TableCellWidth() { Width = "2254", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders2 = new TableCellBorders(); TopBorder topBorder2 = new TopBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U }; LeftBorder leftBorder3 = new LeftBorder() { Val = BorderValues.Nil }; BottomBorder bottomBorder3 = new BottomBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U }; RightBorder rightBorder3 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders2.Append(topBorder2); tableCellBorders2.Append(leftBorder3); tableCellBorders2.Append(bottomBorder3); tableCellBorders2.Append(rightBorder3); tableCellProperties2.Append(tableCellWidth2); tableCellProperties2.Append(tableCellBorders2); Paragraph paragraph4 = new Paragraph() { RsidParagraphMarkRevision = "004C4FC4", RsidParagraphAddition = "00BC116E", RsidParagraphProperties = "00962641", RsidRunAdditionDefault = "00BC116E" }; ParagraphProperties paragraphProperties4 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines2 = new SpacingBetweenLines() { Before = "60", After = "60" }; ParagraphMarkRunProperties paragraphMarkRunProperties4 = new ParagraphMarkRunProperties(); RunFonts runFonts7 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold6 = new Bold(); paragraphMarkRunProperties4.Append(runFonts7); paragraphMarkRunProperties4.Append(bold6); paragraphProperties4.Append(spacingBetweenLines2); paragraphProperties4.Append(paragraphMarkRunProperties4); Run run4 = new Run() { RsidRunProperties = "004C4FC4" }; RunProperties runProperties4 = new RunProperties(); RunFonts runFonts8 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold7 = new Bold(); runProperties4.Append(runFonts8); runProperties4.Append(bold7); Text text4 = new Text(); text4.Text = "Invoice Number"; run4.Append(runProperties4); run4.Append(text4); paragraph4.Append(paragraphProperties4); paragraph4.Append(run4); tableCell2.Append(tableCellProperties2); tableCell2.Append(paragraph4); TableCell tableCell3 = new TableCell(); TableCellProperties tableCellProperties3 = new TableCellProperties(); TableCellWidth tableCellWidth3 = new TableCellWidth() { Width = "2254", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders3 = new TableCellBorders(); TopBorder topBorder3 = new TopBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U }; LeftBorder leftBorder4 = new LeftBorder() { Val = BorderValues.Nil }; BottomBorder bottomBorder4 = new BottomBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U }; RightBorder rightBorder4 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders3.Append(topBorder3); tableCellBorders3.Append(leftBorder4); tableCellBorders3.Append(bottomBorder4); tableCellBorders3.Append(rightBorder4); tableCellProperties3.Append(tableCellWidth3); tableCellProperties3.Append(tableCellBorders3); Paragraph paragraph5 = new Paragraph() { RsidParagraphMarkRevision = "004C4FC4", RsidParagraphAddition = "00BC116E", RsidParagraphProperties = "00962641", RsidRunAdditionDefault = "00BC116E" }; ParagraphProperties paragraphProperties5 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines3 = new SpacingBetweenLines() { Before = "60", After = "60" }; Justification justification1 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties5 = new ParagraphMarkRunProperties(); RunFonts runFonts9 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold8 = new Bold(); paragraphMarkRunProperties5.Append(runFonts9); paragraphMarkRunProperties5.Append(bold8); paragraphProperties5.Append(spacingBetweenLines3); paragraphProperties5.Append(justification1); paragraphProperties5.Append(paragraphMarkRunProperties5); Run run5 = new Run() { RsidRunProperties = "004C4FC4" }; RunProperties runProperties5 = new RunProperties(); RunFonts runFonts10 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold9 = new Bold(); runProperties5.Append(runFonts10); runProperties5.Append(bold9); Text text5 = new Text(); text5.Text = "Country"; run5.Append(runProperties5); run5.Append(text5); paragraph5.Append(paragraphProperties5); paragraph5.Append(run5); tableCell3.Append(tableCellProperties3); tableCell3.Append(paragraph5); TableCell tableCell4 = new TableCell(); TableCellProperties tableCellProperties4 = new TableCellProperties(); TableCellWidth tableCellWidth4 = new TableCellWidth() { Width = "2254", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders4 = new TableCellBorders(); TopBorder topBorder4 = new TopBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U }; LeftBorder leftBorder5 = new LeftBorder() { Val = BorderValues.Nil }; BottomBorder bottomBorder5 = new BottomBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U }; RightBorder rightBorder5 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders4.Append(topBorder4); tableCellBorders4.Append(leftBorder5); tableCellBorders4.Append(bottomBorder5); tableCellBorders4.Append(rightBorder5); tableCellProperties4.Append(tableCellWidth4); tableCellProperties4.Append(tableCellBorders4); Paragraph paragraph6 = new Paragraph() { RsidParagraphMarkRevision = "004C4FC4", RsidParagraphAddition = "00BC116E", RsidParagraphProperties = "00962641", RsidRunAdditionDefault = "00BC116E" }; ParagraphProperties paragraphProperties6 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines4 = new SpacingBetweenLines() { Before = "60", After = "60" }; Justification justification2 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties6 = new ParagraphMarkRunProperties(); RunFonts runFonts11 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold10 = new Bold(); paragraphMarkRunProperties6.Append(runFonts11); paragraphMarkRunProperties6.Append(bold10); paragraphProperties6.Append(spacingBetweenLines4); paragraphProperties6.Append(justification2); paragraphProperties6.Append(paragraphMarkRunProperties6); Run run6 = new Run() { RsidRunProperties = "004C4FC4" }; RunProperties runProperties6 = new RunProperties(); RunFonts runFonts12 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold11 = new Bold(); runProperties6.Append(runFonts12); runProperties6.Append(bold11); Text text6 = new Text(); text6.Text = "Freight Cost"; run6.Append(runProperties6); run6.Append(text6); paragraph6.Append(paragraphProperties6); paragraph6.Append(run6); tableCell4.Append(tableCellProperties4); tableCell4.Append(paragraph6); tableRow1.Append(tableCell1); tableRow1.Append(tableCell2); tableRow1.Append(tableCell3); tableRow1.Append(tableCell4); table1.Append(tableProperties1); table1.Append(tableGrid1); table1.Append(tableRow1); /**************************** Start loop *************************************/ foreach (Order o in orders) { TableRow tableRow = new TableRow() { RsidTableRowMarkRevision = "004C4FC4", RsidTableRowAddition = "00BC116E", RsidTableRowProperties = "00962641" }; TableCell tableCell5 = new TableCell(); TableCellProperties tableCellProperties5 = new TableCellProperties(); TableCellWidth tableCellWidth5 = new TableCellWidth() { Width = "2254", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders5 = new TableCellBorders(); TopBorder topBorder5 = new TopBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U }; RightBorder rightBorder6 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders5.Append(topBorder5); tableCellBorders5.Append(rightBorder6); tableCellProperties5.Append(tableCellWidth5); tableCellProperties5.Append(tableCellBorders5); Paragraph paragraph7 = new Paragraph() { RsidParagraphMarkRevision = "004C4FC4", RsidParagraphAddition = "00BC116E", RsidParagraphProperties = "00962641", RsidRunAdditionDefault = "00BC116E" }; ParagraphProperties paragraphProperties7 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines5 = new SpacingBetweenLines() { Before = "60", After = "60" }; ParagraphMarkRunProperties paragraphMarkRunProperties7 = new ParagraphMarkRunProperties(); RunFonts runFonts13 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize4 = new FontSize() { Val = "20" }; paragraphMarkRunProperties7.Append(runFonts13); paragraphMarkRunProperties7.Append(fontSize4); paragraphProperties7.Append(spacingBetweenLines5); paragraphProperties7.Append(paragraphMarkRunProperties7); Run run7 = new Run() { RsidRunProperties = "004C4FC4" }; RunProperties runProperties7 = new RunProperties(); RunFonts runFonts14 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize5 = new FontSize() { Val = "20" }; runProperties7.Append(runFonts14); runProperties7.Append(fontSize5); //Invoice Date Text text7 = new Text(); text7.Text = o.invoiceDate.ToString("dd/MM/yyyy"); run7.Append(runProperties7); run7.Append(text7); paragraph7.Append(paragraphProperties7); paragraph7.Append(run7); tableCell5.Append(tableCellProperties5); tableCell5.Append(paragraph7); TableCell tableCell6 = new TableCell(); TableCellProperties tableCellProperties6 = new TableCellProperties(); TableCellWidth tableCellWidth6 = new TableCellWidth() { Width = "2254", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders6 = new TableCellBorders(); TopBorder topBorder6 = new TopBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U }; LeftBorder leftBorder6 = new LeftBorder() { Val = BorderValues.Nil }; RightBorder rightBorder7 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders6.Append(topBorder6); tableCellBorders6.Append(leftBorder6); tableCellBorders6.Append(rightBorder7); tableCellProperties6.Append(tableCellWidth6); tableCellProperties6.Append(tableCellBorders6); Paragraph paragraph8 = new Paragraph() { RsidParagraphMarkRevision = "004C4FC4", RsidParagraphAddition = "00BC116E", RsidParagraphProperties = "00962641", RsidRunAdditionDefault = "00BC116E" }; ParagraphProperties paragraphProperties8 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines6 = new SpacingBetweenLines() { Before = "60", After = "60" }; ParagraphMarkRunProperties paragraphMarkRunProperties8 = new ParagraphMarkRunProperties(); RunFonts runFonts15 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize6 = new FontSize() { Val = "20" }; paragraphMarkRunProperties8.Append(runFonts15); paragraphMarkRunProperties8.Append(fontSize6); paragraphProperties8.Append(spacingBetweenLines6); paragraphProperties8.Append(paragraphMarkRunProperties8); Run run8 = new Run() { RsidRunProperties = "004C4FC4" }; RunProperties runProperties8 = new RunProperties(); RunFonts runFonts16 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize7 = new FontSize() { Val = "20" }; runProperties8.Append(runFonts16); runProperties8.Append(fontSize7); Text text8 = new Text(); //Invoice Number text8.Text = o.invoiceNo.ToString(); run8.Append(runProperties8); run8.Append(text8); paragraph8.Append(paragraphProperties8); paragraph8.Append(run8); tableCell6.Append(tableCellProperties6); tableCell6.Append(paragraph8); TableCell tableCell7 = new TableCell(); TableCellProperties tableCellProperties7 = new TableCellProperties(); TableCellWidth tableCellWidth7 = new TableCellWidth() { Width = "2254", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders7 = new TableCellBorders(); TopBorder topBorder7 = new TopBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U }; LeftBorder leftBorder7 = new LeftBorder() { Val = BorderValues.Nil }; RightBorder rightBorder8 = new RightBorder() { Val = BorderValues.Nil }; tableCellBorders7.Append(topBorder7); tableCellBorders7.Append(leftBorder7); tableCellBorders7.Append(rightBorder8); tableCellProperties7.Append(tableCellWidth7); tableCellProperties7.Append(tableCellBorders7); Paragraph paragraph9 = new Paragraph() { RsidParagraphMarkRevision = "004C4FC4", RsidParagraphAddition = "00BC116E", RsidParagraphProperties = "00962641", RsidRunAdditionDefault = "00BC116E" }; ParagraphProperties paragraphProperties9 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines7 = new SpacingBetweenLines() { Before = "60", After = "60" }; Justification justification3 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties9 = new ParagraphMarkRunProperties(); RunFonts runFonts17 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize8 = new FontSize() { Val = "20" }; paragraphMarkRunProperties9.Append(runFonts17); paragraphMarkRunProperties9.Append(fontSize8); paragraphProperties9.Append(spacingBetweenLines7); paragraphProperties9.Append(justification3); paragraphProperties9.Append(paragraphMarkRunProperties9); Run run9 = new Run() { RsidRunProperties = "004C4FC4" }; RunProperties runProperties9 = new RunProperties(); RunFonts runFonts18 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize9 = new FontSize() { Val = "20" }; runProperties9.Append(runFonts18); runProperties9.Append(fontSize9); Text text9 = new Text(); //Country Customer cust = dbManager.searchCustomers(o.customerID); if (cust != null) text9.Text = cust.country; else text9.Text = ""; run9.Append(runProperties9); run9.Append(text9); paragraph9.Append(paragraphProperties9); paragraph9.Append(run9); tableCell7.Append(tableCellProperties7); tableCell7.Append(paragraph9); TableCell tableCell8 = new TableCell(); TableCellProperties tableCellProperties8 = new TableCellProperties(); TableCellWidth tableCellWidth8 = new TableCellWidth() { Width = "2254", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders8 = new TableCellBorders(); TopBorder topBorder8 = new TopBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U }; LeftBorder leftBorder8 = new LeftBorder() { Val = BorderValues.Nil }; tableCellBorders8.Append(topBorder8); tableCellBorders8.Append(leftBorder8); tableCellProperties8.Append(tableCellWidth8); tableCellProperties8.Append(tableCellBorders8); Paragraph paragraph10 = new Paragraph() { RsidParagraphMarkRevision = "004C4FC4", RsidParagraphAddition = "00BC116E", RsidParagraphProperties = "00962641", RsidRunAdditionDefault = "00BC116E" }; ParagraphProperties paragraphProperties10 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines8 = new SpacingBetweenLines() { Before = "60", After = "60" }; Justification justification4 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties10 = new ParagraphMarkRunProperties(); RunFonts runFonts19 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize10 = new FontSize() { Val = "20" }; paragraphMarkRunProperties10.Append(runFonts19); paragraphMarkRunProperties10.Append(fontSize10); paragraphProperties10.Append(spacingBetweenLines8); paragraphProperties10.Append(justification4); paragraphProperties10.Append(paragraphMarkRunProperties10); Run run10 = new Run() { RsidRunProperties = "004C4FC4" }; RunProperties runProperties10 = new RunProperties(); RunFonts runFonts20 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize11 = new FontSize() { Val = "20" }; runProperties10.Append(runFonts20); runProperties10.Append(fontSize11); Text text10 = new Text(); //Freight cost text10.Text = "$" + String.Format("{0:0.00}", o.freightCost); //Add to grand total grandTotal += o.freightCost; run10.Append(runProperties10); run10.Append(text10); paragraph10.Append(paragraphProperties10); paragraph10.Append(run10); tableCell8.Append(tableCellProperties8); tableCell8.Append(paragraph10); tableRow.Append(tableCell5); tableRow.Append(tableCell6); tableRow.Append(tableCell7); tableRow.Append(tableCell8); table1.Append(tableRow); } /**************************** End loop ***********************************/ Paragraph paragraph11 = new Paragraph() { RsidParagraphAddition = "00BC116E", RsidRunAdditionDefault = "00BC116E" }; ParagraphProperties paragraphProperties11 = new ParagraphProperties(); ParagraphMarkRunProperties paragraphMarkRunProperties11 = new ParagraphMarkRunProperties(); RunFonts runFonts21 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; paragraphMarkRunProperties11.Append(runFonts21); paragraphProperties11.Append(paragraphMarkRunProperties11); paragraph11.Append(paragraphProperties11); Table table2 = new Table(); TableProperties tableProperties2 = new TableProperties(); TableStyle tableStyle2 = new TableStyle() { Val = "TableGrid" }; TableWidth tableWidth2 = new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto }; TableIndentation tableIndentation1 = new TableIndentation() { Width = 4673, Type = TableWidthUnitValues.Dxa }; TableBorders tableBorders2 = new TableBorders(); TopBorder topBorder9 = new TopBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; LeftBorder leftBorder9 = new LeftBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; BottomBorder bottomBorder6 = new BottomBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; RightBorder rightBorder9 = new RightBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; tableBorders2.Append(topBorder9); tableBorders2.Append(leftBorder9); tableBorders2.Append(bottomBorder6); tableBorders2.Append(rightBorder9); tableBorders2.Append(insideHorizontalBorder1); tableBorders2.Append(insideVerticalBorder1); TableLook tableLook2 = new TableLook() { Val = "04A0", FirstRow = true, LastRow = false, FirstColumn = true, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = true }; tableProperties2.Append(tableStyle2); tableProperties2.Append(tableWidth2); tableProperties2.Append(tableIndentation1); tableProperties2.Append(tableBorders2); tableProperties2.Append(tableLook2); TableGrid tableGrid2 = new TableGrid(); GridColumn gridColumn5 = new GridColumn() { Width = "1985" }; GridColumn gridColumn6 = new GridColumn() { Width = "2358" }; tableGrid2.Append(gridColumn5); tableGrid2.Append(gridColumn6); TableRow tableRow3 = new TableRow() { RsidTableRowAddition = "00FF01F2", RsidTableRowProperties = "00FF01F2" }; TableCell tableCell9 = new TableCell(); TableCellProperties tableCellProperties9 = new TableCellProperties(); TableCellWidth tableCellWidth9 = new TableCellWidth() { Width = "1985", Type = TableWidthUnitValues.Dxa }; tableCellProperties9.Append(tableCellWidth9); Paragraph paragraph12 = new Paragraph() { RsidParagraphMarkRevision = "00370D51", RsidParagraphAddition = "00FF01F2", RsidParagraphProperties = "00FF01F2", RsidRunAdditionDefault = "00FF01F2" }; ParagraphProperties paragraphProperties12 = new ParagraphProperties(); Justification justification5 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties12 = new ParagraphMarkRunProperties(); RunFonts runFonts22 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold12 = new Bold(); paragraphMarkRunProperties12.Append(runFonts22); paragraphMarkRunProperties12.Append(bold12); paragraphProperties12.Append(justification5); paragraphProperties12.Append(paragraphMarkRunProperties12); Run run11 = new Run() { RsidRunProperties = "00370D51" }; RunProperties runProperties11 = new RunProperties(); RunFonts runFonts23 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold13 = new Bold(); runProperties11.Append(runFonts23); runProperties11.Append(bold13); Text text11 = new Text(); text11.Text = "Grand Total:"; run11.Append(runProperties11); run11.Append(text11); paragraph12.Append(paragraphProperties12); paragraph12.Append(run11); tableCell9.Append(tableCellProperties9); tableCell9.Append(paragraph12); TableCell tableCell10 = new TableCell(); TableCellProperties tableCellProperties10 = new TableCellProperties(); TableCellWidth tableCellWidth10 = new TableCellWidth() { Width = "2358", Type = TableWidthUnitValues.Dxa }; tableCellProperties10.Append(tableCellWidth10); Paragraph paragraph13 = new Paragraph() { RsidParagraphMarkRevision = "00370D51", RsidParagraphAddition = "00FF01F2", RsidParagraphProperties = "00FF01F2", RsidRunAdditionDefault = "00FF01F2" }; ParagraphProperties paragraphProperties13 = new ParagraphProperties(); Justification justification6 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties13 = new ParagraphMarkRunProperties(); RunFonts runFonts24 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold14 = new Bold(); paragraphMarkRunProperties13.Append(runFonts24); paragraphMarkRunProperties13.Append(bold14); paragraphProperties13.Append(justification6); paragraphProperties13.Append(paragraphMarkRunProperties13); Run run12 = new Run() { RsidRunProperties = "00370D51" }; RunProperties runProperties12 = new RunProperties(); RunFonts runFonts25 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold15 = new Bold(); runProperties12.Append(runFonts25); runProperties12.Append(bold15); Text text12 = new Text(); //Grandtotal text12.Text = "$" + String.Format("{0:0.00}", grandTotal); run12.Append(runProperties12); run12.Append(text12); BookmarkStart bookmarkStart1 = new BookmarkStart() { Name = "_GoBack", Id = "0" }; BookmarkEnd bookmarkEnd1 = new BookmarkEnd() { Id = "0" }; paragraph13.Append(paragraphProperties13); paragraph13.Append(run12); paragraph13.Append(bookmarkStart1); paragraph13.Append(bookmarkEnd1); tableCell10.Append(tableCellProperties10); tableCell10.Append(paragraph13); tableRow3.Append(tableCell9); tableRow3.Append(tableCell10); table2.Append(tableProperties2); table2.Append(tableGrid2); table2.Append(tableRow3); Paragraph paragraph14 = new Paragraph() { RsidParagraphMarkRevision = "004C4FC4", RsidParagraphAddition = "00FF01F2", RsidRunAdditionDefault = "00FF01F2" }; ParagraphProperties paragraphProperties14 = new ParagraphProperties(); ParagraphMarkRunProperties paragraphMarkRunProperties14 = new ParagraphMarkRunProperties(); RunFonts runFonts28 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; paragraphMarkRunProperties14.Append(runFonts28); paragraphProperties14.Append(paragraphMarkRunProperties14); paragraph14.Append(paragraphProperties14); SectionProperties sectionProperties1 = new SectionProperties() { RsidRPr = "004C4FC4", RsidR = "00FF01F2" }; PageSize pageSize1 = new PageSize() { Width = (UInt32Value)11906U, Height = (UInt32Value)16838U }; PageMargin pageMargin1 = new PageMargin() { Top = 1440, Right = (UInt32Value)1440U, Bottom = 1440, Left = (UInt32Value)1440U, Header = (UInt32Value)708U, Footer = (UInt32Value)708U, Gutter = (UInt32Value)0U }; Columns columns1 = new Columns() { Space = "708" }; DocGrid docGrid1 = new DocGrid() { LinePitch = 360 }; sectionProperties1.Append(pageSize1); sectionProperties1.Append(pageMargin1); sectionProperties1.Append(columns1); sectionProperties1.Append(docGrid1); body1.Append(paragraph1); body1.Append(paragraph2); body1.Append(table1); body1.Append(paragraph11); body1.Append(table2); body1.Append(paragraph14); body1.Append(sectionProperties1); document1.Append(body1); mainDocumentPart1.Document = document1; }
// Creates an Table instance and adds its children. public static Table GenerateTable(GenerationData data) { Table table1 = new Table(); TableProperties tableProperties1 = new TableProperties(); TableWidth tableWidth1 = new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto }; TableIndentation tableIndentation1 = new TableIndentation() { Width = 10, Type = TableWidthUnitValues.Dxa }; TableBorders tableBorders1 = new TableBorders(); TopBorder topBorder1 = new TopBorder() { Val = BorderValues.Single, Color = "000000", Size = (UInt32Value)10U, Space = (UInt32Value)0U }; LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.Single, Color = "000000", Size = (UInt32Value)10U, Space = (UInt32Value)0U }; BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.Single, Color = "000000", Size = (UInt32Value)10U, Space = (UInt32Value)0U }; RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.Single, Color = "000000", Size = (UInt32Value)10U, Space = (UInt32Value)0U }; InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder() { Val = BorderValues.Single, Color = "000000", Size = (UInt32Value)10U, Space = (UInt32Value)0U }; InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder() { Val = BorderValues.Single, Color = "000000", Size = (UInt32Value)10U, Space = (UInt32Value)0U }; tableBorders1.Append(topBorder1); tableBorders1.Append(leftBorder1); tableBorders1.Append(bottomBorder1); tableBorders1.Append(rightBorder1); tableBorders1.Append(insideHorizontalBorder1); tableBorders1.Append(insideVerticalBorder1); TableCellMarginDefault tableCellMarginDefault1 = new TableCellMarginDefault(); TableCellLeftMargin tableCellLeftMargin1 = new TableCellLeftMargin() { Width = 10, Type = TableWidthValues.Dxa }; TableCellRightMargin tableCellRightMargin1 = new TableCellRightMargin() { Width = 10, Type = TableWidthValues.Dxa }; tableCellMarginDefault1.Append(tableCellLeftMargin1); tableCellMarginDefault1.Append(tableCellRightMargin1); TableLook tableLook1 = new TableLook() { Val = "0000", FirstRow = false, LastRow = false, FirstColumn = false, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = false }; tableProperties1.Append(tableWidth1); tableProperties1.Append(tableIndentation1); tableProperties1.Append(tableBorders1); tableProperties1.Append(tableCellMarginDefault1); tableProperties1.Append(tableLook1); TableGrid tableGrid1 = new TableGrid(); GridColumn gridColumn1 = new GridColumn() { Width = "2000" }; GridColumn gridColumn2 = new GridColumn() { Width = "2550" }; GridColumn gridColumn3 = new GridColumn() { Width = "3825" }; tableGrid1.Append(gridColumn1); tableGrid1.Append(gridColumn2); tableGrid1.Append(gridColumn3); TableRow tableRow1 = new TableRow() { RsidTableRowAddition = "009B2C1D", ParagraphId = "080C4265", TextId = "77777777" }; TableRowProperties tableRowProperties1 = new TableRowProperties(); GridAfter gridAfter1 = new GridAfter() { Val = 2 }; WidthAfterTableRow widthAfterTableRow1 = new WidthAfterTableRow() { Width = "6375", Type = TableWidthUnitValues.Dxa }; tableRowProperties1.Append(gridAfter1); tableRowProperties1.Append(widthAfterTableRow1); TableCell tableCell1 = new TableCell(); TableCellProperties tableCellProperties1 = new TableCellProperties(); TableCellWidth tableCellWidth1 = new TableCellWidth() { Width = "800", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders1 = new TableCellBorders(); TopBorder topBorder2 = new TopBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; LeftBorder leftBorder2 = new LeftBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; BottomBorder bottomBorder2 = new BottomBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; RightBorder rightBorder2 = new RightBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; tableCellBorders1.Append(topBorder2); tableCellBorders1.Append(leftBorder2); tableCellBorders1.Append(bottomBorder2); tableCellBorders1.Append(rightBorder2); tableCellProperties1.Append(tableCellWidth1); tableCellProperties1.Append(tableCellBorders1); Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "009E39C2", ParagraphId = "3B996D8B", TextId = "0D88121C" }; Run run1 = new Run(); RunProperties runProperties1 = new RunProperties(); NoProof noProof1 = new NoProof(); runProperties1.Append(noProof1); Drawing drawing1 = new Drawing(); Wp.Inline inline1 = new Wp.Inline() { DistanceFromTop = (UInt32Value)0U, DistanceFromBottom = (UInt32Value)0U, DistanceFromLeft = (UInt32Value)0U, DistanceFromRight = (UInt32Value)0U, AnchorId = "29B39BAA", EditId = "5481AAF3" }; Wp.Extent extent1 = new Wp.Extent() { Cx = 1257300L, Cy = 1057275L }; Wp.EffectExtent effectExtent1 = new Wp.EffectExtent() { LeftEdge = 0L, TopEdge = 0L, RightEdge = 0L, BottomEdge = 0L }; Wp.DocProperties docProperties1 = new Wp.DocProperties() { Id = (UInt32Value)1U, Name = "Picture 1" }; Wp.NonVisualGraphicFrameDrawingProperties nonVisualGraphicFrameDrawingProperties1 = new Wp.NonVisualGraphicFrameDrawingProperties(); A.GraphicFrameLocks graphicFrameLocks1 = new A.GraphicFrameLocks() { NoChangeAspect = true }; graphicFrameLocks1.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); nonVisualGraphicFrameDrawingProperties1.Append(graphicFrameLocks1); A.Graphic graphic1 = new A.Graphic(); graphic1.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); A.GraphicData graphicData1 = new A.GraphicData() { Uri = "http://schemas.openxmlformats.org/drawingml/2006/picture" }; Pic.Picture picture1 = new Pic.Picture(); picture1.AddNamespaceDeclaration("pic", "http://schemas.openxmlformats.org/drawingml/2006/picture"); Pic.NonVisualPictureProperties nonVisualPictureProperties1 = new Pic.NonVisualPictureProperties(); Pic.NonVisualDrawingProperties nonVisualDrawingProperties1 = new Pic.NonVisualDrawingProperties() { Id = (UInt32Value)0U, Name = "Picture 1" }; Pic.NonVisualPictureDrawingProperties nonVisualPictureDrawingProperties1 = new Pic.NonVisualPictureDrawingProperties(); A.PictureLocks pictureLocks1 = new A.PictureLocks() { NoChangeAspect = true, NoChangeArrowheads = true }; nonVisualPictureDrawingProperties1.Append(pictureLocks1); nonVisualPictureProperties1.Append(nonVisualDrawingProperties1); nonVisualPictureProperties1.Append(nonVisualPictureDrawingProperties1); Pic.BlipFill blipFill1 = new Pic.BlipFill(); A.Blip blip1 = new A.Blip() { Embed = "rId9" }; A.BlipExtensionList blipExtensionList1 = new A.BlipExtensionList(); A.BlipExtension blipExtension1 = new A.BlipExtension() { Uri = "{28A0092B-C50C-407E-A947-70E740481C1C}" }; A14.UseLocalDpi useLocalDpi1 = new A14.UseLocalDpi() { Val = false }; useLocalDpi1.AddNamespaceDeclaration("a14", "http://schemas.microsoft.com/office/drawing/2010/main"); blipExtension1.Append(useLocalDpi1); blipExtensionList1.Append(blipExtension1); blip1.Append(blipExtensionList1); A.SourceRectangle sourceRectangle1 = new A.SourceRectangle(); A.Stretch stretch1 = new A.Stretch(); A.FillRectangle fillRectangle1 = new A.FillRectangle(); stretch1.Append(fillRectangle1); blipFill1.Append(blip1); blipFill1.Append(sourceRectangle1); blipFill1.Append(stretch1); Pic.ShapeProperties shapeProperties1 = new Pic.ShapeProperties() { BlackWhiteMode = A.BlackWhiteModeValues.Auto }; A.Transform2D transform2D1 = new A.Transform2D(); A.Offset offset1 = new A.Offset() { X = 0L, Y = 0L }; A.Extents extents1 = new A.Extents() { Cx = 1257300L, Cy = 1057275L }; transform2D1.Append(offset1); transform2D1.Append(extents1); A.PresetGeometry presetGeometry1 = new A.PresetGeometry() { Preset = A.ShapeTypeValues.Rectangle }; A.AdjustValueList adjustValueList1 = new A.AdjustValueList(); presetGeometry1.Append(adjustValueList1); A.NoFill noFill1 = new A.NoFill(); A.Outline outline1 = new A.Outline(); A.NoFill noFill2 = new A.NoFill(); outline1.Append(noFill2); shapeProperties1.Append(transform2D1); shapeProperties1.Append(presetGeometry1); shapeProperties1.Append(noFill1); shapeProperties1.Append(outline1); picture1.Append(nonVisualPictureProperties1); picture1.Append(blipFill1); picture1.Append(shapeProperties1); graphicData1.Append(picture1); graphic1.Append(graphicData1); inline1.Append(extent1); inline1.Append(effectExtent1); inline1.Append(docProperties1); inline1.Append(nonVisualGraphicFrameDrawingProperties1); inline1.Append(graphic1); drawing1.Append(inline1); run1.Append(runProperties1); run1.Append(drawing1); paragraph1.Append(run1); tableCell1.Append(tableCellProperties1); tableCell1.Append(paragraph1); tableRow1.Append(tableRowProperties1); tableRow1.Append(tableCell1); TableRow tableRow2 = new TableRow() { RsidTableRowAddition = "009B2C1D", ParagraphId = "3125C09D", TextId = "77777777" }; TableRowProperties tableRowProperties2 = new TableRowProperties(); GridAfter gridAfter2 = new GridAfter() { Val = 2 }; WidthAfterTableRow widthAfterTableRow2 = new WidthAfterTableRow() { Width = "6375", Type = TableWidthUnitValues.Dxa }; tableRowProperties2.Append(gridAfter2); tableRowProperties2.Append(widthAfterTableRow2); TableCell tableCell2 = new TableCell(); TableCellProperties tableCellProperties2 = new TableCellProperties(); TableCellWidth tableCellWidth2 = new TableCellWidth() { Width = "800", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders2 = new TableCellBorders(); TopBorder topBorder3 = new TopBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; LeftBorder leftBorder3 = new LeftBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; BottomBorder bottomBorder3 = new BottomBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; RightBorder rightBorder3 = new RightBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; tableCellBorders2.Append(topBorder3); tableCellBorders2.Append(leftBorder3); tableCellBorders2.Append(bottomBorder3); tableCellBorders2.Append(rightBorder3); tableCellProperties2.Append(tableCellWidth2); tableCellProperties2.Append(tableCellBorders2); Paragraph paragraph2 = new Paragraph() { RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "009B2C1D", ParagraphId = "595BC873", TextId = "77777777" }; tableCell2.Append(tableCellProperties2); tableCell2.Append(paragraph2); tableRow2.Append(tableRowProperties2); tableRow2.Append(tableCell2); TableRow tableRow3 = new TableRow() { RsidTableRowAddition = "009B2C1D", ParagraphId = "13569F8F", TextId = "77777777" }; TableRowProperties tableRowProperties3 = new TableRowProperties(); GridAfter gridAfter3 = new GridAfter() { Val = 2 }; WidthAfterTableRow widthAfterTableRow3 = new WidthAfterTableRow() { Width = "6375", Type = TableWidthUnitValues.Dxa }; tableRowProperties3.Append(gridAfter3); tableRowProperties3.Append(widthAfterTableRow3); TableCell tableCell3 = new TableCell(); TableCellProperties tableCellProperties3 = new TableCellProperties(); TableCellWidth tableCellWidth3 = new TableCellWidth() { Width = "800", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders3 = new TableCellBorders(); TopBorder topBorder4 = new TopBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; LeftBorder leftBorder4 = new LeftBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; BottomBorder bottomBorder4 = new BottomBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; RightBorder rightBorder4 = new RightBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; tableCellBorders3.Append(topBorder4); tableCellBorders3.Append(leftBorder4); tableCellBorders3.Append(bottomBorder4); tableCellBorders3.Append(rightBorder4); tableCellProperties3.Append(tableCellWidth3); tableCellProperties3.Append(tableCellBorders3); Paragraph paragraph3 = new Paragraph() { RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "009B2C1D", ParagraphId = "105B22E7", TextId = "77777777" }; tableCell3.Append(tableCellProperties3); tableCell3.Append(paragraph3); tableRow3.Append(tableRowProperties3); tableRow3.Append(tableCell3); TableRow tableRow4 = new TableRow() { RsidTableRowAddition = "009B2C1D", ParagraphId = "0E828CE9", TextId = "77777777" }; TableCell tableCell4 = new TableCell(); TableCellProperties tableCellProperties4 = new TableCellProperties(); TableCellWidth tableCellWidth4 = new TableCellWidth() { Width = "800", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders4 = new TableCellBorders(); TopBorder topBorder5 = new TopBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; LeftBorder leftBorder5 = new LeftBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; BottomBorder bottomBorder5 = new BottomBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; RightBorder rightBorder5 = new RightBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; tableCellBorders4.Append(topBorder5); tableCellBorders4.Append(leftBorder5); tableCellBorders4.Append(bottomBorder5); tableCellBorders4.Append(rightBorder5); tableCellProperties4.Append(tableCellWidth4); tableCellProperties4.Append(tableCellBorders4); Paragraph paragraph4 = new Paragraph() { RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "009B2C1D", ParagraphId = "7D33E7CB", TextId = "77777777" }; tableCell4.Append(tableCellProperties4); tableCell4.Append(paragraph4); TableCell tableCell5 = new TableCell(); TableCellProperties tableCellProperties5 = new TableCellProperties(); TableCellWidth tableCellWidth5 = new TableCellWidth() { Width = "2550", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders5 = new TableCellBorders(); TopBorder topBorder6 = new TopBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; LeftBorder leftBorder6 = new LeftBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; BottomBorder bottomBorder6 = new BottomBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; RightBorder rightBorder6 = new RightBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; tableCellBorders5.Append(topBorder6); tableCellBorders5.Append(leftBorder6); tableCellBorders5.Append(bottomBorder6); tableCellBorders5.Append(rightBorder6); tableCellProperties5.Append(tableCellWidth5); tableCellProperties5.Append(tableCellBorders5); Paragraph paragraph5 = new Paragraph() { RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "009B2C1D", ParagraphId = "4B505573", TextId = "77777777" }; tableCell5.Append(tableCellProperties5); tableCell5.Append(paragraph5); TableCell tableCell6 = new TableCell(); TableCellProperties tableCellProperties6 = new TableCellProperties(); TableCellWidth tableCellWidth6 = new TableCellWidth() { Width = "3825", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders6 = new TableCellBorders(); TopBorder topBorder7 = new TopBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; LeftBorder leftBorder7 = new LeftBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; BottomBorder bottomBorder7 = new BottomBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; RightBorder rightBorder7 = new RightBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; tableCellBorders6.Append(topBorder7); tableCellBorders6.Append(leftBorder7); tableCellBorders6.Append(bottomBorder7); tableCellBorders6.Append(rightBorder7); Shading shading1 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "0069B4" }; TableCellVerticalAlignment tableCellVerticalAlignment1 = new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }; tableCellProperties6.Append(tableCellWidth6); tableCellProperties6.Append(tableCellBorders6); tableCellProperties6.Append(shading1); tableCellProperties6.Append(tableCellVerticalAlignment1); Paragraph paragraph6 = new Paragraph() { RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "009E39C2", ParagraphId = "63EAFC9C", TextId = "77777777" }; ParagraphProperties paragraphProperties1 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { Before = "550", After = "800" }; Indentation indentation1 = new Indentation() { Left = "432" }; paragraphProperties1.Append(spacingBetweenLines1); paragraphProperties1.Append(indentation1); Run run2 = new Run(); RunProperties runProperties2 = new RunProperties(); Color color1 = new Color() { Val = "FFFFFF" }; FontSize fontSize1 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript1 = new FontSizeComplexScript() { Val = "18" }; runProperties2.Append(color1); runProperties2.Append(fontSize1); runProperties2.Append(fontSizeComplexScript1); Text text1 = new Text(); text1.Text = DocumentMetadataTexts.GetText(MetadataTexts.CV_TITLE, data.Language); run2.Append(runProperties2); run2.Append(text1); paragraph6.Append(paragraphProperties1); paragraph6.Append(run2); Paragraph paragraph7 = new Paragraph() { RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "0007641E", ParagraphId = "48E9D2B9", TextId = "21C16ECD" }; ParagraphProperties paragraphProperties2 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines2 = new SpacingBetweenLines() { After = "0" }; Indentation indentation2 = new Indentation() { Left = "432" }; paragraphProperties2.Append(spacingBetweenLines2); paragraphProperties2.Append(indentation2); Run run3 = new Run(); RunProperties runProperties3 = new RunProperties(); Bold bold1 = new Bold(); Color color2 = new Color() { Val = "FFFFFF" }; FontSize fontSize2 = new FontSize() { Val = "33" }; FontSizeComplexScript fontSizeComplexScript2 = new FontSizeComplexScript() { Val = "33" }; runProperties3.Append(bold1); runProperties3.Append(color2); runProperties3.Append(fontSize2); runProperties3.Append(fontSizeComplexScript2); Text text2 = new Text(); text2.Text = data.TitleArea.Name; run3.Append(runProperties3); run3.Append(text2); paragraph7.Append(paragraphProperties2); paragraph7.Append(run3); Paragraph paragraph8 = new Paragraph() { RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "009E39C2", ParagraphId = "4D45EC2E", TextId = "77777777" }; ParagraphProperties paragraphProperties3 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines3 = new SpacingBetweenLines() { Before = "800", After = "550", Line = "240", LineRule = LineSpacingRuleValues.Auto }; Indentation indentation3 = new Indentation() { Left = "432" }; paragraphProperties3.Append(spacingBetweenLines3); paragraphProperties3.Append(indentation3); Run run4 = new Run(); RunProperties runProperties4 = new RunProperties(); Color color3 = new Color() { Val = "FFFFFF" }; FontSize fontSize3 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript3 = new FontSizeComplexScript() { Val = "18" }; runProperties4.Append(color3); runProperties4.Append(fontSize3); runProperties4.Append(fontSizeComplexScript3); Text text3 = new Text(); text3.Text = data.TitleArea.Date; run4.Append(runProperties4); run4.Append(text3); paragraph8.Append(paragraphProperties3); paragraph8.Append(run4); tableCell6.Append(tableCellProperties6); tableCell6.Append(paragraph6); tableCell6.Append(paragraph7); tableCell6.Append(paragraph8); tableRow4.Append(tableCell4); tableRow4.Append(tableCell5); tableRow4.Append(tableCell6); TableRow tableRow5 = new TableRow() { RsidTableRowAddition = "009B2C1D", ParagraphId = "485735CB", TextId = "77777777" }; TableRowProperties tableRowProperties4 = new TableRowProperties(); GridAfter gridAfter4 = new GridAfter() { Val = 2 }; WidthAfterTableRow widthAfterTableRow4 = new WidthAfterTableRow() { Width = "6375", Type = TableWidthUnitValues.Dxa }; tableRowProperties4.Append(gridAfter4); tableRowProperties4.Append(widthAfterTableRow4); TableCell tableCell7 = new TableCell(); TableCellProperties tableCellProperties7 = new TableCellProperties(); TableCellWidth tableCellWidth7 = new TableCellWidth() { Width = "800", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders7 = new TableCellBorders(); TopBorder topBorder8 = new TopBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; LeftBorder leftBorder8 = new LeftBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; BottomBorder bottomBorder8 = new BottomBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; RightBorder rightBorder8 = new RightBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; tableCellBorders7.Append(topBorder8); tableCellBorders7.Append(leftBorder8); tableCellBorders7.Append(bottomBorder8); tableCellBorders7.Append(rightBorder8); tableCellProperties7.Append(tableCellWidth7); tableCellProperties7.Append(tableCellBorders7); Paragraph paragraph9 = new Paragraph() { RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "009B2C1D", ParagraphId = "41648536", TextId = "77777777" }; tableCell7.Append(tableCellProperties7); tableCell7.Append(paragraph9); tableRow5.Append(tableRowProperties4); tableRow5.Append(tableCell7); TableRow tableRow6 = new TableRow() { RsidTableRowAddition = "009B2C1D", ParagraphId = "20373438", TextId = "77777777" }; TableRowProperties tableRowProperties5 = new TableRowProperties(); GridAfter gridAfter5 = new GridAfter() { Val = 2 }; WidthAfterTableRow widthAfterTableRow5 = new WidthAfterTableRow() { Width = "6375", Type = TableWidthUnitValues.Dxa }; tableRowProperties5.Append(gridAfter5); tableRowProperties5.Append(widthAfterTableRow5); TableCell tableCell8 = new TableCell(); TableCellProperties tableCellProperties8 = new TableCellProperties(); TableCellWidth tableCellWidth8 = new TableCellWidth() { Width = "800", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders8 = new TableCellBorders(); TopBorder topBorder9 = new TopBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; LeftBorder leftBorder9 = new LeftBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; BottomBorder bottomBorder9 = new BottomBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; RightBorder rightBorder9 = new RightBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; tableCellBorders8.Append(topBorder9); tableCellBorders8.Append(leftBorder9); tableCellBorders8.Append(bottomBorder9); tableCellBorders8.Append(rightBorder9); tableCellProperties8.Append(tableCellWidth8); tableCellProperties8.Append(tableCellBorders8); Paragraph paragraph10 = new Paragraph() { RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "009B2C1D", ParagraphId = "54B78A08", TextId = "77777777" }; tableCell8.Append(tableCellProperties8); tableCell8.Append(paragraph10); tableRow6.Append(tableRowProperties5); tableRow6.Append(tableCell8); table1.Append(tableProperties1); table1.Append(tableGrid1); table1.Append(tableRow1); table1.Append(tableRow2); table1.Append(tableRow3); table1.Append(tableRow4); table1.Append(tableRow5); table1.Append(tableRow6); return(table1); }
public static void GenerateFooterPartContent(FooterPart defaultPart) { Footer fDefault = new Footer() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } }; fDefault.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"); fDefault.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); fDefault.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); fDefault.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); fDefault.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); fDefault.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); fDefault.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"); fDefault.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"); fDefault.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); fDefault.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); fDefault.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); fDefault.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"); fDefault.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk"); fDefault.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml"); fDefault.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"); Paragraph pDefault = new Paragraph() { RsidParagraphAddition = "00164C17", RsidRunAdditionDefault = "00164C17" }; ParagraphProperties pPropDefault = new ParagraphProperties(); ParagraphStyleId pStyleIdDefault = new ParagraphStyleId() { Val = "Footer" }; pPropDefault.Append(pStyleIdDefault); Run runDefault = new Run(); Text textDefault = new Text(); textDefault.Text = "Footer in all pages [default]"; runDefault.Append(textDefault); pDefault.Append(pPropDefault); pDefault.Append(runDefault); fDefault.Append(pDefault); defaultPart.Footer = fDefault; }
private TableCell BuildCell(string text, int gridSpan = 1, VerticalMerge vm = null, bool bold = false) { TableCell cell = new TableCell(); Paragraph p = new Paragraph(); ParagraphProperties paragraphProperties = new ParagraphProperties(); Justification justification = new Justification() { Val = JustificationValues.Center }; paragraphProperties.Append(justification); if (bold) { ParagraphMarkRunProperties paragraphMarkRunProperties = new ParagraphMarkRunProperties(); Bold boldStyle = new Bold(); paragraphMarkRunProperties.Append(boldStyle); paragraphProperties.Append(paragraphMarkRunProperties); } p.Append(paragraphProperties); if (!string.IsNullOrEmpty(text)) { Run r = new Run(); RunProperties runProperties = new RunProperties(); if (bold) { Bold boldStyle = new Bold(); runProperties.Append(boldStyle); } r.Append(runProperties); Text t = new Text { Text = text }; r.AppendChild<Text>(t); p.AppendChild<Run>(r); } TableCellProperties cellProperty = new TableCellProperties(); TableCellVerticalAlignment tableCellVerticalAlignment1 = new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }; cellProperty.Append(tableCellVerticalAlignment1); if (gridSpan > 1) { GridSpan gs = new GridSpan { Val = gridSpan }; cellProperty.Append(gs); } if (vm != null) { cellProperty.Append(vm); } cell.Append(cellProperty); cell.Append(p); return cell; }
// Creates an TableCell instance and adds its children. public static void AddPersonCell(this TableRow row, Person p, bool addEmployer) { TableCell tableCell1 = new TableCell(); TableCellProperties tableCellProperties1 = new TableCellProperties(); TableCellWidth tableCellWidth1 = new TableCellWidth() { Width = "3787", Type = TableWidthUnitValues.Dxa }; tableCellProperties1.Append(tableCellWidth1); Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "005A43FA", RsidParagraphProperties = "005A43FA", RsidRunAdditionDefault = "005A43FA" }; ParagraphProperties paragraphProperties1 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { Before = "111" }; Indentation indentation1 = new Indentation() { Left = "95", Right = "95" }; paragraphProperties1.Append(spacingBetweenLines1); paragraphProperties1.Append(indentation1); paragraph1.Append(paragraphProperties1); if (p != null) { Run run1 = new Run(); Text text1 = new Text(); var name = (p.TitleCode.HasValue() ? p.TitleCode + " " : "") + (p.FirstName == "?" ? "" : p.FirstName + " ") + (p.LastName == "?" ? "" : p.LastName); text1.Text = name; run1.Append(text1); paragraph1.Append(run1); Paragraph paragraph2 = null; if (addEmployer && p.EmployerOther.HasValue()) { paragraph2 = new Paragraph() { RsidParagraphAddition = "005A43FA", RsidParagraphProperties = "005A43FA", RsidRunAdditionDefault = "005A43FA" }; ParagraphProperties paragraphProperties2 = new ParagraphProperties(); Indentation indentation2 = new Indentation() { Left = "245", Right = "95", Hanging = "150" }; paragraphProperties2.Append(indentation2); Run run2 = new Run(); Text text2 = new Text(); text2.Text = p.EmployerOther; run2.Append(text2); paragraph2.Append(paragraphProperties2); paragraph2.Append(run2); } Paragraph paragraph3 = new Paragraph() { RsidParagraphAddition = "005A43FA", RsidParagraphProperties = "005A43FA", RsidRunAdditionDefault = "005A43FA" }; ParagraphProperties paragraphProperties3 = new ParagraphProperties(); Indentation indentation3 = new Indentation() { Left = "95", Right = "95" }; paragraphProperties3.Append(indentation3); Run run3 = new Run(); Text text3 = new Text(); text3.Text = p.PrimaryAddress; run3.Append(text3); paragraph3.Append(paragraphProperties3); paragraph3.Append(run3); Paragraph paragraph3a = null; if (p.PrimaryAddress2.HasValue()) { paragraph3a = new Paragraph() { RsidParagraphAddition = "005A43FA", RsidParagraphProperties = "005A43FA", RsidRunAdditionDefault = "005A43FA" }; ParagraphProperties paragraphProperties2 = new ParagraphProperties(); Indentation indentation2 = new Indentation() { Left = "95", Right = "95" }; paragraphProperties2.Append(indentation2); Run run2 = new Run(); Text text2 = new Text(); text2.Text = p.PrimaryAddress2; run2.Append(text2); paragraph3a.Append(paragraphProperties2); paragraph3a.Append(run2); } Paragraph paragraph4 = new Paragraph() { RsidParagraphAddition = "005A43FA", RsidParagraphProperties = "005A43FA", RsidRunAdditionDefault = "005A43FA" }; ParagraphProperties paragraphProperties4 = new ParagraphProperties(); Indentation indentation4 = new Indentation() { Left = "95", Right = "95" }; paragraphProperties4.Append(indentation4); Run run4 = new Run(); Text text4 = new Text(); text4.Text = p.CityStateZip; run4.Append(text4); paragraph4.Append(paragraphProperties4); paragraph4.Append(run4); tableCell1.Append(tableCellProperties1); tableCell1.Append(paragraph1); if (paragraph2 != null) { tableCell1.Append(paragraph2); } tableCell1.Append(paragraph3); if (paragraph3a != null) { tableCell1.Append(paragraph3a); } tableCell1.Append(paragraph4); } else { tableCell1.Append(paragraph1); } row.Append(tableCell1); }
private Paragraph GeneratePageCountparagraph(int pageCount) { Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "004E307B", RsidParagraphProperties = "00E073E3", RsidRunAdditionDefault = "00E073E3" }; ParagraphProperties paragraphProperties1 = new ParagraphProperties(); Justification justification1 = new Justification() { Val = JustificationValues.Center }; ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties(); RunFonts runFonts1 = new RunFonts() { Hint = FontTypeHintValues.EastAsia }; paragraphMarkRunProperties1.Append(runFonts1); paragraphProperties1.Append(justification1); paragraphProperties1.Append(paragraphMarkRunProperties1); Run run1 = new Run(); RunProperties runProperties1 = new RunProperties(); RunFonts runFonts2 = new RunFonts() { Hint = FontTypeHintValues.EastAsia }; runProperties1.Append(runFonts2); Text text1 = new Text(); text1.Text = "第"; run1.Append(runProperties1); run1.Append(text1); Run run2 = new Run(); RunProperties runProperties2 = new RunProperties(); RunFonts runFonts3 = new RunFonts() { Hint = FontTypeHintValues.EastAsia }; runProperties2.Append(runFonts3); Text text2 = new Text(); text2.Text = pageCount.ToString(); run2.Append(runProperties2); run2.Append(text2); Run run3 = new Run(); RunProperties runProperties3 = new RunProperties(); RunFonts runFonts4 = new RunFonts() { Hint = FontTypeHintValues.EastAsia }; runProperties3.Append(runFonts4); Text text3 = new Text(); text3.Text = "页"; run3.Append(runProperties3); run3.Append(text3); paragraph1.Append(paragraphProperties1); paragraph1.Append(run1); paragraph1.Append(run2); paragraph1.Append(run3); return paragraph1; }
private void CreateProjectHeadingStyle() { // Get the Styles part for this document. StyleDefinitionsPart styleDefinitionsPart = _document.MainDocumentPart.StyleDefinitionsPart; // Get access to the root element of the styles part. Styles styles = styleDefinitionsPart.Styles; // Create a new paragraph style and specify some of the properties. Style style = new Style() { Type = StyleValues.Paragraph, StyleId = "ProjectHeading", CustomStyle = true }; StyleName styleName = new StyleName() { Val = "ProjectHeading" }; BasedOn basedOn = new BasedOn() { Val = "Normal" }; NextParagraphStyle nextParagraphStyle = new NextParagraphStyle() { Val = "Normal" }; style.Append(styleName); style.Append(basedOn); style.Append(nextParagraphStyle); // Create the StyleRunProperties object and specify some of the run properties. StyleRunProperties styleRunProperties = new StyleRunProperties(); Bold bold = new Bold(); // More info: https://stackoverflow.com/a/17221250/9017481 Color color = new Color() { Val = "365F91", ThemeColor = ThemeColorValues.Accent1, ThemeShade = "BF" }; RunFonts font = new RunFonts() { Ascii = "Calibri Light (Headings)" }; // Specify a 18 point size. FontSize fontSize = new FontSize() { Val = "28" }; styleRunProperties.Append(bold); styleRunProperties.Append(color); styleRunProperties.Append(font); styleRunProperties.Append(fontSize); // Centering text // https://stackoverflow.com/a/24827814/9017481 ParagraphProperties paragraphRunProperties = new ParagraphProperties(); Justification CenterHeading = new Justification { Val = JustificationValues.Left }; paragraphRunProperties.Append(CenterHeading); // Add the run properties to the style. style.Append(styleRunProperties); style.Append(paragraphRunProperties); // Add the style to the styles part. styles.Append(style); }
public void ExportWordDocument(string filepath) { using (WordprocessingDocument wordDocument = WordprocessingDocument.Create(filepath, WordprocessingDocumentType.Document)) { MainDocumentPart mainPart = wordDocument.AddMainDocumentPart(); mainPart.Document = new Document(); Body body = mainPart.Document.AppendChild(new Body()); #region 标题文字(加粗居中) Paragraph para = body.AppendChild(new Paragraph()); ParagraphProperties pPr = para.AppendChild(new ParagraphProperties()); pPr.Append(new Justification() { Val = JustificationValues.Center }); Run run = para.AppendChild(new Run()); RunProperties rPr = new RunProperties(new RunFonts() { Ascii = "宋体", ComplexScript = "宋体", EastAsia = "宋体", HighAnsi = "宋体" }); rPr.Append(new FontSize() { Val = "40" }); rPr.Append(new Bold() { Val = true }); run.Append(rPr); run.Append(new Text("钢轨探伤仪探伤报告")); #endregion //rPr.FontSize.Val = "40"; //rPr.Append(new RunFonts() { ComplexScript = "宋体" }); //rPr.RunFonts.ComplexScript = "宋体"; //Run r = wordDocument.MainDocumentPart.Document.Descendants<Run>().First(); //r.PrependChild(rPr); #region 表格 Table table = new Table(); #region 表格样式 // Create a TableProperties object and specify its border information. TableProperties tblProp = new TableProperties( new TableBorders( new TopBorder() { Val = new EnumValue <BorderValues>(BorderValues.Single), Size = 1 }, new BottomBorder() { Val = new EnumValue <BorderValues>(BorderValues.Single), Size = 1 }, new LeftBorder() { Val = new EnumValue <BorderValues>(BorderValues.Single), Size = 1 }, new RightBorder() { Val = new EnumValue <BorderValues>(BorderValues.Single), Size = 1 }, new InsideHorizontalBorder() { Val = new EnumValue <BorderValues>(BorderValues.Single), Size = 1 }, new InsideVerticalBorder() { Val = new EnumValue <BorderValues>(BorderValues.Single), Size = 1 } ) ); tblProp.TableWidth = new TableWidth() { Width = "9639", Type = TableWidthUnitValues.Dxa }; tblProp.TableLayout = new TableLayout() { Type = TableLayoutValues.Fixed }; //固定列宽 tblProp.TableLook = new TableLook() { Val = "0000", FirstRow = false, LastRow = false, FirstColumn = false, LastColumn = false }; table.Append(tblProp); #endregion #region 成员模板 //Paragraph tblPara = new Paragraph(); //ParagraphProperties tblpPr = tblPara.AppendChild(new ParagraphProperties()); //tblpPr.AppendChild(new Justification() { Val = JustificationValues.Left }); //tblpPr.AppendChild( // new RunProperties( // new RunFonts() { Ascii = "宋体", ComplexScript = @"宋体", EastAsia = "宋体", HighAnsi = "宋体" }, // new FontSize() { Val = "24" }) // ); TableRow tr = new TableRow(); tr.AppendChild(new TableRowProperties(new TableRowHeight() { Val = 454 })); TableCell tc = new TableCell(); tc.AppendChild(new TableCellProperties( new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center } //,new Shading() { Val = ShadingPatternValues.Clear, Fill = "auto" }// 阴影 )); tc.AppendChild(new TableCellMargin( new LeftMargin() { Width = "100" } )); Run tblRun = new Run(); tblRun.AppendChild(new RunProperties( new RunFonts() { Ascii = "宋体", ComplexScript = @"宋体", EastAsia = "宋体", HighAnsi = "宋体" }, new FontSize() { Val = "24" }, new Bold() { Val = true } )); #endregion #region 例1 { // Create a row. TableRow test1 = new TableRow(tr.OuterXml); // Create a cell. // Create a second table cell by copying the OuterXml value of the first table cell. TableCell tc1 = new TableCell(tc.OuterXml); TableCell tc2 = new TableCell(tc.OuterXml); TableCell tc3 = new TableCell(tc.OuterXml); TableCell tc4 = new TableCell(tc.OuterXml); TableCell tc5 = new TableCell(tc.OuterXml); TableCell tc6 = new TableCell(tc.OuterXml); // Specify the table cell content. Run run1 = new Run(tblRun.OuterXml); Run run2 = new Run(tblRun.OuterXml); Run run3 = new Run(tblRun.OuterXml); Run run4 = new Run(tblRun.OuterXml); Run run5 = new Run(tblRun.OuterXml); Run run6 = new Run(tblRun.OuterXml); run1.Append(new Text("some text 1")); run2.Append(new Text("some text 2")); run3.Append(new Text("some text 3")); run4.Append(new Text("文字4:")); run5.Append(new Text("some text 5")); run6.Append(new Text("text 6")); tc1.Append(new Paragraph(run1)); tc2.Append(new Paragraph(run2)); tc3.Append(new Paragraph(run3)); tc4.Append(new Paragraph(run4)); tc5.Append(new Paragraph(run5)); tc6.Append(new Paragraph(run6)); //Paragraph para1 = new Paragraph(tlbPara.OuterXml); //Paragraph para2 = new Paragraph(tlbPara.OuterXml); //Paragraph para3 = new Paragraph(tlbPara.OuterXml); //Paragraph para4 = new Paragraph(tlbPara.OuterXml); //Paragraph para5 = new Paragraph(tlbPara.OuterXml); //Paragraph para6 = new Paragraph(tlbPara.OuterXml); //para1.Append(new Run(new Text("some text 1"))); //para2.Append(new Run(new Text("some text 2"))); //para3.Append(new Run(new Text("some text 3"))); //para4.Append(new Run(new Text("some text 4"))); //para5.Append(new Run(new Text("some text 5"))); //para6.Append(new Run(new Text("some text 6"))); //tc1.Append(para1); //tc2.Append(para2); //tc3.Append(para3); //tc4.Append(para4); //tc5.Append(para5); //tc6.Append(para6); // Append the table cell to the table row. test1.Append(tc1); test1.Append(tc2); test1.Append(tc3); test1.Append(tc4); test1.Append(tc5); test1.Append(tc6); // Append the table row to the table. //table.Append(test1); } #endregion #region 第一行 { TableRow tr1 = new TableRow(tr.OuterXml); TableCell tc1 = new TableCell(tc.OuterXml); TableCell tc2 = new TableCell(tc.OuterXml); TableCell tc3 = new TableCell(tc.OuterXml); TableCell tc4 = new TableCell(tc.OuterXml); TableCell tc5 = new TableCell(tc.OuterXml); TableCell tc6 = new TableCell(tc.OuterXml); // Specify the table cell content. Run run1 = new Run(tblRun.OuterXml); Run run2 = new Run(tblRun.OuterXml); Run run3 = new Run(tblRun.OuterXml); Run run4 = new Run(tblRun.OuterXml); Run run5 = new Run(tblRun.OuterXml); Run run6 = new Run(tblRun.OuterXml); run1.Append(new Text("线名:")); run2.Append(new Text("000")); run3.Append(new Text("线别:")); run4.Append(new Text("正线")); run5.Append(new Text("股别:")); run6.Append(new Text("右")); tc1.Append(new Paragraph(run1)); tc2.Append(new Paragraph(run2)); tc3.Append(new Paragraph(run3)); tc4.Append(new Paragraph(run4)); tc5.Append(new Paragraph(run5)); tc6.Append(new Paragraph(run6)); // Append the table cell to the table row. tr1.Append(tc1); tr1.Append(tc2); tr1.Append(tc3); tr1.Append(tc4); tr1.Append(tc5); tr1.Append(tc6); // Append the table row to the table. table.Append(tr1); } #endregion #region 第二行 { TableRow tr2 = new TableRow(tr.OuterXml); TableCell tc1 = new TableCell(tc.OuterXml); TableCell tc2 = new TableCell(tc.OuterXml); TableCell tc3 = new TableCell(tc.OuterXml); TableCell tc4 = new TableCell(tc.OuterXml); TableCell tc5 = new TableCell(tc.OuterXml); TableCell tc6 = new TableCell(tc.OuterXml); // Specify the table cell content. Run run1 = new Run(tblRun.OuterXml); Run run2 = new Run(tblRun.OuterXml); Run run3 = new Run(tblRun.OuterXml); Run run4 = new Run(tblRun.OuterXml); Run run5 = new Run(tblRun.OuterXml); Run run6 = new Run(tblRun.OuterXml); run1.Append(new Text("轨型:")); run2.Append(new Text("60")); run3.Append(new Text("伤损类型:")); run4.Append(new Text("")); run5.Append(new Text("生产厂商:")); run6.Append(new Text("")); tc1.Append(new Paragraph(run1)); tc2.Append(new Paragraph(run2)); tc3.Append(new Paragraph(run3)); tc4.Append(new Paragraph(run4)); tc5.Append(new Paragraph(run5)); tc6.Append(new Paragraph(run6)); // Append the table cell to the table row. tr2.Append(tc1); tr2.Append(tc2); tr2.Append(tc3); tr2.Append(tc4); tr2.Append(tc5); tr2.Append(tc6); // Append the table row to the table. table.Append(tr2); } #endregion #region 第三行 { TableRow tr3 = new TableRow(tr.OuterXml); TableCell tc1 = new TableCell(tc.OuterXml); TableCell tc2 = new TableCell(tc.OuterXml); TableCell tc3 = new TableCell(tc.OuterXml); TableCell tc4 = new TableCell(tc.OuterXml); TableCell tc5 = new TableCell(tc.OuterXml); TableCell tc6 = new TableCell(tc.OuterXml); // Specify the table cell content. Run run1 = new Run(tblRun.OuterXml); Run run2 = new Run(tblRun.OuterXml); Run run3 = new Run(tblRun.OuterXml); Run run4 = new Run(tblRun.OuterXml); Run run5 = new Run(tblRun.OuterXml); Run run6 = new Run(tblRun.OuterXml); run1.Append(new Text("伤损编号:")); run2.Append(new Text("")); run3.Append(new Text("探伤时间:")); run4.Append(new Text(DateTime.Now.ToString())); run5.Append(new Text("探伤人员:")); run6.Append(new Text("")); tc1.Append(new Paragraph(run1)); tc2.Append(new Paragraph(run2)); tc3.Append(new Paragraph(run3)); tc4.Append(new Paragraph(run4)); tc5.Append(new Paragraph(run5)); tc6.Append(new Paragraph(run6)); // Append the table cell to the table row. tr3.Append(tc1); tr3.Append(tc2); tr3.Append(tc3); tr3.Append(tc4); tr3.Append(tc5); tr3.Append(tc6); // Append the table row to the table. table.Append(tr3); } #endregion #region 第四行 { TableRow tr4 = new TableRow(tr.OuterXml); TableCell tc1 = new TableCell(tc.OuterXml); TableCell tc2 = new TableCell(tc.OuterXml); TableCellProperties tcPr = tc2.Descendants <TableCellProperties>().First(); tcPr.Append(new GridSpan() { Val = 5 }); // Specify the table cell content. Run run1 = new Run(tblRun.OuterXml); Run run2 = new Run(tblRun.OuterXml); Run run3 = new Run(tblRun.OuterXml); Run run4 = new Run(tblRun.OuterXml); run1.Append(new Text("增益:")); run2.Append(new Text("A:45.0dB B:45.5dB C:45.5dB")); run3.Append(new Text("D:45.5dB E:45.0dB F:45.0dB")); run4.Append(new Text("G:46.5dB H:46.5dB I:52.0dB")); tc1.Append(new Paragraph(run1)); tc2.Append(new Paragraph(run2)); tc2.Append(new Paragraph(run3)); tc2.Append(new Paragraph(run4)); // Append the table cell to the table row. tr4.Append(tc1); tr4.Append(tc2); // Append the table row to the table. table.Append(tr4); } #endregion #region 第五行 { TableRow tr5 = new TableRow(tr.OuterXml); TableCell tc1 = new TableCell(tc.OuterXml); TableRowProperties tblPr4 = tr5.Descendants <TableRowProperties>().First(); tblPr4.AppendChild(new TableRowHeight() { Val = 9000 }); TableCellProperties tcPr = tc1.Descendants <TableCellProperties>().First(); tcPr.Append( new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Top }, new GridSpan() { Val = 6 } ); tcPr.Append(new TableCellMargin(new TopMargin() { Width = "50" })); //new Shading() { Val = ShadingPatternValues.Clear, Fill = "auto" } // Specify the table cell content. Run run1 = new Run(tblRun.OuterXml); Run run2 = new Run(tblRun.OuterXml); Run run3 = new Run(tblRun.OuterXml); Run run4 = new Run(tblRun.OuterXml); //地段:0 //当前里程:0km039m run1.Append(new Text("地段:")); run2.Append(new Text("0")); run3.Append(new Text("当前里程:")); run4.Append(new Text("0km039m")); tc1.Append(new Paragraph(run1, run2)); //tc1.Append(new Paragraph(run2)); tc1.Append(new Paragraph(run3, run4)); //tc1.Append(new Paragraph(run4)); ImagePart imagePart = mainPart.AddImagePart(ImagePartType.Jpeg); //Bitmap bitmap = new Bitmap(500, 500); //Graphics g = Graphics.FromImage(bitmap); //g.Clear(System.Drawing.Color.Pink); //using (MemoryStream stream = new MemoryStream()) //{ // bitmap.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg); // imagePart.FeedData(stream); //} //////string fileName = @"?D:\Users\KETIZU2\Desktop\images\logo.jpg"; string fileName = @"D:\Users\KETIZU2\Desktop\images\logo.jpg"; using (FileStream stream = new FileStream(fileName, FileMode.Open)) { imagePart.FeedData(stream); } // Define the reference of the image. Paragraph paraImage = AddImageToParagraph(mainPart.GetIdOfPart(imagePart), 6120000L, 2160000L); //wordDoc.MainDocumentPart.Document.Body.AppendChild(new Paragraph(new Run(element))); tc1.AppendChild(paraImage); // Append the table cell to the table row. tr5.Append(tc1); // Append the table row to the table. table.Append(tr5); } #endregion #region 第六行 { TableRow tr6 = new TableRow(tr.OuterXml); TableCell tc1 = new TableCell(tc.OuterXml); TableCell tc2 = new TableCell(tc.OuterXml); TableCellProperties tcPr = tc2.Descendants <TableCellProperties>().First(); tcPr.Append(new GridSpan() { Val = 5 }); // Specify the table cell content. Run run1 = new Run(tblRun.OuterXml); Run run2 = new Run(tblRun.OuterXml); run1.Append(new Text("单位名称:")); run2.Append(new Text("")); tc1.Append(new Paragraph(run1)); tc2.Append(new Paragraph(run2)); // Append the table cell to the table row. tr6.Append(tc1); tr6.Append(tc2); // Append the table row to the table. table.Append(tr6); } #endregion #region 第七行 { TableRow tr7 = new TableRow(tr.OuterXml); TableCell tc1 = new TableCell(tc.OuterXml); TableCell tc2 = new TableCell(tc.OuterXml); TableCell tc3 = new TableCell(tc.OuterXml); TableCell tc4 = new TableCell(tc.OuterXml); TableCellProperties tcPr = tc2.Descendants <TableCellProperties>().First(); tcPr.Append(new GridSpan() { Val = 3 }); // Specify the table cell content. Run run1 = new Run(tblRun.OuterXml); Run run2 = new Run(tblRun.OuterXml); Run run3 = new Run(tblRun.OuterXml); Run run4 = new Run(tblRun.OuterXml); run1.Append(new Text("操作人员:")); run2.Append(new Text("")); run3.Append(new Text("日期:")); run4.Append(new Text(DateTime.Now.ToString())); tc1.Append(new Paragraph(run1)); tc2.Append(new Paragraph(run2)); tc3.Append(new Paragraph(run3)); tc4.Append(new Paragraph(run4)); // Append the table cell to the table row. tr7.Append(tc1); tr7.Append(tc2); tr7.Append(tc3); tr7.Append(tc4); // Append the table row to the table. table.Append(tr7); } #endregion body.Append(table); #endregion #region 文档格式 SectionProperties sectPr = body.AppendChild(new SectionProperties()); sectPr.AppendChild(new PageMargin() { Top = 1134, Right = 1247, Bottom = 1134, Left = 1247, Header = 851, Footer = 992, Gutter = 0 }); #endregion } }
private void CreateAuthorStyle() { // Get the Styles part for this document. StyleDefinitionsPart styleDefinitionsPart = _document.MainDocumentPart.StyleDefinitionsPart; // Get access to the root element of the styles part. Styles styles = styleDefinitionsPart.Styles; // Create a new paragraph style and specify some of the properties. Style style = new Style() { Type = StyleValues.Paragraph, StyleId = "Author", CustomStyle = true }; StyleName styleName = new StyleName() { Val = "Author" }; BasedOn basedOn = new BasedOn() { Val = "Normal" }; NextParagraphStyle nextParagraphStyle = new NextParagraphStyle() { Val = "Normal" }; style.Append(styleName); style.Append(basedOn); style.Append(nextParagraphStyle); // Create the StyleRunProperties object and specify some of the run properties. StyleRunProperties styleRunProperties = new StyleRunProperties(); Bold bold = new Bold(); // More info: https://stackoverflow.com/a/17221250/9017481 Color color = new Color() { Val = "000000" }; RunFonts font = new RunFonts() { Ascii = "Cambria (Body)" }; FontSize fontSize = new FontSize() { Val = "24" }; styleRunProperties.Append(bold); styleRunProperties.Append(color); styleRunProperties.Append(font); styleRunProperties.Append(fontSize); // Centering text // https://stackoverflow.com/a/24827814/9017481 ParagraphProperties paragraphRunProperties = new ParagraphProperties(); Justification CenterHeading = new Justification { Val = JustificationValues.Center }; paragraphRunProperties.Append(CenterHeading); // Add the run properties to the style. style.Append(styleRunProperties); style.Append(paragraphRunProperties); // Add the style to the styles part. styles.Append(style); }
public void ProcessRequest(System.Data.DataTable dt, System.Data.DataTable dt1, string docFileName) { using (MemoryStream mem = new MemoryStream()) { using (WordprocessingDocument doc = WordprocessingDocument.Create(mem, WordprocessingDocumentType.Document, true)) { MainDocumentPart mainPart = doc.AddMainDocumentPart(); StyleDefinitionsPart stylePart = mainPart.AddNewPart <StyleDefinitionsPart>(); RunProperties rPrNormal = new RunProperties(); RunFonts rFont1 = new RunFonts(); rPrNormal.Append(new DocumentFormat.OpenXml.Wordprocessing.FontSize() { Val = "24" }); DocumentFormat.OpenXml.Wordprocessing.Style style1 = new DocumentFormat.OpenXml.Wordprocessing.Style(); style1.StyleId = "myText"; style1.Append(new Name() { Val = "text" }); style1.Append(rPrNormal); stylePart.Styles = new Styles(); stylePart.Styles.Append(style1); RunProperties rPr = new RunProperties(); Color color = new Color() { Val = "FF0000" }; RunFonts rFont = new RunFonts(); rPr.Append(new Bold()); rPr.Append(new DocumentFormat.OpenXml.Wordprocessing.FontSize() { Val = "24" }); DocumentFormat.OpenXml.Wordprocessing.Style style = new DocumentFormat.OpenXml.Wordprocessing.Style(); style.StyleId = "myHeading1"; style.Append(new Name() { Val = "My Heading 1" }); style.Append(new NextParagraphStyle() { Val = "Normal" }); style.Append(rPr); stylePart.Styles = new Styles(); stylePart.Styles.Append(style); stylePart.Styles.Save(); mainPart.Document = new DocumentFormat.OpenXml.Wordprocessing.Document(); Body body = mainPart.Document.AppendChild(new Body()); ParagraphProperties pptemp = new ParagraphProperties(); Paragraph template = body.AppendChild(new Paragraph()); Justification templatealign = new Justification() { Val = JustificationValues.Center }; pptemp.Append(templatealign); template.Append(pptemp); Run runtemp = template.AppendChild(new Run()); //RunProperties rptemp = new RunProperties(new Bold()); RunProperties runProperties = runtemp.AppendChild(new RunProperties(new Bold())); runtemp.AppendChild(new Text("Service Request (Strictly Confidential)")); ParagraphProperties ppDate = new ParagraphProperties(); Paragraph paraDate = body.AppendChild(new Paragraph()); Justification dateAlign = new Justification() { Val = JustificationValues.Right }; ppDate.Append(dateAlign); paraDate.Append(ppDate); Run runDate = paraDate.AppendChild(new Run()); runDate.AppendChild(new Text("Date : " + DateTime.Now.ToShortDateString())); Paragraph paraTo = body.AppendChild(new Paragraph()); Run runTo = paraTo.AppendChild(new Run()); runTo.AppendChild(new Text("SR No:" + dt.Rows[0][0])); runTo.AppendChild(new Break()); runTo.AppendChild(new Text(dt.Rows[0][3].ToString())); runTo.AppendChild(new Break()); Paragraph title = body.AppendChild(new Paragraph()); Run rtitle = title.AppendChild(new Run()); RunProperties rprptitle = rtitle.AppendChild(new RunProperties(new Bold())); rtitle.AppendChild(new Text("Services to be provided")); rtitle.AppendChild(new Break()); //create table Table table = new Table(); //create tbl prop and border TableProperties tblprop = new TableProperties(new TableBorders(new TopBorder() { Val = new EnumValue <BorderValues>(BorderValues.Single), Size = 10 }, new BottomBorder() { Val = new EnumValue <BorderValues>(BorderValues.Single), Size = 10 }, new LeftBorder() { Val = new EnumValue <BorderValues>(BorderValues.Single), Size = 10 }, new RightBorder() { Val = new EnumValue <BorderValues>(BorderValues.Single), Size = 10 }, new InsideHorizontalBorder() { Val = new EnumValue <BorderValues>(BorderValues.Single), Size = 10 }, new InsideVerticalBorder() { Val = new EnumValue <BorderValues>(BorderValues.Single), Size = 10 })); //Append table prop to empty table table.AppendChild <TableProperties>(tblprop); table.Append(new TableProperties(new TableWidth() { Type = TableWidthUnitValues.Pct, Width = "100%" })); TableRow tr = new TableRow(); TableCell tc1 = new TableCell(); tc1.Append(new Paragraph(new Run(new Text("SLNO")))); tr.Append(tc1); TableCell tc2 = new TableCell(); tc2.Append(new Paragraph(new Run(new Text("IDF")))); tr.Append(tc2); TableCell tc3 = new TableCell(); tc3.Append(new Paragraph(new Run(new Text("Title")))); tr.Append(tc3); TableCell tc4 = new TableCell(); tc4.Append(new Paragraph(new Run(new Text("Action")))); tr.Append(tc4); TableCell tc5 = new TableCell(); tc5.Append(new Paragraph(new Run(new Text("Target Date")))); tr.Append(tc5); TableCell tc6 = new TableCell(); tc6.Append(new Paragraph(new Run(new Text("Remarks")))); tr.Append(tc6); table.Append(tr); for (int i = 0; dt.Rows.Count > i; i++) { TableRow t1 = new TableRow(); TableCell trc1 = new TableCell(); trc1.Append(new Paragraph(new Run(new Text(dt.Rows[i][1].ToString())))); t1.Append(trc1); TableCell trc2 = new TableCell(); trc2.Append(new Paragraph(new Run(new Text(dt.Rows[i][2].ToString())))); t1.Append(trc2); TableCell trc3 = new TableCell(); trc3.Append(new Paragraph(new Run(new Text(dt.Rows[i][17].ToString())))); t1.Append(trc3); TableCell trc4 = new TableCell(); trc4.Append(new Paragraph(new Run(new Text(dt.Rows[i][5].ToString())))); t1.Append(trc4); TableCell trc5 = new TableCell(); trc5.Append(new Paragraph(new Run(new Text(Convert.ToDateTime(dt.Rows[i][9].ToString()).ToString("dd/MM/yyyy"))))); t1.Append(trc5); TableCell trc6 = new TableCell(); trc6.Append(new Paragraph(new Run(new Text(dt.Rows[i][12].ToString())))); t1.Append(trc6); table.Append(t1); } body.Append(table); Paragraph title2 = body.AppendChild(new Paragraph()); Run rtitle2 = title2.AppendChild(new Run()); RunProperties runProperties2 = rtitle2.AppendChild(new RunProperties(new Bold())); rtitle2.AppendChild(new Break()); rtitle2.AppendChild(new Text("Inventor Details: IDF " + dt.Rows[0][2].ToString())); rtitle2.AppendChild(new Break()); Table table1 = new Table(); TableProperties tblprop1 = new TableProperties(new TableBorders(new TopBorder() { Val = new EnumValue <BorderValues>(BorderValues.Single), Size = 10 }, new BottomBorder() { Val = new EnumValue <BorderValues>(BorderValues.Single), Size = 10 }, new LeftBorder() { Val = new EnumValue <BorderValues>(BorderValues.Single), Size = 10 }, new RightBorder() { Val = new EnumValue <BorderValues>(BorderValues.Single), Size = 10 }, new InsideHorizontalBorder() { Val = new EnumValue <BorderValues>(BorderValues.Single), Size = 10 }, new InsideVerticalBorder() { Val = new EnumValue <BorderValues>(BorderValues.Single), Size = 10 })); table1.AppendChild <TableProperties>(tblprop1); table1.Append(new TableProperties(new TableWidth() { Type = TableWidthUnitValues.Pct, Width = "100%" })); TableRow t2 = new TableRow(); TableCell t1c1 = new TableCell(); t1c1.Append(new Paragraph(new Run(new Text("SLNO")))); t2.Append(t1c1); TableCell t1c2 = new TableCell(); t1c2.Append(new Paragraph(new Run(new Text("Inventor Name")))); t2.Append(t1c2); TableCell t1c3 = new TableCell(); t1c3.Append(new Paragraph(new Run(new Text("Applicants")))); t2.Append(t1c3); TableCell t1c4 = new TableCell(); t1c4.Append(new Paragraph(new Run(new Text("Category")))); t2.Append(t1c4); TableCell t1c5 = new TableCell(); t1c5.Append(new Paragraph(new Run(new Text("IDNO")))); t2.Append(t1c5); TableCell t1c6 = new TableCell(); t1c6.Append(new Paragraph(new Run(new Text("Email ID")))); t2.Append(t1c6); TableCell t1c7 = new TableCell(); t1c7.Append(new Paragraph(new Run(new Text("Phone no")))); t2.Append(t1c7); table1.Append(t2); for (int i = 0; dt1.Rows.Count > i; i++) { int j = i + 1; TableRow tr2 = new TableRow(); TableCell trc1 = new TableCell(); trc1.Append(new Paragraph(new Run(new Text(j.ToString())))); tr2.Append(trc1); TableCell trc2 = new TableCell(); trc2.Append(new Paragraph(new Run(new Text(dt1.Rows[i][3].ToString())))); tr2.Append(trc2); TableCell trc3 = new TableCell(); trc3.Append(new Paragraph(new Run(new Text(dt1.Rows[i][4].ToString())))); tr2.Append(trc3); TableCell trc4 = new TableCell(); trc4.Append(new Paragraph(new Run(new Text(dt1.Rows[i][1].ToString())))); tr2.Append(trc4); TableCell trc5 = new TableCell(); trc5.Append(new Paragraph(new Run(new Text(dt1.Rows[i][2].ToString())))); tr2.Append(trc5); TableCell trc6 = new TableCell(); trc6.Append(new Paragraph(new Run(new Text()))); tr2.Append(trc6); TableCell trc7 = new TableCell(); trc7.Append(new Paragraph(new Run(new Text()))); tr2.Append(trc7); table1.Append(tr2); } body.Append(table1); Paragraph bill = body.AppendChild(new Paragraph()); Run runbill = bill.AppendChild(new Run()); RunProperties prprun = new RunProperties(new Bold()); runbill.Append(prprun); prprun.Append(new Break()); prprun.AppendChild(new Text("Billing and other instructions")); prprun.Append(new Break()); ParagraphProperties billpp = new ParagraphProperties(); Paragraph billdt = body.AppendChild(new Paragraph()); Run billdtrun = billdt.AppendChild(new Run()); //Numbering element = new Numbering(new AbstractNum(new Level(new NumberingFormat() { Val = NumberFormatValues.Bullet },new LevelText() { Val = "·" }){ LevelIndex = 0 }){ AbstractNumberId = 1 },new NumberingInstance(new AbstractNumId() { Val = 1 }){ NumberID = 1 }); //billpp.Append(element); //billdt.Append(billpp); billdtrun.AppendChild(new Text("* Please provide leads / support for commercialisation")); billdtrun.AppendChild(new Break()); billdtrun.AppendChild(new Text("* All bills must quote the Service request no & the IDF No")); billdtrun.AppendChild(new Break()); billdtrun.AppendChild(new Text("* In case of any delays contact IP office")); billdtrun.AppendChild(new Break()); Paragraph from = body.AppendChild(new Paragraph()); Run fromrun = from.AppendChild(new Run()); fromrun.Append(new Break()); fromrun.Append(new Text("Yours sincerely")); fromrun.Append(new Break()); fromrun.Append(new Text("Chief Manager, IPM Cell")); fromrun.Append(new Break()); fromrun.Append(new Text("Intellectual Property Management Cell")); fromrun.Append(new Break()); fromrun.Append(new Text("Centre for Industrial Consultancy & Sponsored Research")); fromrun.Append(new Break()); fromrun.Append(new Text("IInd floor, IC & SR Bldg., IIT Madras, Chennai 600036. INDIA ")); fromrun.Append(new Break()); fromrun.Append(new Text("Phone: 044-2257 9756/9751; [email protected] / [email protected]")); fromrun.Append(new Break()); fromrun.Append(new Text("IITM IPR Patent Filings: https://icandsr.iitm.ac.in/ipr/Tech.Transfer")); doc.MainDocumentPart.Document.Save(); } System.Web.HttpContext.Current.Response.ContentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"; System.Web.HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=" + docFileName); mem.Seek(0, SeekOrigin.Begin); mem.WriteTo(System.Web.HttpContext.Current.Response.OutputStream); System.Web.HttpContext.Current.Response.Flush(); System.Web.HttpContext.Current.Response.End(); } }
public void DoParagraphBelowTable2(Paragraph paragraph69) { ParagraphProperties paragraphProperties69 = new ParagraphProperties(); ParagraphMarkRunProperties paragraphMarkRunProperties69 = new ParagraphMarkRunProperties(); Vanish vanish1 = new Vanish(); FontSize fontSize118 = new FontSize() { Val = "20" }; paragraphMarkRunProperties69.Append(vanish1); paragraphMarkRunProperties69.Append(fontSize118); paragraphProperties69.Append(paragraphMarkRunProperties69); Run run63 = new Run() { RsidRunProperties = "00D10A17" }; RunProperties runProperties63 = new RunProperties(); RunFonts runFonts131 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize119 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript117 = new FontSizeComplexScript() { Val = "22" }; runProperties63.Append(runFonts131); runProperties63.Append(fontSize119); runProperties63.Append(fontSizeComplexScript117); Text text63 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text63.Text = "RECORDED TEMPERATURE IS ACTUAL READING + CORRECTION "; run63.Append(runProperties63); run63.Append(text63); ProofError proofError45 = new ProofError() { Type = ProofingErrorValues.SpellStart }; Run run64 = new Run() { RsidRunProperties = "00D10A17" }; RunProperties runProperties64 = new RunProperties(); RunFonts runFonts132 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize120 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript118 = new FontSizeComplexScript() { Val = "22" }; runProperties64.Append(runFonts132); runProperties64.Append(fontSize120); runProperties64.Append(fontSizeComplexScript118); Text text64 = new Text(); text64.Text = "FACTOR"; run64.Append(runProperties64); run64.Append(text64); paragraph69.Append(paragraphProperties69); paragraph69.Append(run63); paragraph69.Append(proofError45); paragraph69.Append(run64); }
public TableRow GenerateTableFooterRow(CellProps[] cellProps, UInt32Value height) { // Add table row properties TableRow tableRow1 = new TableRow(); TableRowProperties tableRowProperties1 = generateTableRowProperties(height); tableRow1.Append(tableRowProperties1); foreach (CellProps cp in cellProps) { if (cp.span == 0) continue; TableCell tableCell1 = new TableCell(); TableCellProperties tableCellProperties1 = new TableCellProperties(); TableCellBorders tableCellBorders1; if (cp.boxed) { tableCellBorders1 = generateTableCellBordersBox(); } else { tableCellBorders1 = generateTableCellBordersPlain(); } Shading shading1 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "auto" }; NoWrap noWrap1 = new NoWrap(); TableCellVerticalAlignment tableCellVerticalAlignment1 = new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }; HideMark hideMark1 = new HideMark(); tableCellProperties1.Append(tableCellBorders1); tableCellProperties1.Append(shading1); tableCellProperties1.Append(noWrap1); tableCellProperties1.Append(tableCellVerticalAlignment1); tableCellProperties1.Append(hideMark1); Paragraph paragraph1 = new Paragraph(); ParagraphProperties paragraphProperties1 = new ParagraphProperties(); Justification justification1 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties(); Bold bold1 = new Bold(); BoldComplexScript boldComplexScript1 = new BoldComplexScript(); Color color1 = new Color() { Val = "333399" }; FontSize fontSize1 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript1 = new FontSizeComplexScript() { Val = "18" }; paragraphMarkRunProperties1.Append(bold1); paragraphMarkRunProperties1.Append(boldComplexScript1); paragraphMarkRunProperties1.Append(color1); paragraphMarkRunProperties1.Append(fontSize1); paragraphMarkRunProperties1.Append(fontSizeComplexScript1); paragraphProperties1.Append(justification1); paragraphProperties1.Append(paragraphMarkRunProperties1); Run run1 = new Run(); RunProperties runProperties1 = new RunProperties(); Bold bold2 = new Bold(); BoldComplexScript boldComplexScript2 = new BoldComplexScript(); Color color2 = new Color() { Val = "333399" }; FontSize fontSize2 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript2 = new FontSizeComplexScript() { Val = "18" }; runProperties1.Append(bold2); runProperties1.Append(boldComplexScript2); runProperties1.Append(color2); runProperties1.Append(fontSize2); runProperties1.Append(fontSizeComplexScript2); run1.Append(runProperties1); if (cp.text != null) { Text text1 = new Text(); text1.Text = cp.text; run1.Append(text1); } paragraph1.Append(paragraphProperties1); paragraph1.Append(run1); tableCell1.Append(tableCellProperties1); tableCell1.Append(paragraph1); tableRow1.Append(tableCell1); } return tableRow1; }
private TableRow GenerateDemoTableRow(string ColumnName, List <Member> MemberList) { TableRow tr = new TableRow(); // append the "Rank Name" (First Column) cell Paragraph p0 = new Paragraph(); ParagraphProperties pp0 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines0 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; pp0.Append(spacingBetweenLines0); p0.Append(pp0); Run tr0 = new Run(); if (ColumnName == "Sworn" || ColumnName == "Total") { RunProperties rp0 = new RunProperties(new Bold()); tr0.Append(rp0); } tr0.Append(new Text(ColumnName)); p0.Append(tr0); TableCell tc0 = new TableCell(); TableCellProperties tcp0 = new TableCellProperties(new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }); if (ColumnName == "Sworn" || ColumnName == "Total") { Shading tcs0 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9", ThemeFill = ThemeColorValues.Background1, ThemeFillShade = "D9" }; tcp0.Append(tcs0); } tc0.Append(tcp0); tc0.Append(p0); tr.Append(tc0); // B/M column (this needs a 1.5pt left border) // set properties to apply to all text centering int BMCount = MemberList.Count(x => x.Race.MemberRaceFullName == "Black" && x.Gender.GenderFullName == "Male"); Run tr1 = new Run(); if (ColumnName == "Sworn" || ColumnName == "Total") { RunProperties rp1 = new RunProperties(new Bold()); tr1.Append(rp1); } tr1.Append(new Text(BMCount != 0 ? $"{BMCount}" : "-")); SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphProperties pp1 = new ParagraphProperties(new Justification() { Val = JustificationValues.Center }); pp1.Append(spacingBetweenLines1); Paragraph p1 = new Paragraph(pp1); p1.Append(tr1); TableCellProperties tcp1 = new TableCellProperties(new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }); if (ColumnName == "Sworn" || ColumnName == "Total") { Shading tcs1 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9", ThemeFill = ThemeColorValues.Background1, ThemeFillShade = "D9" }; tcp1.Append(tcs1); } TableCellBorders tcb1 = new TableCellBorders(new LeftBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U }); tcp1.Append(tcb1); TableCell tc1 = new TableCell(tcp1); tc1.Append(p1); tr.Append(tc1); // H/M column int HMCount = MemberList.Count(x => x.Race.MemberRaceFullName == "Hispanic" && x.Gender.GenderFullName == "Male"); Run tr2 = new Run(); if (ColumnName == "Sworn" || ColumnName == "Total") { RunProperties rp2 = new RunProperties(new Bold()); tr2.Append(rp2); } tr2.Append(new Text(HMCount != 0 ? $"{HMCount}" : "-")); SpacingBetweenLines spacingBetweenLines2 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphProperties pp2 = new ParagraphProperties(new Justification() { Val = JustificationValues.Center }); pp2.Append(spacingBetweenLines2); Paragraph p2 = new Paragraph(pp2); p2.Append(tr2); TableCellProperties tcp2 = new TableCellProperties(new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }); if (ColumnName == "Sworn" || ColumnName == "Total") { Shading tcs2 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9", ThemeFill = ThemeColorValues.Background1, ThemeFillShade = "D9" }; tcp2.Append(tcs2); } TableCell tc2 = new TableCell(tcp2); tc2.Append(p2); tr.Append(tc2); // A/M column int AMCount = MemberList.Count(x => x.Race.MemberRaceFullName == "Asian" && x.Gender.GenderFullName == "Male"); Run tr3 = new Run(); if (ColumnName == "Sworn" || ColumnName == "Total") { RunProperties rp3 = new RunProperties(new Bold()); tr3.Append(rp3); } tr3.Append(new Text(AMCount != 0 ? $"{AMCount}" : "-")); SpacingBetweenLines spacingBetweenLines3 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphProperties pp3 = new ParagraphProperties(new Justification() { Val = JustificationValues.Center }); pp3.Append(spacingBetweenLines3); Paragraph p3 = new Paragraph(pp3); p3.Append(tr3); TableCellProperties tcp3 = new TableCellProperties(new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }); if (ColumnName == "Sworn" || ColumnName == "Total") { Shading tcs3 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9", ThemeFill = ThemeColorValues.Background1, ThemeFillShade = "D9" }; tcp3.Append(tcs3); } TableCell tc3 = new TableCell(tcp3); tc3.Append(p3); tr.Append(tc3); // W/M Column int WMCount = MemberList.Count(x => x.Race.MemberRaceFullName == "White" && x.Gender.GenderFullName == "Male"); Run tr4 = new Run(); if (ColumnName == "Sworn" || ColumnName == "Total") { RunProperties rp4 = new RunProperties(new Bold()); tr4.Append(rp4); } tr4.Append(new Text(WMCount != 0 ? $"{WMCount}" : "-")); SpacingBetweenLines spacingBetweenLines4 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphProperties pp4 = new ParagraphProperties(new Justification() { Val = JustificationValues.Center }); pp4.Append(spacingBetweenLines4); Paragraph p4 = new Paragraph(pp4); p4.Append(tr4); TableCellProperties tcp4 = new TableCellProperties(new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }); if (ColumnName == "Sworn" || ColumnName == "Total") { Shading tcs4 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9", ThemeFill = ThemeColorValues.Background1, ThemeFillShade = "D9" }; tcp4.Append(tcs4); } TableCellBorders tcb4 = new TableCellBorders(new RightBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U }); tcp4.Append(tcb4); TableCell tc4 = new TableCell(tcp4); tc4.Append(p4); tr.Append(tc4); // B/F Column int BFCount = MemberList.Count(x => x.Race.MemberRaceFullName == "Black" && x.Gender.GenderFullName == "Female"); Run tr5 = new Run(); if (ColumnName == "Sworn" || ColumnName == "Total") { RunProperties rp5 = new RunProperties(new Bold()); tr5.Append(rp5); } tr5.Append(new Text(BFCount != 0 ? $"{BFCount}" : "-")); SpacingBetweenLines spacingBetweenLines5 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphProperties pp5 = new ParagraphProperties(new Justification() { Val = JustificationValues.Center }); pp5.Append(spacingBetweenLines5); Paragraph p5 = new Paragraph(pp5); p5.Append(tr5); TableCellProperties tcp5 = new TableCellProperties(new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }); if (ColumnName == "Sworn" || ColumnName == "Total") { Shading tcs5 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9", ThemeFill = ThemeColorValues.Background1, ThemeFillShade = "D9" }; tcp5.Append(tcs5); } TableCell tc5 = new TableCell(tcp5); tc5.Append(p5); tr.Append(tc5); // H/F column int HFCount = MemberList.Count(x => x.Race.MemberRaceFullName == "Hispanic" && x.Gender.GenderFullName == "Female"); Run tr6 = new Run(); if (ColumnName == "Sworn" || ColumnName == "Total") { RunProperties rp6 = new RunProperties(new Bold()); tr6.Append(rp6); } tr6.Append(new Text(HFCount != 0 ? $"{HFCount}" : "-")); SpacingBetweenLines spacingBetweenLines6 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphProperties pp6 = new ParagraphProperties(new Justification() { Val = JustificationValues.Center }); pp6.Append(spacingBetweenLines6); Paragraph p6 = new Paragraph(pp6); p6.Append(tr6); TableCellProperties tcp6 = new TableCellProperties(new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }); if (ColumnName == "Sworn" || ColumnName == "Total") { Shading tcs6 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9", ThemeFill = ThemeColorValues.Background1, ThemeFillShade = "D9" }; tcp6.Append(tcs6); } TableCell tc6 = new TableCell(tcp6); tc6.Append(p6); tr.Append(tc6); // A/F column int AFCount = MemberList.Count(x => x.Race.MemberRaceFullName == "Asian" && x.Gender.GenderFullName == "Female"); Run tr7 = new Run(); if (ColumnName == "Sworn" || ColumnName == "Total") { RunProperties rp7 = new RunProperties(new Bold()); tr7.Append(rp7); } tr7.Append(new Text(AFCount != 0 ? $"{AFCount}" : "-")); SpacingBetweenLines spacingBetweenLines7 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphProperties pp7 = new ParagraphProperties(new Justification() { Val = JustificationValues.Center }); pp7.Append(spacingBetweenLines7); Paragraph p7 = new Paragraph(pp7); p7.Append(tr7); TableCellProperties tcp7 = new TableCellProperties(new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }); if (ColumnName == "Sworn" || ColumnName == "Total") { Shading tcs7 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9", ThemeFill = ThemeColorValues.Background1, ThemeFillShade = "D9" }; tcp7.Append(tcs7); } TableCell tc7 = new TableCell(tcp7); tc7.Append(p7); tr.Append(tc7); // W/F Column int WFCount = MemberList.Count(x => x.Race.MemberRaceFullName == "White" && x.Gender.GenderFullName == "Female"); Run tr8 = new Run(); if (ColumnName == "Sworn" || ColumnName == "Total") { RunProperties rp8 = new RunProperties(new Bold()); tr8.Append(rp8); } tr8.Append(new Text(WFCount != 0 ? $"{WFCount}" : "-")); SpacingBetweenLines spacingBetweenLines8 = new SpacingBetweenLines() { After = "0", Line = "280", LineRule = LineSpacingRuleValues.Auto }; ParagraphProperties pp8 = new ParagraphProperties(new Justification() { Val = JustificationValues.Center }); pp8.Append(spacingBetweenLines8); Paragraph p8 = new Paragraph(pp8); p8.Append(tr8); TableCellProperties tcp8 = new TableCellProperties(new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }); if (ColumnName == "Sworn" || ColumnName == "Total") { Shading tcs8 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9", ThemeFill = ThemeColorValues.Background1, ThemeFillShade = "D9" }; tcp8.Append(tcs8); } TableCellBorders tcb8 = new TableCellBorders(new RightBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U }); tcp8.Append(tcb8); TableCell tc8 = new TableCell(tcp8); tc8.Append(p8); tr.Append(tc8); // B/T Column int BTCount = MemberList.Count(x => x.Race.MemberRaceFullName == "Black"); Run tr9 = new Run(); if (ColumnName == "Sworn" || ColumnName == "Total") { RunProperties rp9 = new RunProperties(new Bold()); tr9.Append(rp9); } tr9.Append(new Text(BTCount != 0 ? $"{BTCount}" : "-")); SpacingBetweenLines spacingBetweenLines9 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphProperties pp9 = new ParagraphProperties(new Justification() { Val = JustificationValues.Center }); pp9.Append(spacingBetweenLines9); Paragraph p9 = new Paragraph(pp9); p9.Append(tr9); TableCellProperties tcp9 = new TableCellProperties(new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }); if (ColumnName == "Sworn" || ColumnName == "Total") { Shading tcs9 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9", ThemeFill = ThemeColorValues.Background1, ThemeFillShade = "D9" }; tcp9.Append(tcs9); } TableCell tc9 = new TableCell(tcp9); tc9.Append(p9); tr.Append(tc9); // H/T Column int HTCount = MemberList.Count(x => x.Race.MemberRaceFullName == "Hispanic"); Run tr10 = new Run(); if (ColumnName == "Sworn" || ColumnName == "Total") { RunProperties rp10 = new RunProperties(new Bold()); tr10.Append(rp10); } tr10.Append(new Text(HTCount != 0 ? $"{HTCount}" : "-")); SpacingBetweenLines spacingBetweenLines10 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphProperties pp10 = new ParagraphProperties(new Justification() { Val = JustificationValues.Center }); pp10.Append(spacingBetweenLines10); Paragraph p10 = new Paragraph(pp10); p10.Append(tr10); TableCellProperties tcp10 = new TableCellProperties(new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }); if (ColumnName == "Sworn" || ColumnName == "Total") { Shading tcs10 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9", ThemeFill = ThemeColorValues.Background1, ThemeFillShade = "D9" }; tcp10.Append(tcs10); } TableCell tc10 = new TableCell(tcp10); tc10.Append(p10); tr.Append(tc10); // A/T Column int ATCount = MemberList.Count(x => x.Race.MemberRaceFullName == "Asian"); Run tr11 = new Run(); if (ColumnName == "Sworn" || ColumnName == "Total") { RunProperties rp11 = new RunProperties(new Bold()); tr11.Append(rp11); } tr11.Append(new Text(ATCount != 0 ? $"{ATCount}" : "-")); SpacingBetweenLines spacingBetweenLines11 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphProperties pp11 = new ParagraphProperties(new Justification() { Val = JustificationValues.Center }); pp11.Append(spacingBetweenLines11); Paragraph p11 = new Paragraph(pp11); p11.Append(tr11); TableCellProperties tcp11 = new TableCellProperties(new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }); if (ColumnName == "Sworn" || ColumnName == "Total") { Shading tcs11 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9", ThemeFill = ThemeColorValues.Background1, ThemeFillShade = "D9" }; tcp11.Append(tcs11); } TableCell tc11 = new TableCell(tcp11); tc11.Append(p11); tr.Append(tc11); // W/T Column int WTCount = MemberList.Count(x => x.Race.MemberRaceFullName == "White"); Run tr12 = new Run(); if (ColumnName == "Sworn" || ColumnName == "Total") { RunProperties rp12 = new RunProperties(new Bold()); tr12.Append(rp12); } tr12.Append(new Text(WTCount != 0 ? $"{WTCount}" : "-")); SpacingBetweenLines spacingBetweenLines12 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphProperties pp12 = new ParagraphProperties(new Justification() { Val = JustificationValues.Center }); pp12.Append(spacingBetweenLines12); Paragraph p12 = new Paragraph(pp12); p12.Append(tr12); TableCellProperties tcp12 = new TableCellProperties(new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }); if (ColumnName == "Sworn" || ColumnName == "Total") { Shading tcs12 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9", ThemeFill = ThemeColorValues.Background1, ThemeFillShade = "D9" }; tcp12.Append(tcs12); } TableCellBorders tcb12 = new TableCellBorders(new RightBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U }); tcp12.Append(tcb12); TableCell tc12 = new TableCell(tcp12); tc12.Append(p12); tr.Append(tc12); // TotalForRank column int RankTotalCount = MemberList.Count; Run tr13 = new Run(); if (ColumnName == "Sworn" || ColumnName == "Total") { RunProperties rp13 = new RunProperties(new Bold()); tr13.Append(rp13); } tr13.Append(new Text(RankTotalCount != 0 ? $"{RankTotalCount}" : "-")); SpacingBetweenLines spacingBetweenLines13 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; ParagraphProperties pp13 = new ParagraphProperties(new Justification() { Val = JustificationValues.Center }); pp13.Append(spacingBetweenLines13); Paragraph p13 = new Paragraph(pp13); p13.Append(tr13); TableCellProperties tcp13 = new TableCellProperties(new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }); if (ColumnName == "Sworn" || ColumnName == "Total") { Shading tcs13 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9", ThemeFill = ThemeColorValues.Background1, ThemeFillShade = "D9" }; tcp13.Append(tcs13); } TableCellBorders tcb13 = new TableCellBorders(new RightBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)13U, Space = (UInt32Value)0U }); tcp13.Append(tcb13); TableCell tc13 = new TableCell(tcp13); tc13.Append(p13); tr.Append(tc13); return(tr); }
public ITableCell CreateTableCell(IList <IRun> cellContents, TableCellPropertiesModel cellModel) { if (cellContents == null) { throw new ArgumentNullException("cellContents must not be null"); } if (cellContents.Count == 0) { throw new ArgumentNullException("cellContents must not be an empty list"); } if (cellContents.Any(e => e == null)) { throw new ArgumentNullException("All elements of cellContents must be not null"); } if (cellModel == null) { throw new ArgumentNullException("cellModel must not be null"); } var platformCellTable = PlatformTableCell.New(); if (cellModel != null) { AutoMapper.Mapper.Map(cellModel, platformCellTable.Properties); } TableCell tc = platformCellTable.ContentItem as TableCell; var tableCellProperties = platformCellTable.Properties.ContentItem as TableCellProperties; //tableCellProperties.Append(new TableCellVerticalAlignment { Val = cellModel.TableVerticalAlignementValues.ToOOxml() }); // Modification de la rotation du texte dans la cellule if (cellModel.TextDirectionValues.HasValue) { tableCellProperties.Append(new TextDirection { Val = cellModel.TextDirectionValues.ToOOxml() }); } Paragraph par = new Paragraph(); ParagraphProperties pr = new ParagraphProperties(); // new TableCellVerticalAlignment { Val = cellModel.TableVerticalAlignementValues.ToOOxml() }); //new SpacingBetweenLines() { After = cellModel.SpacingAfter, Before = cellModel.SpacingBefore, Line = "240" }); if (cellModel.Justification.HasValue) { pr.Append(new Justification() { Val = cellModel.Justification.Value.ToOOxml() }); } if (cellModel.ParagraphSolidarity) { pr.Append(new KeepNext()); } par.Append(pr); for (int i = 0; i < cellContents.Count; i++) { par.Append(cellContents[i].ContentItem as Run); } tc.Append(par); return(new PlatformTableCell(tc)); }
private static TableRow GenerateEducationRow(EducationItem education) { TableRow tableRow2 = new TableRow() { RsidTableRowAddition = "009B2C1D", ParagraphId = "1EE453E3", TextId = "77777777" }; TableRowProperties tableRowProperties1 = new TableRowProperties(); GridAfter gridAfter1 = new GridAfter() { Val = 1 }; WidthAfterTableRow widthAfterTableRow1 = new WidthAfterTableRow() { Width = "360", Type = TableWidthUnitValues.Dxa }; tableRowProperties1.Append(gridAfter1); tableRowProperties1.Append(widthAfterTableRow1); TableCell tableCell2 = new TableCell(); TableCellProperties tableCellProperties2 = new TableCellProperties(); TableCellWidth tableCellWidth2 = new TableCellWidth() { Width = "2550", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders2 = new TableCellBorders(); TopBorder topBorder3 = new TopBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; LeftBorder leftBorder3 = new LeftBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; BottomBorder bottomBorder3 = new BottomBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; RightBorder rightBorder3 = new RightBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; tableCellBorders2.Append(topBorder3); tableCellBorders2.Append(leftBorder3); tableCellBorders2.Append(bottomBorder3); tableCellBorders2.Append(rightBorder3); tableCellProperties2.Append(tableCellWidth2); tableCellProperties2.Append(tableCellBorders2); Paragraph paragraph2 = new Paragraph() { RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "009E39C2", ParagraphId = "575EC095", TextId = "74BCD266" }; Run run6 = new Run() { RsidRunAddition = "0007641E" }; RunProperties runProperties6 = new RunProperties(); FontSize fontSize6 = new FontSize() { Val = "22" }; FontSizeComplexScript fontSizeComplexScript6 = new FontSizeComplexScript() { Val = "22" }; runProperties6.Append(fontSize6); runProperties6.Append(fontSizeComplexScript6); Text text6 = new Text(); text6.Text = education.StartingYear + " - " + education.EndingYear; run6.Append(runProperties6); run6.Append(text6); paragraph2.Append(run6); tableCell2.Append(tableCellProperties2); tableCell2.Append(paragraph2); TableCell tableCell3 = new TableCell(); TableCellProperties tableCellProperties3 = new TableCellProperties(); TableCellWidth tableCellWidth3 = new TableCellWidth() { Width = "5700", Type = TableWidthUnitValues.Dxa }; TableCellBorders tableCellBorders3 = new TableCellBorders(); TopBorder topBorder4 = new TopBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; LeftBorder leftBorder4 = new LeftBorder() { Val = BorderValues.Single, Color = "000000", Size = (UInt32Value)1U, Space = (UInt32Value)0U }; BottomBorder bottomBorder4 = new BottomBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; RightBorder rightBorder4 = new RightBorder() { Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; tableCellBorders3.Append(topBorder4); tableCellBorders3.Append(leftBorder4); tableCellBorders3.Append(bottomBorder4); tableCellBorders3.Append(rightBorder4); tableCellProperties3.Append(tableCellWidth3); tableCellProperties3.Append(tableCellBorders3); Paragraph paragraph3 = new Paragraph() { RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "009E39C2", ParagraphId = "690EE799", TextId = "77777777" }; ParagraphProperties paragraphProperties1 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { After = "100", Line = "240", LineRule = LineSpacingRuleValues.Auto }; Indentation indentation1 = new Indentation() { Left = "144" }; paragraphProperties1.Append(spacingBetweenLines1); paragraphProperties1.Append(indentation1); Run run7 = new Run(); RunProperties runProperties7 = new RunProperties(); Bold bold2 = new Bold(); FontSize fontSize7 = new FontSize() { Val = "22" }; FontSizeComplexScript fontSizeComplexScript7 = new FontSizeComplexScript() { Val = "22" }; runProperties7.Append(bold2); runProperties7.Append(fontSize7); runProperties7.Append(fontSizeComplexScript7); Text text7 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text7.Text = education.University?.ToUpper(); run7.Append(runProperties7); run7.Append(text7); paragraph3.Append(paragraphProperties1); paragraph3.Append(run7); Paragraph paragraph4 = new Paragraph() { RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "009E39C2", ParagraphId = "7BD7BFC1", TextId = "77777777" }; ParagraphProperties paragraphProperties2 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines2 = new SpacingBetweenLines() { After = "100", Line = "240", LineRule = LineSpacingRuleValues.Auto }; Indentation indentation2 = new Indentation() { Left = "144" }; paragraphProperties2.Append(spacingBetweenLines2); paragraphProperties2.Append(indentation2); Run run8 = new Run(); RunProperties runProperties8 = new RunProperties(); FontSize fontSize8 = new FontSize() { Val = "22" }; FontSizeComplexScript fontSizeComplexScript8 = new FontSizeComplexScript() { Val = "22" }; runProperties8.Append(fontSize8); runProperties8.Append(fontSizeComplexScript8); Text text8 = new Text(); text8.Text = education.Degree; run8.Append(runProperties8); run8.Append(text8); paragraph4.Append(paragraphProperties2); paragraph4.Append(run8); tableCell3.Append(tableCellProperties3); tableCell3.Append(paragraph3); tableCell3.Append(paragraph4); tableRow2.Append(tableRowProperties1); tableRow2.Append(tableCell2); tableRow2.Append(tableCell3); return(tableRow2); }
public MemoryStream Generate() { var mem = new MemoryStream(); byte[] byteArray = File.ReadAllBytes("Templates/Alpha_Roster_Template.docx"); mem.Write(byteArray, 0, byteArray.Length); using (WordprocessingDocument wordDoc = WordprocessingDocument.Open(mem, true)) { // init Mapped Fields Collection InitializeFieldMap(wordDoc); MainDocumentPart mainPart = wordDoc.MainDocumentPart; // Write the Static fields MappedField componentName = Fields.First(f => f.FieldName == "MainComponentName"); componentName.Write(ComponentName); MappedField rosterDate = Fields.First(f => f.FieldName == "RosterDate"); rosterDate.Write(DateTime.Today.ToShortDateString()); Table rosterTable = mainPart.Document.Body.Elements <Table>().ElementAt(0); foreach (Member m in Members.OrderBy(x => x.LastName)) { TableRow tr = new TableRow(); tr.Append(new TableCell(new Paragraph(new Run(new Text(m.Position.Name))))); tr.Append(new TableCell(new Paragraph(new Run(new Text(m.GetLastNameFirstName()))))); tr.Append(new TableCell(new Paragraph(new Run(new Text(m.Rank.RankFullName))))); // we have to build the paragraph to set the justification inside the cell for these values Paragraph p1 = new Paragraph(); ParagraphProperties pp1 = new ParagraphProperties(); Justification pj1 = new Justification() { Val = JustificationValues.Center }; pp1.Append(pj1); p1.Append(pp1); p1.Append(new Run(new Text($"{m.Race.Abbreviation}/{m.Gender.Abbreviation}"))); tr.Append(new TableCell(p1)); // same here... I want this cell to be centered Paragraph p2 = new Paragraph(); // I learned the hard way that I need to append the centering Justification to the paragraph // BEFORE the run, or it won't center. ParagraphProperties pp2 = new ParagraphProperties(); Justification pj2 = new Justification() { Val = JustificationValues.Center }; pp2.Append(pj2); p2.Append(pp2); p2.Append(new Run(new Text($"#{m.IdNumber}"))); tr.Append(new TableCell(p2)); rosterTable.Append(tr); } Table demoTable = mainPart.Document.Body.Elements <Table>().ElementAt(1); List <Rank> distinctRankList = Members.Select(x => x.Rank).OrderByDescending(x => x.RankId).Distinct().ToList(); foreach (Rank r in distinctRankList) { List <Member> RankMembers = Members.Where(x => x.Rank == r).ToList(); demoTable.Append(GenerateDemoTableRow(r.RankFullName, RankMembers)); } List <Member> SwornMembers = Members.Where(x => x.Rank.IsSworn).ToList(); demoTable.Append(GenerateDemoTableRow("Sworn", SwornMembers)); List <Member> CivilianMembers = Members.Where(x => x.Rank.IsSworn == false).ToList(); demoTable.Append(GenerateDemoTableRow("Civilian", CivilianMembers)); demoTable.Append(GenerateDemoTableRow("Total", Members)); mainPart.Document.Save(); } mem.Seek(0, SeekOrigin.Begin); return(mem); }
// Generates content of mainDocumentPart1. private void GenerateMainDocumentPart1Content(MainDocumentPart mainDocumentPart1) { Document document1 = new Document() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15 wp14" } }; document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"); document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"); document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"); document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); document1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml"); document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"); document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk"); document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml"); document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"); Body body1 = new Body(); Paragraph paragraph1 = new Paragraph() { RsidParagraphMarkRevision = "00417926", RsidParagraphAddition = "002C2DE6", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00417926" }; ParagraphProperties paragraphProperties1 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { After = "0" }; Justification justification1 = new Justification() { Val = JustificationValues.Center }; ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties(); RunFonts runFonts1 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold1 = new Bold(); FontSize fontSize1 = new FontSize() { Val = "30" }; paragraphMarkRunProperties1.Append(runFonts1); paragraphMarkRunProperties1.Append(bold1); paragraphMarkRunProperties1.Append(fontSize1); paragraphProperties1.Append(spacingBetweenLines1); paragraphProperties1.Append(justification1); paragraphProperties1.Append(paragraphMarkRunProperties1); Run run1 = new Run() { RsidRunProperties = "00417926" }; RunProperties runProperties1 = new RunProperties(); RunFonts runFonts2 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold2 = new Bold(); FontSize fontSize2 = new FontSize() { Val = "30" }; runProperties1.Append(runFonts2); runProperties1.Append(bold2); runProperties1.Append(fontSize2); Text text1 = new Text(); text1.Text = "Hard To Find Books"; run1.Append(runProperties1); run1.Append(text1); paragraph1.Append(paragraphProperties1); paragraph1.Append(run1); Paragraph paragraph2 = new Paragraph() { RsidParagraphMarkRevision = "00417926", RsidParagraphAddition = "00417926", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00417926" }; ParagraphProperties paragraphProperties2 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines2 = new SpacingBetweenLines() { After = "0" }; Justification justification2 = new Justification() { Val = JustificationValues.Center }; ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties(); RunFonts runFonts3 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold3 = new Bold(); FontSize fontSize3 = new FontSize() { Val = "30" }; paragraphMarkRunProperties2.Append(runFonts3); paragraphMarkRunProperties2.Append(bold3); paragraphMarkRunProperties2.Append(fontSize3); paragraphProperties2.Append(spacingBetweenLines2); paragraphProperties2.Append(justification2); paragraphProperties2.Append(paragraphMarkRunProperties2); Run run2 = new Run() { RsidRunProperties = "00417926" }; RunProperties runProperties2 = new RunProperties(); RunFonts runFonts4 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold4 = new Bold(); FontSize fontSize4 = new FontSize() { Val = "30" }; runProperties2.Append(runFonts4); runProperties2.Append(bold4); runProperties2.Append(fontSize4); Text text2 = new Text(); text2.Text = "Internet NZ Ltd."; run2.Append(runProperties2); run2.Append(text2); paragraph2.Append(paragraphProperties2); paragraph2.Append(run2); Paragraph paragraph3 = new Paragraph() { RsidParagraphMarkRevision = "00417926", RsidParagraphAddition = "00417926", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00417926" }; ParagraphProperties paragraphProperties3 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines3 = new SpacingBetweenLines() { After = "0" }; Justification justification3 = new Justification() { Val = JustificationValues.Center }; ParagraphMarkRunProperties paragraphMarkRunProperties3 = new ParagraphMarkRunProperties(); RunFonts runFonts5 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize5 = new FontSize() { Val = "16" }; paragraphMarkRunProperties3.Append(runFonts5); paragraphMarkRunProperties3.Append(fontSize5); paragraphProperties3.Append(spacingBetweenLines3); paragraphProperties3.Append(justification3); paragraphProperties3.Append(paragraphMarkRunProperties3); Run run3 = new Run() { RsidRunProperties = "00417926" }; RunProperties runProperties3 = new RunProperties(); RunFonts runFonts6 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize6 = new FontSize() { Val = "16" }; runProperties3.Append(runFonts6); runProperties3.Append(fontSize6); Text text3 = new Text(); text3.Text = "PO Box 5645 Moray Pl, Dunedin 9058, New Zealand"; run3.Append(runProperties3); run3.Append(text3); paragraph3.Append(paragraphProperties3); paragraph3.Append(run3); Paragraph paragraph4 = new Paragraph() { RsidParagraphMarkRevision = "00417926", RsidParagraphAddition = "00417926", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00417926" }; ParagraphProperties paragraphProperties4 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines4 = new SpacingBetweenLines() { After = "0" }; Justification justification4 = new Justification() { Val = JustificationValues.Center }; ParagraphMarkRunProperties paragraphMarkRunProperties4 = new ParagraphMarkRunProperties(); RunFonts runFonts7 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize7 = new FontSize() { Val = "16" }; paragraphMarkRunProperties4.Append(runFonts7); paragraphMarkRunProperties4.Append(fontSize7); paragraphProperties4.Append(spacingBetweenLines4); paragraphProperties4.Append(justification4); paragraphProperties4.Append(paragraphMarkRunProperties4); Run run4 = new Run() { RsidRunProperties = "00417926" }; RunProperties runProperties4 = new RunProperties(); RunFonts runFonts8 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize8 = new FontSize() { Val = "16" }; runProperties4.Append(runFonts8); runProperties4.Append(fontSize8); Text text4 = new Text(); text4.Text = "Phone: +64 3 4745983, Email: [email protected]"; run4.Append(runProperties4); run4.Append(text4); BookmarkStart bookmarkStart1 = new BookmarkStart() { Name = "_GoBack", Id = "0" }; BookmarkEnd bookmarkEnd1 = new BookmarkEnd() { Id = "0" }; paragraph4.Append(paragraphProperties4); paragraph4.Append(run4); paragraph4.Append(bookmarkStart1); paragraph4.Append(bookmarkEnd1); Paragraph paragraph5 = new Paragraph() { RsidParagraphMarkRevision = "00417926", RsidParagraphAddition = "00417926", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00417926" }; ParagraphProperties paragraphProperties5 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines5 = new SpacingBetweenLines() { After = "0" }; Justification justification5 = new Justification() { Val = JustificationValues.Center }; ParagraphMarkRunProperties paragraphMarkRunProperties5 = new ParagraphMarkRunProperties(); RunFonts runFonts9 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize9 = new FontSize() { Val = "16" }; paragraphMarkRunProperties5.Append(runFonts9); paragraphMarkRunProperties5.Append(fontSize9); paragraphProperties5.Append(spacingBetweenLines5); paragraphProperties5.Append(justification5); paragraphProperties5.Append(paragraphMarkRunProperties5); Run run5 = new Run() { RsidRunProperties = "00417926" }; RunProperties runProperties5 = new RunProperties(); RunFonts runFonts10 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize10 = new FontSize() { Val = "16" }; runProperties5.Append(runFonts10); runProperties5.Append(fontSize10); Text text5 = new Text(); text5.Text = "GST: 70-526-627 Website: www.hardtofind.co.nz"; run5.Append(runProperties5); run5.Append(text5); paragraph5.Append(paragraphProperties5); paragraph5.Append(run5); Paragraph paragraph6 = new Paragraph() { RsidParagraphAddition = "00910498", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00910498" }; ParagraphProperties paragraphProperties6 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines6 = new SpacingBetweenLines() { After = "0" }; ParagraphMarkRunProperties paragraphMarkRunProperties6 = new ParagraphMarkRunProperties(); RunFonts runFonts11 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; paragraphMarkRunProperties6.Append(runFonts11); paragraphProperties6.Append(spacingBetweenLines6); paragraphProperties6.Append(paragraphMarkRunProperties6); paragraph6.Append(paragraphProperties6); Paragraph paragraph7 = new Paragraph() { RsidParagraphAddition = "00910498", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00910498" }; ParagraphProperties paragraphProperties7 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines7 = new SpacingBetweenLines() { After = "0" }; ParagraphMarkRunProperties paragraphMarkRunProperties7 = new ParagraphMarkRunProperties(); RunFonts runFonts12 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; paragraphMarkRunProperties7.Append(runFonts12); SectionProperties sectionProperties1 = new SectionProperties() { RsidR = "00910498" }; PageSize pageSize1 = new PageSize() { Width = (UInt32Value)11906U, Height = (UInt32Value)16838U }; PageMargin pageMargin1 = new PageMargin() { Top = 1440, Right = (UInt32Value)1440U, Bottom = 1440, Left = (UInt32Value)1440U, Header = (UInt32Value)708U, Footer = (UInt32Value)708U, Gutter = (UInt32Value)0U }; Columns columns1 = new Columns() { Space = "708" }; DocGrid docGrid1 = new DocGrid() { LinePitch = 360 }; sectionProperties1.Append(pageSize1); sectionProperties1.Append(pageMargin1); sectionProperties1.Append(columns1); sectionProperties1.Append(docGrid1); paragraphProperties7.Append(spacingBetweenLines7); paragraphProperties7.Append(paragraphMarkRunProperties7); paragraphProperties7.Append(sectionProperties1); paragraph7.Append(paragraphProperties7); Paragraph paragraph8 = new Paragraph() { RsidParagraphAddition = "00417926", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00417926" }; ParagraphProperties paragraphProperties8 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines8 = new SpacingBetweenLines() { After = "0" }; ParagraphMarkRunProperties paragraphMarkRunProperties8 = new ParagraphMarkRunProperties(); RunFonts runFonts13 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize11 = new FontSize() { Val = "24" }; paragraphMarkRunProperties8.Append(runFonts13); paragraphMarkRunProperties8.Append(fontSize11); paragraphProperties8.Append(spacingBetweenLines8); paragraphProperties8.Append(paragraphMarkRunProperties8); Run run6 = new Run() { RsidRunProperties = "00417926" }; RunProperties runProperties6 = new RunProperties(); RunFonts runFonts14 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize12 = new FontSize() { Val = "24" }; runProperties6.Append(runFonts14); runProperties6.Append(fontSize12); LastRenderedPageBreak lastRenderedPageBreak1 = new LastRenderedPageBreak(); Text text6 = new Text(); text6.Text = "Invoice:"; run6.Append(runProperties6); run6.Append(lastRenderedPageBreak1); run6.Append(text6); paragraph8.Append(paragraphProperties8); paragraph8.Append(run6); Paragraph paragraph9 = new Paragraph() { RsidParagraphAddition = "00417926", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00910498" }; ParagraphProperties paragraphProperties9 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines9 = new SpacingBetweenLines() { After = "0" }; ParagraphMarkRunProperties paragraphMarkRunProperties9 = new ParagraphMarkRunProperties(); RunFonts runFonts15 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize13 = new FontSize() { Val = "24" }; paragraphMarkRunProperties9.Append(runFonts15); paragraphMarkRunProperties9.Append(fontSize13); paragraphProperties9.Append(spacingBetweenLines9); paragraphProperties9.Append(paragraphMarkRunProperties9); Run run7 = new Run(); RunProperties runProperties7 = new RunProperties(); RunFonts runFonts16 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize14 = new FontSize() { Val = "24" }; runProperties7.Append(runFonts16); runProperties7.Append(fontSize14); TabChar tabChar1 = new TabChar(); Text text7 = new Text(); //TODO add in customer name if(customer != null) text7.Text = customer.firstName + " " + customer.lastName; else text7.Text = order.firstName + " " + order.lastName; run7.Append(runProperties7); run7.Append(tabChar1); run7.Append(text7); paragraph9.Append(paragraphProperties9); paragraph9.Append(run7); Paragraph paragraphInstitute = new Paragraph() { RsidParagraphAddition = "00417926", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00910498" }; ParagraphProperties paragraphInstituteProperties = new ParagraphProperties(); SpacingBetweenLines institudeSpacingBetweenLines = new SpacingBetweenLines() { After = "0" }; ParagraphMarkRunProperties paragraphInstituteMarkRunProperties = new ParagraphMarkRunProperties(); RunFonts paragraphRunFonts = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize paragraphFontSize = new FontSize() { Val = "24" }; paragraphInstituteMarkRunProperties.Append(paragraphRunFonts); paragraphInstituteMarkRunProperties.Append(paragraphFontSize); paragraphInstituteProperties.Append(institudeSpacingBetweenLines); paragraphInstituteProperties.Append(paragraphInstituteMarkRunProperties); Run instituteRun = new Run(); RunProperties instituteRunProperties = new RunProperties(); RunFonts instituteRunFonts = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize instituteFontSize = new FontSize() { Val = "24" }; instituteRunProperties.Append(instituteRunFonts); instituteRunProperties.Append(instituteFontSize); TabChar instituteTabChar = new TabChar(); Text instituteText = new Text(); //TODO add in institute instituteText.Text = customer.institution; instituteRun.Append(instituteRunProperties); instituteRun.Append(instituteTabChar); instituteRun.Append(instituteText); paragraphInstitute.Append(paragraphInstituteProperties); paragraphInstitute.Append(instituteRun); Paragraph paragraph10 = new Paragraph() { RsidParagraphAddition = "00910498", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00910498" }; ParagraphProperties paragraphProperties10 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines10 = new SpacingBetweenLines() { After = "0" }; ParagraphMarkRunProperties paragraphMarkRunProperties10 = new ParagraphMarkRunProperties(); RunFonts runFonts17 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize15 = new FontSize() { Val = "24" }; paragraphMarkRunProperties10.Append(runFonts17); paragraphMarkRunProperties10.Append(fontSize15); paragraphProperties10.Append(spacingBetweenLines10); paragraphProperties10.Append(paragraphMarkRunProperties10); Run run8 = new Run(); RunProperties runProperties8 = new RunProperties(); RunFonts runFonts18 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize16 = new FontSize() { Val = "24" }; runProperties8.Append(runFonts18); runProperties8.Append(fontSize16); TabChar tabChar2 = new TabChar(); Text text8 = new Text(); //TODO add in address1 //text8.Text = "62 Seaview Avenue"; if(customer != null) text8.Text = customer.address1; else text8.Text = ""; run8.Append(runProperties8); run8.Append(tabChar2); run8.Append(text8); paragraph10.Append(paragraphProperties10); paragraph10.Append(run8); Paragraph paragraph11 = new Paragraph() { RsidParagraphAddition = "00910498", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00910498" }; ParagraphProperties paragraphProperties11 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines11 = new SpacingBetweenLines() { After = "0" }; ParagraphMarkRunProperties paragraphMarkRunProperties11 = new ParagraphMarkRunProperties(); RunFonts runFonts19 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize17 = new FontSize() { Val = "24" }; paragraphMarkRunProperties11.Append(runFonts19); paragraphMarkRunProperties11.Append(fontSize17); paragraphProperties11.Append(spacingBetweenLines11); paragraphProperties11.Append(paragraphMarkRunProperties11); Run run9 = new Run(); RunProperties runProperties9 = new RunProperties(); RunFonts runFonts20 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize18 = new FontSize() { Val = "24" }; runProperties9.Append(runFonts20); runProperties9.Append(fontSize18); TabChar tabChar3 = new TabChar(); Text text9 = new Text(); //TODO add in address2 //text9.Text = "Northcote"; if(customer != null) text9.Text = customer.address2; else text9.Text = ""; run9.Append(runProperties9); run9.Append(tabChar3); run9.Append(text9); paragraph11.Append(paragraphProperties11); paragraph11.Append(run9); Paragraph paragraph12 = new Paragraph() { RsidParagraphAddition = "00910498", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00910498" }; ParagraphProperties paragraphProperties12 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines12 = new SpacingBetweenLines() { After = "0" }; ParagraphMarkRunProperties paragraphMarkRunProperties12 = new ParagraphMarkRunProperties(); RunFonts runFonts21 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize19 = new FontSize() { Val = "24" }; paragraphMarkRunProperties12.Append(runFonts21); paragraphMarkRunProperties12.Append(fontSize19); paragraphProperties12.Append(spacingBetweenLines12); paragraphProperties12.Append(paragraphMarkRunProperties12); Run run10 = new Run(); RunProperties runProperties10 = new RunProperties(); RunFonts runFonts22 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize20 = new FontSize() { Val = "24" }; runProperties10.Append(runFonts22); runProperties10.Append(fontSize20); TabChar tabChar4 = new TabChar(); Text text10 = new Text(); //TODO add in address3 //text10.Text = "Auckland"; if(customer != null) text10.Text = customer.address3; else text10.Text = ""; run10.Append(runProperties10); run10.Append(tabChar4); run10.Append(text10); paragraph12.Append(paragraphProperties12); paragraph12.Append(run10); Paragraph paragraph13 = new Paragraph() { RsidParagraphAddition = "00910498", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00910498" }; ParagraphProperties paragraphProperties13 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines13 = new SpacingBetweenLines() { After = "0" }; ParagraphMarkRunProperties paragraphMarkRunProperties13 = new ParagraphMarkRunProperties(); RunFonts runFonts23 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize21 = new FontSize() { Val = "24" }; paragraphMarkRunProperties13.Append(runFonts23); paragraphMarkRunProperties13.Append(fontSize21); paragraphProperties13.Append(spacingBetweenLines13); paragraphProperties13.Append(paragraphMarkRunProperties13); Run run11 = new Run(); RunProperties runProperties11 = new RunProperties(); RunFonts runFonts24 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize22 = new FontSize() { Val = "24" }; runProperties11.Append(runFonts24); runProperties11.Append(fontSize22); TabChar tabChar5 = new TabChar(); Text text11 = new Text(); //TODO add in postcode //text11.Text = "0627"; if(customer != null) text11.Text = customer.postCode; else text11.Text = ""; run11.Append(runProperties11); run11.Append(tabChar5); run11.Append(text11); paragraph13.Append(paragraphProperties13); paragraph13.Append(run11); Paragraph paragraph14 = new Paragraph() { RsidParagraphAddition = "00910498", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00910498" }; ParagraphProperties paragraphProperties14 = new ParagraphProperties(); SpacingBetweenLines spacingBetweenLines14 = new SpacingBetweenLines() { After = "0" }; ParagraphMarkRunProperties paragraphMarkRunProperties14 = new ParagraphMarkRunProperties(); RunFonts runFonts25 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize23 = new FontSize() { Val = "24" }; paragraphMarkRunProperties14.Append(runFonts25); paragraphMarkRunProperties14.Append(fontSize23); paragraphProperties14.Append(spacingBetweenLines14); paragraphProperties14.Append(paragraphMarkRunProperties14); Run run12 = new Run(); RunProperties runProperties12 = new RunProperties(); RunFonts runFonts26 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize24 = new FontSize() { Val = "24" }; runProperties12.Append(runFonts26); runProperties12.Append(fontSize24); TabChar tabChar6 = new TabChar(); Text text12 = new Text(); //TODO add in country if(customer != null) text12.Text = customer.country; else text12.Text = ""; run12.Append(runProperties12); run12.Append(tabChar6); run12.Append(text12); paragraph14.Append(paragraphProperties14); paragraph14.Append(run12); Paragraph paragraph15 = new Paragraph() { RsidParagraphAddition = "003F6835", RsidParagraphProperties = "003F6835", RsidRunAdditionDefault = "00910498" }; ParagraphProperties paragraphProperties15 = new ParagraphProperties(); Tabs tabs1 = new Tabs(); TabStop tabStop1 = new TabStop() { Val = TabStopValues.Left, Position = 2835 }; tabs1.Append(tabStop1); SpacingBetweenLines spacingBetweenLines15 = new SpacingBetweenLines() { After = "0" }; ParagraphMarkRunProperties paragraphMarkRunProperties15 = new ParagraphMarkRunProperties(); RunFonts runFonts27 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize25 = new FontSize() { Val = "24" }; paragraphMarkRunProperties15.Append(runFonts27); paragraphMarkRunProperties15.Append(fontSize25); paragraphProperties15.Append(tabs1); paragraphProperties15.Append(spacingBetweenLines15); paragraphProperties15.Append(paragraphMarkRunProperties15); Run run13 = new Run(); RunProperties runProperties13 = new RunProperties(); RunFonts runFonts28 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize26 = new FontSize() { Val = "24" }; runProperties13.Append(runFonts28); runProperties13.Append(fontSize26); Break break1 = new Break() { Type = BreakValues.Column }; run13.Append(runProperties13); run13.Append(break1); paragraph15.Append(paragraphProperties15); paragraph15.Append(run13); Table table1 = new Table(); TableProperties tableProperties1 = new TableProperties(); TableStyle tableStyle1 = new TableStyle() { Val = "TableGrid" }; TableWidth tableWidth1 = new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto }; TableBorders tableBorders1 = new TableBorders(); TopBorder topBorder1 = new TopBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; tableBorders1.Append(topBorder1); tableBorders1.Append(leftBorder1); tableBorders1.Append(bottomBorder1); tableBorders1.Append(rightBorder1); tableBorders1.Append(insideHorizontalBorder1); tableBorders1.Append(insideVerticalBorder1); TableLook tableLook1 = new TableLook() { Val = "04A0", FirstRow = true, LastRow = false, FirstColumn = true, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = true }; tableProperties1.Append(tableStyle1); tableProperties1.Append(tableWidth1); tableProperties1.Append(tableBorders1); tableProperties1.Append(tableLook1); TableGrid tableGrid1 = new TableGrid(); GridColumn gridColumn1 = new GridColumn() { Width = "3006" }; GridColumn gridColumn2 = new GridColumn() { Width = "255" }; GridColumn gridColumn3 = new GridColumn() { Width = "1099" }; tableGrid1.Append(gridColumn1); tableGrid1.Append(gridColumn2); tableGrid1.Append(gridColumn3); TableRow tableRow1 = new TableRow() { RsidTableRowMarkRevision = "00613B48", RsidTableRowAddition = "00613B48", RsidTableRowProperties = "00613B48" }; TableCell tableCell1 = new TableCell(); TableCellProperties tableCellProperties1 = new TableCellProperties(); TableCellWidth tableCellWidth1 = new TableCellWidth() { Width = "3006", Type = TableWidthUnitValues.Dxa }; tableCellProperties1.Append(tableCellWidth1); Paragraph paragraph16 = new Paragraph() { RsidParagraphMarkRevision = "00613B48", RsidParagraphAddition = "00613B48", RsidParagraphProperties = "00AB530E", RsidRunAdditionDefault = "00613B48" }; ParagraphProperties paragraphProperties16 = new ParagraphProperties(); ParagraphMarkRunProperties paragraphMarkRunProperties16 = new ParagraphMarkRunProperties(); RunFonts runFonts29 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize27 = new FontSize() { Val = "24" }; paragraphMarkRunProperties16.Append(runFonts29); paragraphMarkRunProperties16.Append(fontSize27); paragraphProperties16.Append(paragraphMarkRunProperties16); Run run14 = new Run() { RsidRunProperties = "00613B48" }; RunProperties runProperties14 = new RunProperties(); RunFonts runFonts30 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize28 = new FontSize() { Val = "24" }; runProperties14.Append(runFonts30); runProperties14.Append(fontSize28); Text text13 = new Text(); text13.Text = "Date:"; run14.Append(runProperties14); run14.Append(text13); paragraph16.Append(paragraphProperties16); paragraph16.Append(run14); tableCell1.Append(tableCellProperties1); tableCell1.Append(paragraph16); TableCell tableCell2 = new TableCell(); TableCellProperties tableCellProperties2 = new TableCellProperties(); TableCellWidth tableCellWidth2 = new TableCellWidth() { Width = "1354", Type = TableWidthUnitValues.Dxa }; GridSpan gridSpan1 = new GridSpan() { Val = 2 }; tableCellProperties2.Append(tableCellWidth2); tableCellProperties2.Append(gridSpan1); Paragraph paragraph17 = new Paragraph() { RsidParagraphMarkRevision = "00613B48", RsidParagraphAddition = "00613B48", RsidParagraphProperties = "00613B48", RsidRunAdditionDefault = "00613B48" }; ParagraphProperties paragraphProperties17 = new ParagraphProperties(); Justification justification6 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties17 = new ParagraphMarkRunProperties(); RunFonts runFonts31 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize29 = new FontSize() { Val = "24" }; paragraphMarkRunProperties17.Append(runFonts31); paragraphMarkRunProperties17.Append(fontSize29); paragraphProperties17.Append(justification6); paragraphProperties17.Append(paragraphMarkRunProperties17); Run run15 = new Run() { RsidRunProperties = "00613B48" }; RunProperties runProperties15 = new RunProperties(); RunFonts runFonts32 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize30 = new FontSize() { Val = "24" }; runProperties15.Append(runFonts32); runProperties15.Append(fontSize30); Text text14 = new Text(); //TODO add invoice date //text14.Text = "2/02/2016"; text14.Text = order.invoiceDate.ToString("d/MM/yyyy"); ; run15.Append(runProperties15); run15.Append(text14); paragraph17.Append(paragraphProperties17); paragraph17.Append(run15); tableCell2.Append(tableCellProperties2); tableCell2.Append(paragraph17); tableRow1.Append(tableCell1); tableRow1.Append(tableCell2); TableRow tableRow2 = new TableRow() { RsidTableRowMarkRevision = "00613B48", RsidTableRowAddition = "00613B48", RsidTableRowProperties = "009B6C59" }; TableCell tableCell3 = new TableCell(); TableCellProperties tableCellProperties3 = new TableCellProperties(); TableCellWidth tableCellWidth3 = new TableCellWidth() { Width = "3261", Type = TableWidthUnitValues.Dxa }; GridSpan gridSpan2 = new GridSpan() { Val = 2 }; tableCellProperties3.Append(tableCellWidth3); tableCellProperties3.Append(gridSpan2); Paragraph paragraph18 = new Paragraph() { RsidParagraphMarkRevision = "00613B48", RsidParagraphAddition = "00613B48", RsidParagraphProperties = "00AB530E", RsidRunAdditionDefault = "00613B48" }; ParagraphProperties paragraphProperties18 = new ParagraphProperties(); ParagraphMarkRunProperties paragraphMarkRunProperties18 = new ParagraphMarkRunProperties(); RunFonts runFonts33 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize31 = new FontSize() { Val = "24" }; paragraphMarkRunProperties18.Append(runFonts33); paragraphMarkRunProperties18.Append(fontSize31); paragraphProperties18.Append(paragraphMarkRunProperties18); Run run16 = new Run() { RsidRunProperties = "00613B48" }; RunProperties runProperties16 = new RunProperties(); RunFonts runFonts34 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize32 = new FontSize() { Val = "24" }; runProperties16.Append(runFonts34); runProperties16.Append(fontSize32); Text text15 = new Text(); text15.Text = "GST Tax Invoice Number:"; run16.Append(runProperties16); run16.Append(text15); paragraph18.Append(paragraphProperties18); paragraph18.Append(run16); tableCell3.Append(tableCellProperties3); tableCell3.Append(paragraph18); TableCell tableCell4 = new TableCell(); TableCellProperties tableCellProperties4 = new TableCellProperties(); TableCellWidth tableCellWidth4 = new TableCellWidth() { Width = "1099", Type = TableWidthUnitValues.Dxa }; tableCellProperties4.Append(tableCellWidth4); Paragraph paragraph19 = new Paragraph() { RsidParagraphMarkRevision = "00613B48", RsidParagraphAddition = "00613B48", RsidParagraphProperties = "00613B48", RsidRunAdditionDefault = "00613B48" }; ParagraphProperties paragraphProperties19 = new ParagraphProperties(); Justification justification7 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties19 = new ParagraphMarkRunProperties(); RunFonts runFonts35 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize33 = new FontSize() { Val = "24" }; paragraphMarkRunProperties19.Append(runFonts35); paragraphMarkRunProperties19.Append(fontSize33); paragraphProperties19.Append(justification7); paragraphProperties19.Append(paragraphMarkRunProperties19); Run run17 = new Run() { RsidRunProperties = "00613B48" }; RunProperties runProperties17 = new RunProperties(); RunFonts runFonts36 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize34 = new FontSize() { Val = "24" }; runProperties17.Append(runFonts36); runProperties17.Append(fontSize34); Text text16 = new Text(); //TODO add invoice number/orderID //text16.Text = "39248"; text16.Text = order.orderID.ToString(); run17.Append(runProperties17); run17.Append(text16); paragraph19.Append(paragraphProperties19); paragraph19.Append(run17); tableCell4.Append(tableCellProperties4); tableCell4.Append(paragraph19); tableRow2.Append(tableCell3); tableRow2.Append(tableCell4); TableRow tableRow3 = new TableRow() { RsidTableRowMarkRevision = "00613B48", RsidTableRowAddition = "00613B48", RsidTableRowProperties = "00613B48" }; TableCell tableCell5 = new TableCell(); TableCellProperties tableCellProperties5 = new TableCellProperties(); TableCellWidth tableCellWidth5 = new TableCellWidth() { Width = "3006", Type = TableWidthUnitValues.Dxa }; tableCellProperties5.Append(tableCellWidth5); Paragraph paragraph20 = new Paragraph() { RsidParagraphMarkRevision = "00613B48", RsidParagraphAddition = "00613B48", RsidParagraphProperties = "00AB530E", RsidRunAdditionDefault = "00613B48" }; ParagraphProperties paragraphProperties20 = new ParagraphProperties(); ParagraphMarkRunProperties paragraphMarkRunProperties20 = new ParagraphMarkRunProperties(); RunFonts runFonts37 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize35 = new FontSize() { Val = "24" }; paragraphMarkRunProperties20.Append(runFonts37); paragraphMarkRunProperties20.Append(fontSize35); paragraphProperties20.Append(paragraphMarkRunProperties20); Run run18 = new Run() { RsidRunProperties = "00613B48" }; RunProperties runProperties18 = new RunProperties(); RunFonts runFonts38 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize36 = new FontSize() { Val = "24" }; runProperties18.Append(runFonts38); runProperties18.Append(fontSize36); Text text17 = new Text(); text17.Text = "Your Reference:"; run18.Append(runProperties18); run18.Append(text17); paragraph20.Append(paragraphProperties20); paragraph20.Append(run18); tableCell5.Append(tableCellProperties5); tableCell5.Append(paragraph20); TableCell tableCell6 = new TableCell(); TableCellProperties tableCellProperties6 = new TableCellProperties(); TableCellWidth tableCellWidth6 = new TableCellWidth() { Width = "1354", Type = TableWidthUnitValues.Dxa }; GridSpan gridSpan3 = new GridSpan() { Val = 2 }; tableCellProperties6.Append(tableCellWidth6); tableCellProperties6.Append(gridSpan3); Paragraph paragraph21 = new Paragraph() { RsidParagraphMarkRevision = "00613B48", RsidParagraphAddition = "00613B48", RsidParagraphProperties = "00613B48", RsidRunAdditionDefault = "00613B48" }; ParagraphProperties paragraphProperties21 = new ParagraphProperties(); Justification justification8 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties21 = new ParagraphMarkRunProperties(); RunFonts runFonts39 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize37 = new FontSize() { Val = "24" }; paragraphMarkRunProperties21.Append(runFonts39); paragraphMarkRunProperties21.Append(fontSize37); paragraphProperties21.Append(justification8); paragraphProperties21.Append(paragraphMarkRunProperties21); Run run19 = new Run() { RsidRunProperties = "00613B48" }; RunProperties runProperties19 = new RunProperties(); RunFonts runFonts40 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize38 = new FontSize() { Val = "24" }; runProperties19.Append(runFonts40); runProperties19.Append(fontSize38); Text text18 = new Text(); //TODO add order reference //text18.Text = "Visa"; text18.Text = order.orderReference; run19.Append(runProperties19); run19.Append(text18); paragraph21.Append(paragraphProperties21); paragraph21.Append(run19); tableCell6.Append(tableCellProperties6); tableCell6.Append(paragraph21); tableRow3.Append(tableCell5); tableRow3.Append(tableCell6); table1.Append(tableProperties1); table1.Append(tableGrid1); table1.Append(tableRow1); table1.Append(tableRow2); table1.Append(tableRow3); Paragraph paragraph22 = new Paragraph() { RsidParagraphAddition = "00EA7D1E", RsidParagraphProperties = "007F61F5", RsidRunAdditionDefault = "00EA7D1E" }; ParagraphProperties paragraphProperties22 = new ParagraphProperties(); Tabs tabs2 = new Tabs(); TabStop tabStop2 = new TabStop() { Val = TabStopValues.Left, Position = 3119 }; tabs2.Append(tabStop2); SpacingBetweenLines spacingBetweenLines16 = new SpacingBetweenLines() { After = "0" }; ParagraphMarkRunProperties paragraphMarkRunProperties22 = new ParagraphMarkRunProperties(); RunFonts runFonts41 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize39 = new FontSize() { Val = "24" }; paragraphMarkRunProperties22.Append(runFonts41); paragraphMarkRunProperties22.Append(fontSize39); paragraphProperties22.Append(tabs2); paragraphProperties22.Append(spacingBetweenLines16); paragraphProperties22.Append(paragraphMarkRunProperties22); paragraph22.Append(paragraphProperties22); Paragraph paragraph23 = new Paragraph() { RsidParagraphAddition = "00EA7D1E", RsidParagraphProperties = "007F61F5", RsidRunAdditionDefault = "00EA7D1E" }; ParagraphProperties paragraphProperties23 = new ParagraphProperties(); Tabs tabs3 = new Tabs(); TabStop tabStop3 = new TabStop() { Val = TabStopValues.Left, Position = 3119 }; tabs3.Append(tabStop3); SpacingBetweenLines spacingBetweenLines17 = new SpacingBetweenLines() { After = "0" }; ParagraphMarkRunProperties paragraphMarkRunProperties23 = new ParagraphMarkRunProperties(); RunFonts runFonts42 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize40 = new FontSize() { Val = "24" }; paragraphMarkRunProperties23.Append(runFonts42); paragraphMarkRunProperties23.Append(fontSize40); SectionProperties sectionProperties2 = new SectionProperties() { RsidR = "00EA7D1E", RsidSect = "00015C18" }; SectionType sectionType1 = new SectionType() { Val = SectionMarkValues.Continuous }; PageSize pageSize2 = new PageSize() { Width = (UInt32Value)11906U, Height = (UInt32Value)16838U }; PageMargin pageMargin2 = new PageMargin() { Top = 1440, Right = (UInt32Value)1440U, Bottom = 1440, Left = (UInt32Value)1440U, Header = (UInt32Value)708U, Footer = (UInt32Value)708U, Gutter = (UInt32Value)0U }; Columns columns2 = new Columns() { Space = "286", ColumnCount = 2 }; DocGrid docGrid2 = new DocGrid() { LinePitch = 360 }; sectionProperties2.Append(sectionType1); sectionProperties2.Append(pageSize2); sectionProperties2.Append(pageMargin2); sectionProperties2.Append(columns2); sectionProperties2.Append(docGrid2); paragraphProperties23.Append(tabs3); paragraphProperties23.Append(spacingBetweenLines17); paragraphProperties23.Append(paragraphMarkRunProperties23); paragraphProperties23.Append(sectionProperties2); paragraph23.Append(paragraphProperties23); Paragraph paragraph24 = new Paragraph() { RsidParagraphMarkRevision = "00646179", RsidParagraphAddition = "00443ACA", RsidParagraphProperties = "00646179", RsidRunAdditionDefault = "00443ACA" }; ParagraphProperties paragraphProperties24 = new ParagraphProperties(); Tabs tabs4 = new Tabs(); TabStop tabStop4 = new TabStop() { Val = TabStopValues.Left, Position = 3119 }; tabs4.Append(tabStop4); SpacingBetweenLines spacingBetweenLines18 = new SpacingBetweenLines() { After = "0" }; ParagraphMarkRunProperties paragraphMarkRunProperties24 = new ParagraphMarkRunProperties(); RunFonts runFonts43 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize41 = new FontSize() { Val = "24" }; paragraphMarkRunProperties24.Append(runFonts43); paragraphMarkRunProperties24.Append(fontSize41); paragraphProperties24.Append(tabs4); paragraphProperties24.Append(spacingBetweenLines18); paragraphProperties24.Append(paragraphMarkRunProperties24); paragraph24.Append(paragraphProperties24); Table table2 = new Table(); TableProperties tableProperties2 = new TableProperties(); TableStyle tableStyle2 = new TableStyle() { Val = "TableGrid" }; TableWidth tableWidth2 = new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto }; TableBorders tableBorders2 = new TableBorders(); LeftBorder leftBorder2 = new LeftBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; RightBorder rightBorder2 = new RightBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; InsideVerticalBorder insideVerticalBorder2 = new InsideVerticalBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; tableBorders2.Append(leftBorder2); tableBorders2.Append(rightBorder2); tableBorders2.Append(insideVerticalBorder2); TableLook tableLook2 = new TableLook() { Val = "04A0", FirstRow = true, LastRow = false, FirstColumn = true, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = true }; tableProperties2.Append(tableStyle2); tableProperties2.Append(tableWidth2); tableProperties2.Append(tableBorders2); tableProperties2.Append(tableLook2); TableGrid tableGrid2 = new TableGrid(); GridColumn gridColumn4 = new GridColumn() { Width = "1418" }; GridColumn gridColumn5 = new GridColumn() { Width = "2719" }; GridColumn gridColumn6 = new GridColumn() { Width = "1036" }; GridColumn gridColumn7 = new GridColumn() { Width = "1364" }; GridColumn gridColumn8 = new GridColumn() { Width = "1411" }; GridColumn gridColumn9 = new GridColumn() { Width = "1078" }; tableGrid2.Append(gridColumn4); tableGrid2.Append(gridColumn5); tableGrid2.Append(gridColumn6); tableGrid2.Append(gridColumn7); tableGrid2.Append(gridColumn8); tableGrid2.Append(gridColumn9); TableRow tableRow4 = new TableRow() { RsidTableRowAddition = "00443ACA", RsidTableRowProperties = "00506382" }; TableCell tableCell7 = new TableCell(); TableCellProperties tableCellProperties7 = new TableCellProperties(); TableCellWidth tableCellWidth7 = new TableCellWidth() { Width = "1418", Type = TableWidthUnitValues.Dxa }; tableCellProperties7.Append(tableCellWidth7); Paragraph paragraph25 = new Paragraph() { RsidParagraphMarkRevision = "00443ACA", RsidParagraphAddition = "00443ACA", RsidParagraphProperties = "00443ACA", RsidRunAdditionDefault = "00443ACA" }; ParagraphProperties paragraphProperties25 = new ParagraphProperties(); Tabs tabs5 = new Tabs(); TabStop tabStop5 = new TabStop() { Val = TabStopValues.Left, Position = 1560 }; TabStop tabStop6 = new TabStop() { Val = TabStopValues.Left, Position = 3969 }; TabStop tabStop7 = new TabStop() { Val = TabStopValues.Left, Position = 5387 }; TabStop tabStop8 = new TabStop() { Val = TabStopValues.Left, Position = 6379 }; TabStop tabStop9 = new TabStop() { Val = TabStopValues.Left, Position = 7938 }; tabs5.Append(tabStop5); tabs5.Append(tabStop6); tabs5.Append(tabStop7); tabs5.Append(tabStop8); tabs5.Append(tabStop9); SpacingBetweenLines spacingBetweenLines19 = new SpacingBetweenLines() { Before = "60", After = "60" }; ParagraphMarkRunProperties paragraphMarkRunProperties25 = new ParagraphMarkRunProperties(); RunFonts runFonts44 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; paragraphMarkRunProperties25.Append(runFonts44); paragraphProperties25.Append(tabs5); paragraphProperties25.Append(spacingBetweenLines19); paragraphProperties25.Append(paragraphMarkRunProperties25); ProofError proofError1 = new ProofError() { Type = ProofingErrorValues.SpellStart }; Run run20 = new Run() { RsidRunProperties = "00443ACA" }; RunProperties runProperties20 = new RunProperties(); RunFonts runFonts45 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; runProperties20.Append(runFonts45); Text text19 = new Text(); text19.Text = "BookID"; run20.Append(runProperties20); run20.Append(text19); ProofError proofError2 = new ProofError() { Type = ProofingErrorValues.SpellEnd }; paragraph25.Append(paragraphProperties25); paragraph25.Append(proofError1); paragraph25.Append(run20); paragraph25.Append(proofError2); tableCell7.Append(tableCellProperties7); tableCell7.Append(paragraph25); TableCell tableCell8 = new TableCell(); TableCellProperties tableCellProperties8 = new TableCellProperties(); TableCellWidth tableCellWidth8 = new TableCellWidth() { Width = "2719", Type = TableWidthUnitValues.Dxa }; tableCellProperties8.Append(tableCellWidth8); Paragraph paragraph26 = new Paragraph() { RsidParagraphMarkRevision = "00443ACA", RsidParagraphAddition = "00443ACA", RsidParagraphProperties = "00443ACA", RsidRunAdditionDefault = "00443ACA" }; ParagraphProperties paragraphProperties26 = new ParagraphProperties(); Tabs tabs6 = new Tabs(); TabStop tabStop10 = new TabStop() { Val = TabStopValues.Left, Position = 1560 }; TabStop tabStop11 = new TabStop() { Val = TabStopValues.Left, Position = 3969 }; TabStop tabStop12 = new TabStop() { Val = TabStopValues.Left, Position = 5387 }; TabStop tabStop13 = new TabStop() { Val = TabStopValues.Left, Position = 6379 }; TabStop tabStop14 = new TabStop() { Val = TabStopValues.Left, Position = 7938 }; tabs6.Append(tabStop10); tabs6.Append(tabStop11); tabs6.Append(tabStop12); tabs6.Append(tabStop13); tabs6.Append(tabStop14); SpacingBetweenLines spacingBetweenLines20 = new SpacingBetweenLines() { Before = "60", After = "60" }; ParagraphMarkRunProperties paragraphMarkRunProperties26 = new ParagraphMarkRunProperties(); RunFonts runFonts46 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; paragraphMarkRunProperties26.Append(runFonts46); paragraphProperties26.Append(tabs6); paragraphProperties26.Append(spacingBetweenLines20); paragraphProperties26.Append(paragraphMarkRunProperties26); Run run21 = new Run() { RsidRunProperties = "00443ACA" }; RunProperties runProperties21 = new RunProperties(); RunFonts runFonts47 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; runProperties21.Append(runFonts47); Text text20 = new Text(); text20.Text = "Description"; run21.Append(runProperties21); run21.Append(text20); paragraph26.Append(paragraphProperties26); paragraph26.Append(run21); tableCell8.Append(tableCellProperties8); tableCell8.Append(paragraph26); TableCell tableCell9 = new TableCell(); TableCellProperties tableCellProperties9 = new TableCellProperties(); TableCellWidth tableCellWidth9 = new TableCellWidth() { Width = "1036", Type = TableWidthUnitValues.Dxa }; tableCellProperties9.Append(tableCellWidth9); Paragraph paragraph27 = new Paragraph() { RsidParagraphMarkRevision = "00443ACA", RsidParagraphAddition = "00443ACA", RsidParagraphProperties = "00443ACA", RsidRunAdditionDefault = "00443ACA" }; ParagraphProperties paragraphProperties27 = new ParagraphProperties(); Tabs tabs7 = new Tabs(); TabStop tabStop15 = new TabStop() { Val = TabStopValues.Left, Position = 1560 }; TabStop tabStop16 = new TabStop() { Val = TabStopValues.Left, Position = 3969 }; TabStop tabStop17 = new TabStop() { Val = TabStopValues.Left, Position = 5387 }; TabStop tabStop18 = new TabStop() { Val = TabStopValues.Left, Position = 6379 }; TabStop tabStop19 = new TabStop() { Val = TabStopValues.Left, Position = 7938 }; tabs7.Append(tabStop15); tabs7.Append(tabStop16); tabs7.Append(tabStop17); tabs7.Append(tabStop18); tabs7.Append(tabStop19); SpacingBetweenLines spacingBetweenLines21 = new SpacingBetweenLines() { Before = "60", After = "60" }; Justification justification9 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties27 = new ParagraphMarkRunProperties(); RunFonts runFonts48 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; paragraphMarkRunProperties27.Append(runFonts48); paragraphProperties27.Append(tabs7); paragraphProperties27.Append(spacingBetweenLines21); paragraphProperties27.Append(justification9); paragraphProperties27.Append(paragraphMarkRunProperties27); Run run22 = new Run() { RsidRunProperties = "00443ACA" }; RunProperties runProperties22 = new RunProperties(); RunFonts runFonts49 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; runProperties22.Append(runFonts49); Text text21 = new Text(); text21.Text = "Quantity"; run22.Append(runProperties22); run22.Append(text21); paragraph27.Append(paragraphProperties27); paragraph27.Append(run22); tableCell9.Append(tableCellProperties9); tableCell9.Append(paragraph27); TableCell tableCell10 = new TableCell(); TableCellProperties tableCellProperties10 = new TableCellProperties(); TableCellWidth tableCellWidth10 = new TableCellWidth() { Width = "1364", Type = TableWidthUnitValues.Dxa }; tableCellProperties10.Append(tableCellWidth10); Paragraph paragraph28 = new Paragraph() { RsidParagraphMarkRevision = "00443ACA", RsidParagraphAddition = "00443ACA", RsidParagraphProperties = "00443ACA", RsidRunAdditionDefault = "00443ACA" }; ParagraphProperties paragraphProperties28 = new ParagraphProperties(); Tabs tabs8 = new Tabs(); TabStop tabStop20 = new TabStop() { Val = TabStopValues.Left, Position = 1560 }; TabStop tabStop21 = new TabStop() { Val = TabStopValues.Left, Position = 3969 }; TabStop tabStop22 = new TabStop() { Val = TabStopValues.Left, Position = 5387 }; TabStop tabStop23 = new TabStop() { Val = TabStopValues.Left, Position = 6379 }; TabStop tabStop24 = new TabStop() { Val = TabStopValues.Left, Position = 7938 }; tabs8.Append(tabStop20); tabs8.Append(tabStop21); tabs8.Append(tabStop22); tabs8.Append(tabStop23); tabs8.Append(tabStop24); SpacingBetweenLines spacingBetweenLines22 = new SpacingBetweenLines() { Before = "60", After = "60" }; Justification justification10 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties28 = new ParagraphMarkRunProperties(); RunFonts runFonts50 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; paragraphMarkRunProperties28.Append(runFonts50); paragraphProperties28.Append(tabs8); paragraphProperties28.Append(spacingBetweenLines22); paragraphProperties28.Append(justification10); paragraphProperties28.Append(paragraphMarkRunProperties28); Run run23 = new Run() { RsidRunProperties = "00443ACA" }; RunProperties runProperties23 = new RunProperties(); RunFonts runFonts51 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; runProperties23.Append(runFonts51); Text text22 = new Text(); text22.Text = "Price"; run23.Append(runProperties23); run23.Append(text22); paragraph28.Append(paragraphProperties28); paragraph28.Append(run23); tableCell10.Append(tableCellProperties10); tableCell10.Append(paragraph28); TableCell tableCell11 = new TableCell(); TableCellProperties tableCellProperties11 = new TableCellProperties(); TableCellWidth tableCellWidth11 = new TableCellWidth() { Width = "1411", Type = TableWidthUnitValues.Dxa }; tableCellProperties11.Append(tableCellWidth11); Paragraph paragraph29 = new Paragraph() { RsidParagraphMarkRevision = "00443ACA", RsidParagraphAddition = "00443ACA", RsidParagraphProperties = "00443ACA", RsidRunAdditionDefault = "00443ACA" }; ParagraphProperties paragraphProperties29 = new ParagraphProperties(); Tabs tabs9 = new Tabs(); TabStop tabStop25 = new TabStop() { Val = TabStopValues.Left, Position = 1560 }; TabStop tabStop26 = new TabStop() { Val = TabStopValues.Left, Position = 3969 }; TabStop tabStop27 = new TabStop() { Val = TabStopValues.Left, Position = 5387 }; TabStop tabStop28 = new TabStop() { Val = TabStopValues.Left, Position = 6379 }; TabStop tabStop29 = new TabStop() { Val = TabStopValues.Left, Position = 7938 }; tabs9.Append(tabStop25); tabs9.Append(tabStop26); tabs9.Append(tabStop27); tabs9.Append(tabStop28); tabs9.Append(tabStop29); SpacingBetweenLines spacingBetweenLines23 = new SpacingBetweenLines() { Before = "60", After = "60" }; Justification justification11 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties29 = new ParagraphMarkRunProperties(); RunFonts runFonts52 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; paragraphMarkRunProperties29.Append(runFonts52); paragraphProperties29.Append(tabs9); paragraphProperties29.Append(spacingBetweenLines23); paragraphProperties29.Append(justification11); paragraphProperties29.Append(paragraphMarkRunProperties29); Run run24 = new Run() { RsidRunProperties = "00443ACA" }; RunProperties runProperties24 = new RunProperties(); RunFonts runFonts53 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; runProperties24.Append(runFonts53); Text text23 = new Text(); text23.Text = "Discount"; run24.Append(runProperties24); run24.Append(text23); paragraph29.Append(paragraphProperties29); paragraph29.Append(run24); tableCell11.Append(tableCellProperties11); tableCell11.Append(paragraph29); TableCell tableCell12 = new TableCell(); TableCellProperties tableCellProperties12 = new TableCellProperties(); TableCellWidth tableCellWidth12 = new TableCellWidth() { Width = "1078", Type = TableWidthUnitValues.Dxa }; tableCellProperties12.Append(tableCellWidth12); Paragraph paragraph30 = new Paragraph() { RsidParagraphMarkRevision = "00443ACA", RsidParagraphAddition = "00443ACA", RsidParagraphProperties = "00443ACA", RsidRunAdditionDefault = "00443ACA" }; ParagraphProperties paragraphProperties30 = new ParagraphProperties(); Tabs tabs10 = new Tabs(); TabStop tabStop30 = new TabStop() { Val = TabStopValues.Left, Position = 1560 }; TabStop tabStop31 = new TabStop() { Val = TabStopValues.Left, Position = 3969 }; TabStop tabStop32 = new TabStop() { Val = TabStopValues.Left, Position = 5387 }; TabStop tabStop33 = new TabStop() { Val = TabStopValues.Left, Position = 6379 }; TabStop tabStop34 = new TabStop() { Val = TabStopValues.Left, Position = 7938 }; tabs10.Append(tabStop30); tabs10.Append(tabStop31); tabs10.Append(tabStop32); tabs10.Append(tabStop33); tabs10.Append(tabStop34); SpacingBetweenLines spacingBetweenLines24 = new SpacingBetweenLines() { Before = "60", After = "60" }; Justification justification12 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties30 = new ParagraphMarkRunProperties(); RunFonts runFonts54 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; paragraphMarkRunProperties30.Append(runFonts54); paragraphProperties30.Append(tabs10); paragraphProperties30.Append(spacingBetweenLines24); paragraphProperties30.Append(justification12); paragraphProperties30.Append(paragraphMarkRunProperties30); Run run25 = new Run() { RsidRunProperties = "00443ACA" }; RunProperties runProperties25 = new RunProperties(); RunFonts runFonts55 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; runProperties25.Append(runFonts55); Text text24 = new Text(); text24.Text = "Total"; run25.Append(runProperties25); run25.Append(text24); paragraph30.Append(paragraphProperties30); paragraph30.Append(run25); tableCell12.Append(tableCellProperties12); tableCell12.Append(paragraph30); tableRow4.Append(tableCell7); tableRow4.Append(tableCell8); tableRow4.Append(tableCell9); tableRow4.Append(tableCell10); tableRow4.Append(tableCell11); tableRow4.Append(tableCell12); table2.Append(tableProperties2); table2.Append(tableGrid2); table2.Append(tableRow4); /****** Loop from here? **********/ foreach (OrderedStock o in orderedStock) { //Create a table row TableRow orderedStockRow = new TableRow() { RsidTableRowAddition = "00443ACA", RsidTableRowProperties = "00506382" }; //Create cell to hold bookID TableCell cellBookID = new TableCell(); TableCellProperties cellBookIDProperties = new TableCellProperties(); TableCellWidth cellBookIDWidth = new TableCellWidth() { Width = "1418", Type = TableWidthUnitValues.Dxa }; cellBookIDProperties.Append(cellBookIDWidth); Paragraph paragraph31 = new Paragraph() { RsidParagraphMarkRevision = "00443ACA", RsidParagraphAddition = "00443ACA", RsidParagraphProperties = "00443ACA", RsidRunAdditionDefault = "00443ACA" }; ParagraphProperties paragraphProperties31 = new ParagraphProperties(); Tabs tabs11 = new Tabs(); TabStop tabStop35 = new TabStop() { Val = TabStopValues.Left, Position = 1560 }; TabStop tabStop36 = new TabStop() { Val = TabStopValues.Left, Position = 3969 }; TabStop tabStop37 = new TabStop() { Val = TabStopValues.Left, Position = 5387 }; TabStop tabStop38 = new TabStop() { Val = TabStopValues.Left, Position = 6379 }; TabStop tabStop39 = new TabStop() { Val = TabStopValues.Left, Position = 7938 }; tabs11.Append(tabStop35); tabs11.Append(tabStop36); tabs11.Append(tabStop37); tabs11.Append(tabStop38); tabs11.Append(tabStop39); SpacingBetweenLines spacingBetweenLines25 = new SpacingBetweenLines() { Before = "60", After = "60" }; ParagraphMarkRunProperties paragraphMarkRunProperties31 = new ParagraphMarkRunProperties(); RunFonts runFonts56 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize42 = new FontSize() { Val = "18" }; paragraphMarkRunProperties31.Append(runFonts56); paragraphMarkRunProperties31.Append(fontSize42); paragraphProperties31.Append(tabs11); paragraphProperties31.Append(spacingBetweenLines25); paragraphProperties31.Append(paragraphMarkRunProperties31); Run run26 = new Run() { RsidRunProperties = "00443ACA" }; RunProperties runProperties26 = new RunProperties(); RunFonts runFonts57 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize43 = new FontSize() { Val = "18" }; runProperties26.Append(runFonts57); runProperties26.Append(fontSize43); Text text25 = new Text(); //TODO Book ID text25.Text = o.bookID; run26.Append(runProperties26); run26.Append(text25); paragraph31.Append(paragraphProperties31); paragraph31.Append(run26); cellBookID.Append(cellBookIDProperties); cellBookID.Append(paragraph31); //Cell for description TableCell tableCell14 = new TableCell(); TableCellProperties tableCellProperties14 = new TableCellProperties(); TableCellWidth tableCellWidth14 = new TableCellWidth() { Width = "2719", Type = TableWidthUnitValues.Dxa }; tableCellProperties14.Append(tableCellWidth14); Paragraph paragraph32 = new Paragraph() { RsidParagraphMarkRevision = "00443ACA", RsidParagraphAddition = "00443ACA", RsidParagraphProperties = "00443ACA", RsidRunAdditionDefault = "00443ACA" }; ParagraphProperties paragraphProperties32 = new ParagraphProperties(); Tabs tabs12 = new Tabs(); TabStop tabStop40 = new TabStop() { Val = TabStopValues.Left, Position = 1560 }; TabStop tabStop41 = new TabStop() { Val = TabStopValues.Left, Position = 3969 }; TabStop tabStop42 = new TabStop() { Val = TabStopValues.Left, Position = 5387 }; TabStop tabStop43 = new TabStop() { Val = TabStopValues.Left, Position = 6379 }; TabStop tabStop44 = new TabStop() { Val = TabStopValues.Left, Position = 7938 }; tabs12.Append(tabStop40); tabs12.Append(tabStop41); tabs12.Append(tabStop42); tabs12.Append(tabStop43); tabs12.Append(tabStop44); SpacingBetweenLines spacingBetweenLines26 = new SpacingBetweenLines() { Before = "60", After = "60" }; ParagraphMarkRunProperties paragraphMarkRunProperties32 = new ParagraphMarkRunProperties(); RunFonts runFonts58 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize44 = new FontSize() { Val = "18" }; paragraphMarkRunProperties32.Append(runFonts58); paragraphMarkRunProperties32.Append(fontSize44); paragraphProperties32.Append(tabs12); paragraphProperties32.Append(spacingBetweenLines26); paragraphProperties32.Append(paragraphMarkRunProperties32); Run run27 = new Run() { RsidRunProperties = "00443ACA" }; RunProperties runProperties27 = new RunProperties(); RunFonts runFonts59 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize45 = new FontSize() { Val = "18" }; runProperties27.Append(runFonts59); runProperties27.Append(fontSize45); Text text26 = new Text() { Space = SpaceProcessingModeValues.Preserve }; //TODO Author name string author = o.author; text26.Text = author; run27.Append(runProperties27); run27.Append(text26); ProofError proofError3 = new ProofError() { Type = ProofingErrorValues.SpellStart }; RunProperties runProperties28 = new RunProperties(); RunFonts runFonts60 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize46 = new FontSize() { Val = "18" }; runProperties28.Append(runFonts60); runProperties28.Append(fontSize46); ProofError proofError4 = new ProofError() { Type = ProofingErrorValues.SpellEnd }; paragraph32.Append(paragraphProperties32); paragraph32.Append(run27); paragraph32.Append(proofError3); Paragraph paragraph33 = new Paragraph() { RsidParagraphMarkRevision = "00443ACA", RsidParagraphAddition = "00443ACA", RsidParagraphProperties = "00443ACA", RsidRunAdditionDefault = "00443ACA" }; ParagraphProperties paragraphProperties33 = new ParagraphProperties(); Tabs tabs13 = new Tabs(); TabStop tabStop45 = new TabStop() { Val = TabStopValues.Left, Position = 1560 }; TabStop tabStop46 = new TabStop() { Val = TabStopValues.Left, Position = 3969 }; TabStop tabStop47 = new TabStop() { Val = TabStopValues.Left, Position = 5387 }; TabStop tabStop48 = new TabStop() { Val = TabStopValues.Left, Position = 6379 }; TabStop tabStop49 = new TabStop() { Val = TabStopValues.Left, Position = 7938 }; tabs13.Append(tabStop45); tabs13.Append(tabStop46); tabs13.Append(tabStop47); tabs13.Append(tabStop48); tabs13.Append(tabStop49); SpacingBetweenLines spacingBetweenLines27 = new SpacingBetweenLines() { Before = "60", After = "60" }; ParagraphMarkRunProperties paragraphMarkRunProperties33 = new ParagraphMarkRunProperties(); RunFonts runFonts61 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize47 = new FontSize() { Val = "18" }; paragraphMarkRunProperties33.Append(runFonts61); paragraphMarkRunProperties33.Append(fontSize47); paragraphProperties33.Append(tabs13); paragraphProperties33.Append(spacingBetweenLines27); paragraphProperties33.Append(paragraphMarkRunProperties33); Run run29 = new Run() { RsidRunProperties = "00443ACA" }; RunProperties runProperties29 = new RunProperties(); RunFonts runFonts62 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize48 = new FontSize() { Val = "18" }; runProperties29.Append(runFonts62); runProperties29.Append(fontSize48); Text text28 = new Text(); //TODO Book title text28.Text = o.title; run29.Append(runProperties29); run29.Append(text28); paragraph33.Append(paragraphProperties33); paragraph33.Append(run29); tableCell14.Append(tableCellProperties14); tableCell14.Append(paragraph32); tableCell14.Append(paragraph33); //Cell for quantity TableCell tableCell15 = new TableCell(); TableCellProperties tableCellProperties15 = new TableCellProperties(); TableCellWidth tableCellWidth15 = new TableCellWidth() { Width = "1036", Type = TableWidthUnitValues.Dxa }; tableCellProperties15.Append(tableCellWidth15); Paragraph paragraph34 = new Paragraph() { RsidParagraphMarkRevision = "00443ACA", RsidParagraphAddition = "00443ACA", RsidParagraphProperties = "00443ACA", RsidRunAdditionDefault = "00443ACA" }; ParagraphProperties paragraphProperties34 = new ParagraphProperties(); Tabs tabs14 = new Tabs(); TabStop tabStop50 = new TabStop() { Val = TabStopValues.Left, Position = 1560 }; TabStop tabStop51 = new TabStop() { Val = TabStopValues.Left, Position = 3969 }; TabStop tabStop52 = new TabStop() { Val = TabStopValues.Left, Position = 5387 }; TabStop tabStop53 = new TabStop() { Val = TabStopValues.Left, Position = 6379 }; TabStop tabStop54 = new TabStop() { Val = TabStopValues.Left, Position = 7938 }; tabs14.Append(tabStop50); tabs14.Append(tabStop51); tabs14.Append(tabStop52); tabs14.Append(tabStop53); tabs14.Append(tabStop54); SpacingBetweenLines spacingBetweenLines28 = new SpacingBetweenLines() { Before = "60", After = "60" }; Justification justification13 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties34 = new ParagraphMarkRunProperties(); RunFonts runFonts63 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize49 = new FontSize() { Val = "18" }; paragraphMarkRunProperties34.Append(runFonts63); paragraphMarkRunProperties34.Append(fontSize49); paragraphProperties34.Append(tabs14); paragraphProperties34.Append(spacingBetweenLines28); paragraphProperties34.Append(justification13); paragraphProperties34.Append(paragraphMarkRunProperties34); Run run30 = new Run() { RsidRunProperties = "00443ACA" }; RunProperties runProperties30 = new RunProperties(); RunFonts runFonts64 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize50 = new FontSize() { Val = "18" }; runProperties30.Append(runFonts64); runProperties30.Append(fontSize50); Text text29 = new Text(); //TODO Quantity text29.Text = o.quantity.ToString(); run30.Append(runProperties30); run30.Append(text29); paragraph34.Append(paragraphProperties34); paragraph34.Append(run30); tableCell15.Append(tableCellProperties15); tableCell15.Append(paragraph34); //Cell for price TableCell tableCell16 = new TableCell(); TableCellProperties tableCellProperties16 = new TableCellProperties(); TableCellWidth tableCellWidth16 = new TableCellWidth() { Width = "1364", Type = TableWidthUnitValues.Dxa }; tableCellProperties16.Append(tableCellWidth16); Paragraph paragraph35 = new Paragraph() { RsidParagraphMarkRevision = "00443ACA", RsidParagraphAddition = "00443ACA", RsidParagraphProperties = "00443ACA", RsidRunAdditionDefault = "00443ACA" }; ParagraphProperties paragraphProperties35 = new ParagraphProperties(); Tabs tabs15 = new Tabs(); TabStop tabStop55 = new TabStop() { Val = TabStopValues.Left, Position = 1560 }; TabStop tabStop56 = new TabStop() { Val = TabStopValues.Left, Position = 3969 }; TabStop tabStop57 = new TabStop() { Val = TabStopValues.Left, Position = 5387 }; TabStop tabStop58 = new TabStop() { Val = TabStopValues.Left, Position = 6379 }; TabStop tabStop59 = new TabStop() { Val = TabStopValues.Left, Position = 7938 }; tabs15.Append(tabStop55); tabs15.Append(tabStop56); tabs15.Append(tabStop57); tabs15.Append(tabStop58); tabs15.Append(tabStop59); SpacingBetweenLines spacingBetweenLines29 = new SpacingBetweenLines() { Before = "60", After = "60" }; Justification justification14 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties35 = new ParagraphMarkRunProperties(); RunFonts runFonts65 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize51 = new FontSize() { Val = "18" }; paragraphMarkRunProperties35.Append(runFonts65); paragraphMarkRunProperties35.Append(fontSize51); paragraphProperties35.Append(tabs15); paragraphProperties35.Append(spacingBetweenLines29); paragraphProperties35.Append(justification14); paragraphProperties35.Append(paragraphMarkRunProperties35); Run run31 = new Run() { RsidRunProperties = "00443ACA" }; RunProperties runProperties31 = new RunProperties(); RunFonts runFonts66 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize52 = new FontSize() { Val = "18" }; runProperties31.Append(runFonts66); runProperties31.Append(fontSize52); Text text30 = new Text(); //TODO Price text30.Text = "$" + String.Format("{0:0.00}", o.price); run31.Append(runProperties31); run31.Append(text30); paragraph35.Append(paragraphProperties35); paragraph35.Append(run31); tableCell16.Append(tableCellProperties16); tableCell16.Append(paragraph35); //Cell for discount TableCell tableCell17 = new TableCell(); TableCellProperties tableCellProperties17 = new TableCellProperties(); TableCellWidth tableCellWidth17 = new TableCellWidth() { Width = "1411", Type = TableWidthUnitValues.Dxa }; tableCellProperties17.Append(tableCellWidth17); Paragraph paragraph36 = new Paragraph() { RsidParagraphMarkRevision = "00443ACA", RsidParagraphAddition = "00443ACA", RsidParagraphProperties = "00443ACA", RsidRunAdditionDefault = "00443ACA" }; ParagraphProperties paragraphProperties36 = new ParagraphProperties(); Tabs tabs16 = new Tabs(); TabStop tabStop60 = new TabStop() { Val = TabStopValues.Left, Position = 1560 }; TabStop tabStop61 = new TabStop() { Val = TabStopValues.Left, Position = 3969 }; TabStop tabStop62 = new TabStop() { Val = TabStopValues.Left, Position = 5387 }; TabStop tabStop63 = new TabStop() { Val = TabStopValues.Left, Position = 6379 }; TabStop tabStop64 = new TabStop() { Val = TabStopValues.Left, Position = 7938 }; tabs16.Append(tabStop60); tabs16.Append(tabStop61); tabs16.Append(tabStop62); tabs16.Append(tabStop63); tabs16.Append(tabStop64); SpacingBetweenLines spacingBetweenLines30 = new SpacingBetweenLines() { Before = "60", After = "60" }; Justification justification15 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties36 = new ParagraphMarkRunProperties(); RunFonts runFonts67 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize53 = new FontSize() { Val = "18" }; paragraphMarkRunProperties36.Append(runFonts67); paragraphMarkRunProperties36.Append(fontSize53); paragraphProperties36.Append(tabs16); paragraphProperties36.Append(spacingBetweenLines30); paragraphProperties36.Append(justification15); paragraphProperties36.Append(paragraphMarkRunProperties36); Run run32 = new Run() { RsidRunProperties = "00443ACA" }; RunProperties runProperties32 = new RunProperties(); RunFonts runFonts68 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize54 = new FontSize() { Val = "18" }; runProperties32.Append(runFonts68); runProperties32.Append(fontSize54); Text text31 = new Text(); //TODO Discount text31.Text = "$" + String.Format("{0:0.00}", o.discount); run32.Append(runProperties32); run32.Append(text31); paragraph36.Append(paragraphProperties36); paragraph36.Append(run32); tableCell17.Append(tableCellProperties17); tableCell17.Append(paragraph36); //Cell for total TableCell tableCell18 = new TableCell(); TableCellProperties tableCellProperties18 = new TableCellProperties(); TableCellWidth tableCellWidth18 = new TableCellWidth() { Width = "1078", Type = TableWidthUnitValues.Dxa }; tableCellProperties18.Append(tableCellWidth18); Paragraph paragraph37 = new Paragraph() { RsidParagraphMarkRevision = "00443ACA", RsidParagraphAddition = "00443ACA", RsidParagraphProperties = "00443ACA", RsidRunAdditionDefault = "00443ACA" }; ParagraphProperties paragraphProperties37 = new ParagraphProperties(); Tabs tabs17 = new Tabs(); TabStop tabStop65 = new TabStop() { Val = TabStopValues.Left, Position = 1560 }; TabStop tabStop66 = new TabStop() { Val = TabStopValues.Left, Position = 3969 }; TabStop tabStop67 = new TabStop() { Val = TabStopValues.Left, Position = 5387 }; TabStop tabStop68 = new TabStop() { Val = TabStopValues.Left, Position = 6379 }; TabStop tabStop69 = new TabStop() { Val = TabStopValues.Left, Position = 7938 }; tabs17.Append(tabStop65); tabs17.Append(tabStop66); tabs17.Append(tabStop67); tabs17.Append(tabStop68); tabs17.Append(tabStop69); SpacingBetweenLines spacingBetweenLines31 = new SpacingBetweenLines() { Before = "60", After = "60" }; Justification justification16 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties37 = new ParagraphMarkRunProperties(); RunFonts runFonts69 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize55 = new FontSize() { Val = "18" }; paragraphMarkRunProperties37.Append(runFonts69); paragraphMarkRunProperties37.Append(fontSize55); paragraphProperties37.Append(tabs17); paragraphProperties37.Append(spacingBetweenLines31); paragraphProperties37.Append(justification16); paragraphProperties37.Append(paragraphMarkRunProperties37); Run run33 = new Run() { RsidRunProperties = "00443ACA" }; RunProperties runProperties33 = new RunProperties(); RunFonts runFonts70 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize56 = new FontSize() { Val = "18" }; runProperties33.Append(runFonts70); runProperties33.Append(fontSize56); Text text32 = new Text(); //Total double total = o.price - o.discount; grandTotal += total; //TODO have price display as decimal text32.Text = "$" + String.Format("{0:0.00}", total); run33.Append(runProperties33); run33.Append(text32); paragraph37.Append(paragraphProperties37); paragraph37.Append(run33); tableCell18.Append(tableCellProperties18); tableCell18.Append(paragraph37); //Add cells into the row orderedStockRow.Append(cellBookID); orderedStockRow.Append(tableCell14); orderedStockRow.Append(tableCell15); orderedStockRow.Append(tableCell16); orderedStockRow.Append(tableCell17); orderedStockRow.Append(tableCell18); //Add row for book into the table table2.Append(orderedStockRow); } /***************** End loop *******************/ Paragraph paragraph38 = new Paragraph() { RsidParagraphAddition = "00B5104A", RsidParagraphProperties = "00116604", RsidRunAdditionDefault = "00B5104A" }; ParagraphProperties paragraphProperties38 = new ParagraphProperties(); Tabs tabs18 = new Tabs(); TabStop tabStop70 = new TabStop() { Val = TabStopValues.Left, Position = 7938 }; tabs18.Append(tabStop70); SpacingBetweenLines spacingBetweenLines32 = new SpacingBetweenLines() { Before = "40", After = "40" }; ParagraphMarkRunProperties paragraphMarkRunProperties38 = new ParagraphMarkRunProperties(); RunFonts runFonts71 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold5 = new Bold(); FontSize fontSize57 = new FontSize() { Val = "18" }; paragraphMarkRunProperties38.Append(runFonts71); paragraphMarkRunProperties38.Append(bold5); paragraphMarkRunProperties38.Append(fontSize57); paragraphProperties38.Append(tabs18); paragraphProperties38.Append(spacingBetweenLines32); paragraphProperties38.Append(paragraphMarkRunProperties38); paragraph38.Append(paragraphProperties38); Table table3 = new Table(); TableProperties tableProperties3 = new TableProperties(); TableStyle tableStyle3 = new TableStyle() { Val = "TableGrid" }; TableWidth tableWidth3 = new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto }; TableIndentation tableIndentation1 = new TableIndentation() { Width = 6516, Type = TableWidthUnitValues.Dxa }; TableBorders tableBorders3 = new TableBorders(); TopBorder topBorder2 = new TopBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; LeftBorder leftBorder3 = new LeftBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; BottomBorder bottomBorder2 = new BottomBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; RightBorder rightBorder3 = new RightBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; InsideHorizontalBorder insideHorizontalBorder2 = new InsideHorizontalBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; InsideVerticalBorder insideVerticalBorder3 = new InsideVerticalBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; tableBorders3.Append(topBorder2); tableBorders3.Append(leftBorder3); tableBorders3.Append(bottomBorder2); tableBorders3.Append(rightBorder3); tableBorders3.Append(insideHorizontalBorder2); tableBorders3.Append(insideVerticalBorder3); TableLook tableLook3 = new TableLook() { Val = "04A0", FirstRow = true, LastRow = false, FirstColumn = true, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = true }; tableProperties3.Append(tableStyle3); tableProperties3.Append(tableWidth3); tableProperties3.Append(tableIndentation1); tableProperties3.Append(tableBorders3); tableProperties3.Append(tableLook3); TableGrid tableGrid3 = new TableGrid(); GridColumn gridColumn10 = new GridColumn() { Width = "1559" }; GridColumn gridColumn11 = new GridColumn() { Width = "941" }; tableGrid3.Append(gridColumn10); tableGrid3.Append(gridColumn11); TableRow tableRow6 = new TableRow() { RsidTableRowAddition = "00B5104A", RsidTableRowProperties = "00BD60A1" }; TableCell tableCell19 = new TableCell(); TableCellProperties tableCellProperties19 = new TableCellProperties(); TableCellWidth tableCellWidth19 = new TableCellWidth() { Width = "1559", Type = TableWidthUnitValues.Dxa }; tableCellProperties19.Append(tableCellWidth19); Paragraph paragraph39 = new Paragraph() { RsidParagraphAddition = "00B5104A", RsidParagraphProperties = "00116604", RsidRunAdditionDefault = "00B5104A" }; ParagraphProperties paragraphProperties39 = new ParagraphProperties(); Tabs tabs19 = new Tabs(); TabStop tabStop71 = new TabStop() { Val = TabStopValues.Left, Position = 7938 }; tabs19.Append(tabStop71); SpacingBetweenLines spacingBetweenLines33 = new SpacingBetweenLines() { Before = "40", After = "40" }; ParagraphMarkRunProperties paragraphMarkRunProperties39 = new ParagraphMarkRunProperties(); RunFonts runFonts72 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold6 = new Bold(); FontSize fontSize58 = new FontSize() { Val = "20" }; paragraphMarkRunProperties39.Append(runFonts72); paragraphMarkRunProperties39.Append(bold6); paragraphMarkRunProperties39.Append(fontSize58); paragraphProperties39.Append(tabs19); paragraphProperties39.Append(spacingBetweenLines33); paragraphProperties39.Append(paragraphMarkRunProperties39); Run run34 = new Run(); RunProperties runProperties34 = new RunProperties(); RunFonts runFonts73 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize59 = new FontSize() { Val = "20" }; runProperties34.Append(runFonts73); runProperties34.Append(fontSize59); Text text33 = new Text(); text33.Text = "Total:"; run34.Append(runProperties34); run34.Append(text33); paragraph39.Append(paragraphProperties39); paragraph39.Append(run34); tableCell19.Append(tableCellProperties19); tableCell19.Append(paragraph39); TableCell tableCell20 = new TableCell(); TableCellProperties tableCellProperties20 = new TableCellProperties(); TableCellWidth tableCellWidth20 = new TableCellWidth() { Width = "941", Type = TableWidthUnitValues.Dxa }; tableCellProperties20.Append(tableCellWidth20); Paragraph paragraph40 = new Paragraph() { RsidParagraphAddition = "00B5104A", RsidParagraphProperties = "00B5104A", RsidRunAdditionDefault = "00B5104A" }; ParagraphProperties paragraphProperties40 = new ParagraphProperties(); Tabs tabs20 = new Tabs(); TabStop tabStop72 = new TabStop() { Val = TabStopValues.Left, Position = 7938 }; tabs20.Append(tabStop72); SpacingBetweenLines spacingBetweenLines34 = new SpacingBetweenLines() { Before = "40", After = "40" }; Justification justification17 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties40 = new ParagraphMarkRunProperties(); RunFonts runFonts74 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold7 = new Bold(); FontSize fontSize60 = new FontSize() { Val = "20" }; paragraphMarkRunProperties40.Append(runFonts74); paragraphMarkRunProperties40.Append(bold7); paragraphMarkRunProperties40.Append(fontSize60); paragraphProperties40.Append(tabs20); paragraphProperties40.Append(spacingBetweenLines34); paragraphProperties40.Append(justification17); paragraphProperties40.Append(paragraphMarkRunProperties40); Run run35 = new Run(); RunProperties runProperties35 = new RunProperties(); RunFonts runFonts75 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize61 = new FontSize() { Val = "20" }; runProperties35.Append(runFonts75); runProperties35.Append(fontSize61); Text text34 = new Text(); //TODO total after the table text34.Text = "$" + String.Format("{0:0.00}", grandTotal); run35.Append(runProperties35); run35.Append(text34); paragraph40.Append(paragraphProperties40); paragraph40.Append(run35); tableCell20.Append(tableCellProperties20); tableCell20.Append(paragraph40); tableRow6.Append(tableCell19); tableRow6.Append(tableCell20); TableRow tableRow7 = new TableRow() { RsidTableRowAddition = "00B5104A", RsidTableRowProperties = "00BD60A1" }; TableCell tableCell21 = new TableCell(); TableCellProperties tableCellProperties21 = new TableCellProperties(); TableCellWidth tableCellWidth21 = new TableCellWidth() { Width = "1559", Type = TableWidthUnitValues.Dxa }; tableCellProperties21.Append(tableCellWidth21); Paragraph paragraph41 = new Paragraph() { RsidParagraphAddition = "00B5104A", RsidParagraphProperties = "00116604", RsidRunAdditionDefault = "00B5104A" }; ParagraphProperties paragraphProperties41 = new ParagraphProperties(); Tabs tabs21 = new Tabs(); TabStop tabStop73 = new TabStop() { Val = TabStopValues.Left, Position = 7938 }; tabs21.Append(tabStop73); SpacingBetweenLines spacingBetweenLines35 = new SpacingBetweenLines() { Before = "40", After = "40" }; ParagraphMarkRunProperties paragraphMarkRunProperties41 = new ParagraphMarkRunProperties(); RunFonts runFonts76 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize62 = new FontSize() { Val = "20" }; paragraphMarkRunProperties41.Append(runFonts76); paragraphMarkRunProperties41.Append(fontSize62); paragraphProperties41.Append(tabs21); paragraphProperties41.Append(spacingBetweenLines35); paragraphProperties41.Append(paragraphMarkRunProperties41); Run run36 = new Run(); RunProperties runProperties36 = new RunProperties(); RunFonts runFonts77 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize63 = new FontSize() { Val = "20" }; runProperties36.Append(runFonts77); runProperties36.Append(fontSize63); Text text35 = new Text(); text35.Text = "Freight:"; run36.Append(runProperties36); run36.Append(text35); paragraph41.Append(paragraphProperties41); paragraph41.Append(run36); tableCell21.Append(tableCellProperties21); tableCell21.Append(paragraph41); TableCell tableCell22 = new TableCell(); TableCellProperties tableCellProperties22 = new TableCellProperties(); TableCellWidth tableCellWidth22 = new TableCellWidth() { Width = "941", Type = TableWidthUnitValues.Dxa }; tableCellProperties22.Append(tableCellWidth22); Paragraph paragraph42 = new Paragraph() { RsidParagraphAddition = "00B5104A", RsidParagraphProperties = "00B5104A", RsidRunAdditionDefault = "00B5104A" }; ParagraphProperties paragraphProperties42 = new ParagraphProperties(); Tabs tabs22 = new Tabs(); TabStop tabStop74 = new TabStop() { Val = TabStopValues.Left, Position = 6663 }; TabStop tabStop75 = new TabStop() { Val = TabStopValues.Left, Position = 8364 }; tabs22.Append(tabStop74); tabs22.Append(tabStop75); SpacingBetweenLines spacingBetweenLines36 = new SpacingBetweenLines() { Before = "40", After = "40" }; Justification justification18 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties42 = new ParagraphMarkRunProperties(); RunFonts runFonts78 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize64 = new FontSize() { Val = "20" }; paragraphMarkRunProperties42.Append(runFonts78); paragraphMarkRunProperties42.Append(fontSize64); paragraphProperties42.Append(tabs22); paragraphProperties42.Append(spacingBetweenLines36); paragraphProperties42.Append(justification18); paragraphProperties42.Append(paragraphMarkRunProperties42); Run run37 = new Run(); RunProperties runProperties37 = new RunProperties(); RunFonts runFonts79 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize65 = new FontSize() { Val = "20" }; runProperties37.Append(runFonts79); runProperties37.Append(fontSize65); Text text36 = new Text(); //TODO freight price text36.Text = "$" + String.Format("{0:0.00}", order.freightCost); run37.Append(runProperties37); run37.Append(text36); paragraph42.Append(paragraphProperties42); paragraph42.Append(run37); tableCell22.Append(tableCellProperties22); tableCell22.Append(paragraph42); tableRow7.Append(tableCell21); tableRow7.Append(tableCell22); TableRow tableRow8 = new TableRow() { RsidTableRowAddition = "00B5104A", RsidTableRowProperties = "00BD60A1" }; TableCell tableCell23 = new TableCell(); TableCellProperties tableCellProperties23 = new TableCellProperties(); TableCellWidth tableCellWidth23 = new TableCellWidth() { Width = "1559", Type = TableWidthUnitValues.Dxa }; tableCellProperties23.Append(tableCellWidth23); Paragraph paragraph43 = new Paragraph() { RsidParagraphAddition = "00B5104A", RsidParagraphProperties = "00116604", RsidRunAdditionDefault = "00B5104A" }; ParagraphProperties paragraphProperties43 = new ParagraphProperties(); Tabs tabs23 = new Tabs(); TabStop tabStop76 = new TabStop() { Val = TabStopValues.Left, Position = 7938 }; tabs23.Append(tabStop76); SpacingBetweenLines spacingBetweenLines37 = new SpacingBetweenLines() { Before = "40", After = "40" }; ParagraphMarkRunProperties paragraphMarkRunProperties43 = new ParagraphMarkRunProperties(); RunFonts runFonts80 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize66 = new FontSize() { Val = "20" }; paragraphMarkRunProperties43.Append(runFonts80); paragraphMarkRunProperties43.Append(fontSize66); paragraphProperties43.Append(tabs23); paragraphProperties43.Append(spacingBetweenLines37); paragraphProperties43.Append(paragraphMarkRunProperties43); Run run38 = new Run() { RsidRunProperties = "00690638" }; RunProperties runProperties38 = new RunProperties(); RunFonts runFonts81 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold8 = new Bold(); FontSize fontSize67 = new FontSize() { Val = "20" }; runProperties38.Append(runFonts81); runProperties38.Append(bold8); runProperties38.Append(fontSize67); Text text37 = new Text(); text37.Text = "Final Total"; run38.Append(runProperties38); run38.Append(text37); Run run39 = new Run(); RunProperties runProperties39 = new RunProperties(); RunFonts runFonts82 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold9 = new Bold(); FontSize fontSize68 = new FontSize() { Val = "20" }; runProperties39.Append(runFonts82); runProperties39.Append(bold9); runProperties39.Append(fontSize68); Text text38 = new Text(); text38.Text = ":"; run39.Append(runProperties39); run39.Append(text38); paragraph43.Append(paragraphProperties43); paragraph43.Append(run38); paragraph43.Append(run39); tableCell23.Append(tableCellProperties23); tableCell23.Append(paragraph43); TableCell tableCell24 = new TableCell(); TableCellProperties tableCellProperties24 = new TableCellProperties(); TableCellWidth tableCellWidth24 = new TableCellWidth() { Width = "941", Type = TableWidthUnitValues.Dxa }; tableCellProperties24.Append(tableCellWidth24); Paragraph paragraph44 = new Paragraph() { RsidParagraphAddition = "00B5104A", RsidParagraphProperties = "00B5104A", RsidRunAdditionDefault = "00B5104A" }; ParagraphProperties paragraphProperties44 = new ParagraphProperties(); Tabs tabs24 = new Tabs(); TabStop tabStop77 = new TabStop() { Val = TabStopValues.Left, Position = 6663 }; TabStop tabStop78 = new TabStop() { Val = TabStopValues.Left, Position = 8364 }; tabs24.Append(tabStop77); tabs24.Append(tabStop78); SpacingBetweenLines spacingBetweenLines38 = new SpacingBetweenLines() { Before = "40", After = "40" }; Justification justification19 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties44 = new ParagraphMarkRunProperties(); RunFonts runFonts83 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; FontSize fontSize69 = new FontSize() { Val = "20" }; paragraphMarkRunProperties44.Append(runFonts83); paragraphMarkRunProperties44.Append(fontSize69); paragraphProperties44.Append(tabs24); paragraphProperties44.Append(spacingBetweenLines38); paragraphProperties44.Append(justification19); paragraphProperties44.Append(paragraphMarkRunProperties44); Run run40 = new Run() { RsidRunProperties = "00690638" }; RunProperties runProperties40 = new RunProperties(); RunFonts runFonts84 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold10 = new Bold(); FontSize fontSize70 = new FontSize() { Val = "20" }; runProperties40.Append(runFonts84); runProperties40.Append(bold10); runProperties40.Append(fontSize70); Text text39 = new Text(); //TODO add in total + freightCost double finalTotal = grandTotal + order.freightCost; text39.Text = "$" + String.Format("{0:0.00}", finalTotal); run40.Append(runProperties40); run40.Append(text39); paragraph44.Append(paragraphProperties44); paragraph44.Append(run40); tableCell24.Append(tableCellProperties24); tableCell24.Append(paragraph44); tableRow8.Append(tableCell23); tableRow8.Append(tableCell24); TableRow tableRow9 = new TableRow() { RsidTableRowAddition = "00B5104A", RsidTableRowProperties = "00BD60A1" }; TableCell tableCell25 = new TableCell(); TableCellProperties tableCellProperties25 = new TableCellProperties(); TableCellWidth tableCellWidth25 = new TableCellWidth() { Width = "2500", Type = TableWidthUnitValues.Dxa }; GridSpan gridSpan4 = new GridSpan() { Val = 2 }; tableCellProperties25.Append(tableCellWidth25); tableCellProperties25.Append(gridSpan4); Paragraph paragraph45 = new Paragraph() { RsidParagraphMarkRevision = "00690638", RsidParagraphAddition = "00B5104A", RsidParagraphProperties = "00B5104A", RsidRunAdditionDefault = "00B5104A" }; ParagraphProperties paragraphProperties45 = new ParagraphProperties(); Tabs tabs25 = new Tabs(); TabStop tabStop79 = new TabStop() { Val = TabStopValues.Left, Position = 6663 }; TabStop tabStop80 = new TabStop() { Val = TabStopValues.Left, Position = 8364 }; tabs25.Append(tabStop79); tabs25.Append(tabStop80); SpacingBetweenLines spacingBetweenLines39 = new SpacingBetweenLines() { Before = "40", After = "40" }; Justification justification20 = new Justification() { Val = JustificationValues.Right }; ParagraphMarkRunProperties paragraphMarkRunProperties45 = new ParagraphMarkRunProperties(); RunFonts runFonts85 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold11 = new Bold(); FontSize fontSize71 = new FontSize() { Val = "20" }; paragraphMarkRunProperties45.Append(runFonts85); paragraphMarkRunProperties45.Append(bold11); paragraphMarkRunProperties45.Append(fontSize71); paragraphProperties45.Append(tabs25); paragraphProperties45.Append(spacingBetweenLines39); paragraphProperties45.Append(justification20); paragraphProperties45.Append(paragraphMarkRunProperties45); Run run41 = new Run() { RsidRunProperties = "00882792" }; RunProperties runProperties41 = new RunProperties(); RunFonts runFonts86 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold12 = new Bold(); FontSize fontSize72 = new FontSize() { Val = "18" }; runProperties41.Append(runFonts86); runProperties41.Append(bold12); runProperties41.Append(fontSize72); Text text40 = new Text(); text40.Text = "Paid in Full"; run41.Append(runProperties41); run41.Append(text40); paragraph45.Append(paragraphProperties45); paragraph45.Append(run41); tableCell25.Append(tableCellProperties25); tableCell25.Append(paragraph45); tableRow9.Append(tableCell25); table3.Append(tableProperties3); table3.Append(tableGrid3); table3.Append(tableRow6); table3.Append(tableRow7); table3.Append(tableRow8); table3.Append(tableRow9); Paragraph paragraph46 = new Paragraph() { RsidParagraphMarkRevision = "00690638", RsidParagraphAddition = "00B5104A", RsidParagraphProperties = "00116604", RsidRunAdditionDefault = "00B5104A" }; ParagraphProperties paragraphProperties46 = new ParagraphProperties(); Tabs tabs26 = new Tabs(); TabStop tabStop81 = new TabStop() { Val = TabStopValues.Left, Position = 7938 }; tabs26.Append(tabStop81); SpacingBetweenLines spacingBetweenLines40 = new SpacingBetweenLines() { Before = "40", After = "40" }; ParagraphMarkRunProperties paragraphMarkRunProperties46 = new ParagraphMarkRunProperties(); RunFonts runFonts87 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" }; Bold bold13 = new Bold(); FontSize fontSize73 = new FontSize() { Val = "20" }; paragraphMarkRunProperties46.Append(runFonts87); paragraphMarkRunProperties46.Append(bold13); paragraphMarkRunProperties46.Append(fontSize73); paragraphProperties46.Append(tabs26); paragraphProperties46.Append(spacingBetweenLines40); paragraphProperties46.Append(paragraphMarkRunProperties46); paragraph46.Append(paragraphProperties46); SectionProperties sectionProperties3 = new SectionProperties() { RsidRPr = "00690638", RsidR = "00B5104A", RsidSect = "00EA7D1E" }; SectionType sectionType2 = new SectionType() { Val = SectionMarkValues.Continuous }; PageSize pageSize3 = new PageSize() { Width = (UInt32Value)11906U, Height = (UInt32Value)16838U }; PageMargin pageMargin3 = new PageMargin() { Top = 1440, Right = (UInt32Value)1440U, Bottom = 1440, Left = (UInt32Value)1440U, Header = (UInt32Value)708U, Footer = (UInt32Value)708U, Gutter = (UInt32Value)0U }; Columns columns3 = new Columns() { Space = "286" }; DocGrid docGrid3 = new DocGrid() { LinePitch = 360 }; sectionProperties3.Append(sectionType2); sectionProperties3.Append(pageSize3); sectionProperties3.Append(pageMargin3); sectionProperties3.Append(columns3); sectionProperties3.Append(docGrid3); body1.Append(paragraph1); body1.Append(paragraph2); body1.Append(paragraph3); body1.Append(paragraph4); body1.Append(paragraph5); body1.Append(paragraph6); body1.Append(paragraph7); body1.Append(paragraph8); if (customer != null) { if (customer.firstName != "" || customer.lastName != "") body1.Append(paragraph9); } else { if(order.firstName != "" || order.lastName != "") body1.Append(paragraph9); } if (customer.institution != "") body1.Append(paragraphInstitute); if(customer.address1 != "") body1.Append(paragraph10); if(customer.address2 != "") body1.Append(paragraph11); if(customer.address3 != "") body1.Append(paragraph12); if(customer.postCode != "") body1.Append(paragraph13); if(customer.country != "") body1.Append(paragraph14); body1.Append(paragraph15); body1.Append(table1); body1.Append(paragraph22); body1.Append(paragraph23); body1.Append(paragraph24); body1.Append(table2); body1.Append(paragraph38); body1.Append(table3); body1.Append(paragraph46); body1.Append(sectionProperties3); document1.Append(body1); mainDocumentPart1.Document = document1; }
private Paragraph CreateCenterParagraph(string str) { Paragraph paragraph = new Paragraph(); ParagraphProperties paragraphProperties = new ParagraphProperties(); paragraph.Append(paragraphProperties); paragraphProperties.Append(new Justification() { Val = JustificationValues.Center }); Run run = new Run(); RunProperties runProperties = new RunProperties(); RunFonts runFonts = new RunFonts() { Hint = FontTypeHintValues.EastAsia }; runProperties.Append(runFonts); Text text = new Text() { Space = SpaceProcessingModeValues.Preserve }; text.Text = str; run.Append(runProperties); run.Append(text); paragraph.Append(run); return paragraph; }
// Generates content of mainDocumentPart1. private void GenerateMainDocumentPart1Content(MainDocumentPart mainDocumentPart1) { Document document1 = new Document() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } }; document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"); document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"); document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"); document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"); document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk"); document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml"); document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"); Body body1 = new Body(); Table table1 = new Table(); TableProperties tableProperties1 = new TableProperties(); TableStyle tableStyle1 = new TableStyle() { Val = "TableGrid" }; TableWidth tableWidth1 = new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto }; TableBorders tableBorders1 = new TableBorders(); TopBorder topBorder1 = new TopBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U }; tableBorders1.Append(topBorder1); tableBorders1.Append(leftBorder1); tableBorders1.Append(bottomBorder1); tableBorders1.Append(rightBorder1); tableBorders1.Append(insideHorizontalBorder1); tableBorders1.Append(insideVerticalBorder1); TableLayout tableLayout1 = new TableLayout() { Type = TableLayoutValues.Fixed }; TableCellMarginDefault tableCellMarginDefault1 = new TableCellMarginDefault(); TableCellLeftMargin tableCellLeftMargin1 = new TableCellLeftMargin() { Width = 15, Type = TableWidthValues.Dxa }; TableCellRightMargin tableCellRightMargin1 = new TableCellRightMargin() { Width = 15, Type = TableWidthValues.Dxa }; tableCellMarginDefault1.Append(tableCellLeftMargin1); tableCellMarginDefault1.Append(tableCellRightMargin1); TableLook tableLook1 = new TableLook() { Val = "0000", FirstRow = false, LastRow = false, FirstColumn = false, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = false }; tableProperties1.Append(tableStyle1); tableProperties1.Append(tableWidth1); tableProperties1.Append(tableBorders1); tableProperties1.Append(tableLayout1); tableProperties1.Append(tableCellMarginDefault1); tableProperties1.Append(tableLook1); TableGrid tableGrid1 = new TableGrid(); GridColumn gridColumn1 = new GridColumn() { Width = "3787" }; GridColumn gridColumn2 = new GridColumn() { Width = "173" }; GridColumn gridColumn3 = new GridColumn() { Width = "3787" }; GridColumn gridColumn4 = new GridColumn() { Width = "173" }; GridColumn gridColumn5 = new GridColumn() { Width = "3787" }; tableGrid1.Append(gridColumn1); tableGrid1.Append(gridColumn2); tableGrid1.Append(gridColumn3); tableGrid1.Append(gridColumn4); tableGrid1.Append(gridColumn5); table1.Append(tableProperties1); table1.Append(tableGrid1); var n = 0; TableRow row = null; foreach(var p in q) { if (n % 3 == 0) { if (row != null) table1.Append(row); row = EmployerAddressRow.AddPersonsRow(); } row.AddPersonCell(p, addEmployer); if (n % 3 < 2) row.AddSpacerCell(); n++; } if (n % 3 != 0 && row != null) table1.Append(row); Paragraph paragraph54 = new Paragraph() { RsidParagraphMarkRevision = "005A43FA", RsidParagraphAddition = "005A43FA", RsidParagraphProperties = "005A43FA", RsidRunAdditionDefault = "005A43FA" }; ParagraphProperties paragraphProperties54 = new ParagraphProperties(); Indentation indentation54 = new Indentation() { Left = "95", Right = "95" }; ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties(); Vanish vanish1 = new Vanish(); paragraphMarkRunProperties1.Append(vanish1); paragraphProperties54.Append(indentation54); paragraphProperties54.Append(paragraphMarkRunProperties1); paragraph54.Append(paragraphProperties54); SectionProperties sectionProperties1 = new SectionProperties() { RsidRPr = "005A43FA", RsidR = "005A43FA", RsidSect = "005A43FA" }; SectionType sectionType1 = new SectionType() { Val = SectionMarkValues.Continuous }; PageSize pageSize1 = new PageSize() { Width = (UInt32Value)12240U, Height = (UInt32Value)15840U }; PageMargin pageMargin1 = new PageMargin() { Top = 720, Right = (UInt32Value)270U, Bottom = 0, Left = (UInt32Value)270U, Header = (UInt32Value)720U, Footer = (UInt32Value)720U, Gutter = (UInt32Value)0U }; PaperSource paperSource1 = new PaperSource() { First = (UInt16Value)4U, Other = (UInt16Value)4U }; Columns columns1 = new Columns() { Space = "720" }; sectionProperties1.Append(sectionType1); sectionProperties1.Append(pageSize1); sectionProperties1.Append(pageMargin1); sectionProperties1.Append(paperSource1); sectionProperties1.Append(columns1); body1.Append(table1); body1.Append(paragraph54); body1.Append(sectionProperties1); document1.Append(body1); mainDocumentPart1.Document = document1; }
// Generates content of glossaryDocumentPart1. private void GenerateGlossaryDocumentPart1Content(GlossaryDocumentPart glossaryDocumentPart1) { GlossaryDocument glossaryDocument1 = new GlossaryDocument(){ MCAttributes = new MarkupCompatibilityAttributes(){ Ignorable = "w14 w15 wp14" } }; glossaryDocument1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"); glossaryDocument1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); glossaryDocument1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); glossaryDocument1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); glossaryDocument1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); glossaryDocument1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); glossaryDocument1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"); glossaryDocument1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"); glossaryDocument1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); glossaryDocument1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); glossaryDocument1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); glossaryDocument1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2010/11/wordml"); glossaryDocument1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"); glossaryDocument1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk"); glossaryDocument1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml"); glossaryDocument1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"); DocParts docParts1 = new DocParts(); DocPart docPart1 = new DocPart(); DocPartProperties docPartProperties1 = new DocPartProperties(); DocPartName docPartName1 = new DocPartName(){ Val = "DefaultPlaceholder_1081868558" }; Category category1 = new Category(); Name name1 = new Name(){ Val = "General" }; Gallery gallery1 = new Gallery(){ Val = DocPartGalleryValues.Placeholder }; category1.Append(name1); category1.Append(gallery1); DocPartTypes docPartTypes1 = new DocPartTypes(); DocPartType docPartType1 = new DocPartType(){ Val = DocPartValues.SdtPlaceholder }; docPartTypes1.Append(docPartType1); Behaviors behaviors1 = new Behaviors(); Behavior behavior1 = new Behavior(){ Val = DocPartBehaviorValues.Content }; behaviors1.Append(behavior1); DocPartId docPartId1 = new DocPartId(){ Val = "{F039DA22-FC7F-4FBD-92C2-651CCBF1B274}" }; docPartProperties1.Append(docPartName1); docPartProperties1.Append(category1); docPartProperties1.Append(docPartTypes1); docPartProperties1.Append(behaviors1); docPartProperties1.Append(docPartId1); DocPartBody docPartBody1 = new DocPartBody(); Paragraph paragraph19 = new Paragraph(){ RsidParagraphAddition = "00930812", RsidRunAdditionDefault = "00B75576" }; Run run25 = new Run(){ RsidRunProperties = "003E0DED" }; RunProperties runProperties43 = new RunProperties(); RunStyle runStyle3 = new RunStyle(){ Val = "PlaceholderText" }; runProperties43.Append(runStyle3); Text text25 = new Text(); text25.Text = "Click here to enter text."; run25.Append(runProperties43); run25.Append(text25); paragraph19.Append(run25); docPartBody1.Append(paragraph19); docPart1.Append(docPartProperties1); docPart1.Append(docPartBody1); DocPart docPart2 = new DocPart(); DocPartProperties docPartProperties2 = new DocPartProperties(); DocPartName docPartName2 = new DocPartName(){ Val = "DefaultPlaceholder_1081868562" }; Category category2 = new Category(); Name name2 = new Name(){ Val = "General" }; Gallery gallery2 = new Gallery(){ Val = DocPartGalleryValues.Placeholder }; category2.Append(name2); category2.Append(gallery2); DocPartTypes docPartTypes2 = new DocPartTypes(); DocPartType docPartType2 = new DocPartType(){ Val = DocPartValues.SdtPlaceholder }; docPartTypes2.Append(docPartType2); Behaviors behaviors2 = new Behaviors(); Behavior behavior2 = new Behavior(){ Val = DocPartBehaviorValues.Content }; behaviors2.Append(behavior2); DocPartId docPartId2 = new DocPartId(){ Val = "{00F3F2EC-0290-443B-9815-66648EE1ADF9}" }; docPartProperties2.Append(docPartName2); docPartProperties2.Append(category2); docPartProperties2.Append(docPartTypes2); docPartProperties2.Append(behaviors2); docPartProperties2.Append(docPartId2); DocPartBody docPartBody2 = new DocPartBody(); Paragraph paragraph20 = new Paragraph(){ RsidParagraphAddition = "00930812", RsidRunAdditionDefault = "00B75576" }; Run run26 = new Run(){ RsidRunProperties = "003E0DED" }; RunProperties runProperties44 = new RunProperties(); RunStyle runStyle4 = new RunStyle(){ Val = "PlaceholderText" }; runProperties44.Append(runStyle4); Text text26 = new Text(); text26.Text = "Enter any content that you want to repeat, including other content controls. You can also insert this control around table rows in order to repeat parts of a table."; run26.Append(runProperties44); run26.Append(text26); paragraph20.Append(run26); docPartBody2.Append(paragraph20); docPart2.Append(docPartProperties2); docPart2.Append(docPartBody2); DocPart docPart3 = new DocPart(); DocPartProperties docPartProperties3 = new DocPartProperties(); DocPartName docPartName3 = new DocPartName(){ Val = "B207B2DF6D0E4E13956E6616811860CA" }; Category category3 = new Category(); Name name3 = new Name(){ Val = "General" }; Gallery gallery3 = new Gallery(){ Val = DocPartGalleryValues.Placeholder }; category3.Append(name3); category3.Append(gallery3); DocPartTypes docPartTypes3 = new DocPartTypes(); DocPartType docPartType3 = new DocPartType(){ Val = DocPartValues.SdtPlaceholder }; docPartTypes3.Append(docPartType3); Behaviors behaviors3 = new Behaviors(); Behavior behavior3 = new Behavior(){ Val = DocPartBehaviorValues.Content }; behaviors3.Append(behavior3); DocPartId docPartId3 = new DocPartId(){ Val = "{1631777A-52D9-4CE4-A42F-C87B6FA35F21}" }; docPartProperties3.Append(docPartName3); docPartProperties3.Append(category3); docPartProperties3.Append(docPartTypes3); docPartProperties3.Append(behaviors3); docPartProperties3.Append(docPartId3); DocPartBody docPartBody3 = new DocPartBody(); Paragraph paragraph21 = new Paragraph(){ RsidParagraphAddition = "00EF189C", RsidParagraphProperties = "00930812", RsidRunAdditionDefault = "00930812" }; ParagraphProperties paragraphProperties1 = new ParagraphProperties(); ParagraphStyleId paragraphStyleId1 = new ParagraphStyleId(){ Val = "B207B2DF6D0E4E13956E6616811860CA" }; paragraphProperties1.Append(paragraphStyleId1); Run run27 = new Run(){ RsidRunProperties = "00D27A45" }; RunProperties runProperties45 = new RunProperties(); RunStyle runStyle5 = new RunStyle(){ Val = "PlaceholderText" }; runProperties45.Append(runStyle5); Text text27 = new Text(); text27.Text = "Click here to enter text."; run27.Append(runProperties45); run27.Append(text27); paragraph21.Append(paragraphProperties1); paragraph21.Append(run27); docPartBody3.Append(paragraph21); docPart3.Append(docPartProperties3); docPart3.Append(docPartBody3); DocPart docPart4 = new DocPart(); DocPartProperties docPartProperties4 = new DocPartProperties(); DocPartName docPartName4 = new DocPartName(){ Val = "4B632797D8B1461898B8F461443A20E0" }; Category category4 = new Category(); Name name4 = new Name(){ Val = "General" }; Gallery gallery4 = new Gallery(){ Val = DocPartGalleryValues.Placeholder }; category4.Append(name4); category4.Append(gallery4); DocPartTypes docPartTypes4 = new DocPartTypes(); DocPartType docPartType4 = new DocPartType(){ Val = DocPartValues.SdtPlaceholder }; docPartTypes4.Append(docPartType4); Behaviors behaviors4 = new Behaviors(); Behavior behavior4 = new Behavior(){ Val = DocPartBehaviorValues.Content }; behaviors4.Append(behavior4); DocPartId docPartId4 = new DocPartId(){ Val = "{4829C634-4047-4182-9E1A-7F28677ACBC2}" }; docPartProperties4.Append(docPartName4); docPartProperties4.Append(category4); docPartProperties4.Append(docPartTypes4); docPartProperties4.Append(behaviors4); docPartProperties4.Append(docPartId4); DocPartBody docPartBody4 = new DocPartBody(); Paragraph paragraph22 = new Paragraph(){ RsidParagraphAddition = "00EF189C", RsidParagraphProperties = "00930812", RsidRunAdditionDefault = "00930812" }; ParagraphProperties paragraphProperties2 = new ParagraphProperties(); ParagraphStyleId paragraphStyleId2 = new ParagraphStyleId(){ Val = "4B632797D8B1461898B8F461443A20E0" }; paragraphProperties2.Append(paragraphStyleId2); Run run28 = new Run(){ RsidRunProperties = "00D27A45" }; RunProperties runProperties46 = new RunProperties(); RunStyle runStyle6 = new RunStyle(){ Val = "PlaceholderText" }; runProperties46.Append(runStyle6); Text text28 = new Text(); text28.Text = "Click here to enter text."; run28.Append(runProperties46); run28.Append(text28); paragraph22.Append(paragraphProperties2); paragraph22.Append(run28); docPartBody4.Append(paragraph22); docPart4.Append(docPartProperties4); docPart4.Append(docPartBody4); docParts1.Append(docPart1); docParts1.Append(docPart2); docParts1.Append(docPart3); docParts1.Append(docPart4); glossaryDocument1.Append(docParts1); glossaryDocumentPart1.GlossaryDocument = glossaryDocument1; }
// Generates content of footerPart1. private void GenerateFooterPart1Content(FooterPart footerPart1) { Footer footer1 = new Footer() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } }; footer1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"); footer1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); footer1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); footer1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); footer1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); footer1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); footer1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"); footer1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"); footer1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); footer1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); footer1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); footer1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"); footer1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk"); footer1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml"); footer1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"); Paragraph paragraph51 = new Paragraph() { RsidParagraphAddition = "004F7F90", RsidRunAdditionDefault = "00900A10" }; ParagraphProperties paragraphProperties49 = new ParagraphProperties(); WidowControl widowControl49 = new WidowControl() { Val = false }; ParagraphBorders paragraphBorders1 = new ParagraphBorders(); TopBorder topBorder18 = new TopBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)5U }; paragraphBorders1.Append(topBorder18); AutoSpaceDE autoSpaceDE49 = new AutoSpaceDE() { Val = false }; AutoSpaceDN autoSpaceDN49 = new AutoSpaceDN() { Val = false }; AdjustRightIndent adjustRightIndent49 = new AdjustRightIndent() { Val = false }; SpacingBetweenLines spacingBetweenLines35 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; Justification justification10 = new Justification() { Val = JustificationValues.Center }; ParagraphMarkRunProperties paragraphMarkRunProperties49 = new ParagraphMarkRunProperties(); RunFonts runFonts91 = new RunFonts() { Ascii = "New Roman", HighAnsi = "New Roman", EastAsia = "New Roman", ComplexScript = "Times New Roman" }; FontSize fontSize91 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript91 = new FontSizeComplexScript() { Val = "18" }; paragraphMarkRunProperties49.Append(runFonts91); paragraphMarkRunProperties49.Append(fontSize91); paragraphMarkRunProperties49.Append(fontSizeComplexScript91); paragraphProperties49.Append(widowControl49); paragraphProperties49.Append(paragraphBorders1); paragraphProperties49.Append(autoSpaceDE49); paragraphProperties49.Append(autoSpaceDN49); paragraphProperties49.Append(adjustRightIndent49); paragraphProperties49.Append(spacingBetweenLines35); paragraphProperties49.Append(justification10); paragraphProperties49.Append(paragraphMarkRunProperties49); Run run43 = new Run(); RunProperties runProperties43 = new RunProperties(); RunFonts runFonts92 = new RunFonts() { Ascii = "New Roman", HighAnsi = "New Roman", EastAsia = "New Roman", ComplexScript = "Times New Roman" }; FontSize fontSize92 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript92 = new FontSizeComplexScript() { Val = "18" }; runProperties43.Append(runFonts92); runProperties43.Append(fontSize92); runProperties43.Append(fontSizeComplexScript92); Text text43 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text43.Text = "Страница "; run43.Append(runProperties43); run43.Append(text43); Run run44 = new Run(); RunProperties runProperties44 = new RunProperties(); RunFonts runFonts93 = new RunFonts() { Ascii = "New Roman", HighAnsi = "New Roman", EastAsia = "New Roman", ComplexScript = "Times New Roman" }; FontSize fontSize93 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript93 = new FontSizeComplexScript() { Val = "18" }; runProperties44.Append(runFonts93); runProperties44.Append(fontSize93); runProperties44.Append(fontSizeComplexScript93); FieldChar fieldChar1 = new FieldChar() { FieldCharType = FieldCharValues.Begin }; run44.Append(runProperties44); run44.Append(fieldChar1); Run run45 = new Run(); RunProperties runProperties45 = new RunProperties(); RunFonts runFonts94 = new RunFonts() { Ascii = "New Roman", HighAnsi = "New Roman", EastAsia = "New Roman", ComplexScript = "Times New Roman" }; FontSize fontSize94 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript94 = new FontSizeComplexScript() { Val = "18" }; runProperties45.Append(runFonts94); runProperties45.Append(fontSize94); runProperties45.Append(fontSizeComplexScript94); FieldCode fieldCode1 = new FieldCode(); fieldCode1.Text = "PAGE"; run45.Append(runProperties45); run45.Append(fieldCode1); Run run46 = new Run(); RunProperties runProperties46 = new RunProperties(); RunFonts runFonts95 = new RunFonts() { Ascii = "New Roman", HighAnsi = "New Roman", EastAsia = "New Roman", ComplexScript = "Times New Roman" }; FontSize fontSize95 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript95 = new FontSizeComplexScript() { Val = "18" }; runProperties46.Append(runFonts95); runProperties46.Append(fontSize95); runProperties46.Append(fontSizeComplexScript95); FieldChar fieldChar2 = new FieldChar() { FieldCharType = FieldCharValues.Separate }; run46.Append(runProperties46); run46.Append(fieldChar2); Run run47 = new Run() { RsidRunAddition = "00D60978" }; RunProperties runProperties47 = new RunProperties(); RunFonts runFonts96 = new RunFonts() { Ascii = "New Roman", HighAnsi = "New Roman", EastAsia = "New Roman", ComplexScript = "Times New Roman" }; NoProof noProof1 = new NoProof(); FontSize fontSize96 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript96 = new FontSizeComplexScript() { Val = "18" }; runProperties47.Append(runFonts96); runProperties47.Append(noProof1); runProperties47.Append(fontSize96); runProperties47.Append(fontSizeComplexScript96); Text text44 = new Text(); text44.Text = "1"; run47.Append(runProperties47); run47.Append(text44); Run run48 = new Run(); RunProperties runProperties48 = new RunProperties(); RunFonts runFonts97 = new RunFonts() { Ascii = "New Roman", HighAnsi = "New Roman", EastAsia = "New Roman", ComplexScript = "Times New Roman" }; FontSize fontSize97 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript97 = new FontSizeComplexScript() { Val = "18" }; runProperties48.Append(runFonts97); runProperties48.Append(fontSize97); runProperties48.Append(fontSizeComplexScript97); FieldChar fieldChar3 = new FieldChar() { FieldCharType = FieldCharValues.End }; run48.Append(runProperties48); run48.Append(fieldChar3); Run run49 = new Run(); RunProperties runProperties49 = new RunProperties(); RunFonts runFonts98 = new RunFonts() { Ascii = "New Roman", HighAnsi = "New Roman", EastAsia = "New Roman", ComplexScript = "Times New Roman" }; FontSize fontSize98 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript98 = new FontSizeComplexScript() { Val = "18" }; runProperties49.Append(runFonts98); runProperties49.Append(fontSize98); runProperties49.Append(fontSizeComplexScript98); Text text45 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text45.Text = " из "; run49.Append(runProperties49); run49.Append(text45); Run run50 = new Run(); RunProperties runProperties50 = new RunProperties(); RunFonts runFonts99 = new RunFonts() { Ascii = "New Roman", HighAnsi = "New Roman", EastAsia = "New Roman", ComplexScript = "Times New Roman" }; FontSize fontSize99 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript99 = new FontSizeComplexScript() { Val = "18" }; runProperties50.Append(runFonts99); runProperties50.Append(fontSize99); runProperties50.Append(fontSizeComplexScript99); FieldChar fieldChar4 = new FieldChar() { FieldCharType = FieldCharValues.Begin }; run50.Append(runProperties50); run50.Append(fieldChar4); Run run51 = new Run(); RunProperties runProperties51 = new RunProperties(); RunFonts runFonts100 = new RunFonts() { Ascii = "New Roman", HighAnsi = "New Roman", EastAsia = "New Roman", ComplexScript = "Times New Roman" }; FontSize fontSize100 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript100 = new FontSizeComplexScript() { Val = "18" }; runProperties51.Append(runFonts100); runProperties51.Append(fontSize100); runProperties51.Append(fontSizeComplexScript100); FieldCode fieldCode2 = new FieldCode(); fieldCode2.Text = "NUMPAGES"; run51.Append(runProperties51); run51.Append(fieldCode2); Run run52 = new Run(); RunProperties runProperties52 = new RunProperties(); RunFonts runFonts101 = new RunFonts() { Ascii = "New Roman", HighAnsi = "New Roman", EastAsia = "New Roman", ComplexScript = "Times New Roman" }; FontSize fontSize101 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript101 = new FontSizeComplexScript() { Val = "18" }; runProperties52.Append(runFonts101); runProperties52.Append(fontSize101); runProperties52.Append(fontSizeComplexScript101); FieldChar fieldChar5 = new FieldChar() { FieldCharType = FieldCharValues.Separate }; run52.Append(runProperties52); run52.Append(fieldChar5); Run run53 = new Run() { RsidRunAddition = "00D60978" }; RunProperties runProperties53 = new RunProperties(); RunFonts runFonts102 = new RunFonts() { Ascii = "New Roman", HighAnsi = "New Roman", EastAsia = "New Roman", ComplexScript = "Times New Roman" }; NoProof noProof2 = new NoProof(); FontSize fontSize102 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript102 = new FontSizeComplexScript() { Val = "18" }; runProperties53.Append(runFonts102); runProperties53.Append(noProof2); runProperties53.Append(fontSize102); runProperties53.Append(fontSizeComplexScript102); Text text46 = new Text(); text46.Text = "1"; run53.Append(runProperties53); run53.Append(text46); Run run54 = new Run(); RunProperties runProperties54 = new RunProperties(); RunFonts runFonts103 = new RunFonts() { Ascii = "New Roman", HighAnsi = "New Roman", EastAsia = "New Roman", ComplexScript = "Times New Roman" }; FontSize fontSize103 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript103 = new FontSizeComplexScript() { Val = "18" }; runProperties54.Append(runFonts103); runProperties54.Append(fontSize103); runProperties54.Append(fontSizeComplexScript103); FieldChar fieldChar6 = new FieldChar() { FieldCharType = FieldCharValues.End }; run54.Append(runProperties54); run54.Append(fieldChar6); Run run55 = new Run(); RunProperties runProperties55 = new RunProperties(); RunFonts runFonts104 = new RunFonts() { Ascii = "New Roman", HighAnsi = "New Roman", EastAsia = "New Roman", ComplexScript = "Times New Roman" }; FontSize fontSize104 = new FontSize() { Val = "18" }; FontSizeComplexScript fontSizeComplexScript104 = new FontSizeComplexScript() { Val = "18" }; runProperties55.Append(runFonts104); runProperties55.Append(fontSize104); runProperties55.Append(fontSizeComplexScript104); Text text47 = new Text() { Space = SpaceProcessingModeValues.Preserve }; text47.Text = " "; run55.Append(runProperties55); run55.Append(text47); paragraph51.Append(paragraphProperties49); paragraph51.Append(run43); paragraph51.Append(run44); paragraph51.Append(run45); paragraph51.Append(run46); paragraph51.Append(run47); paragraph51.Append(run48); paragraph51.Append(run49); paragraph51.Append(run50); paragraph51.Append(run51); paragraph51.Append(run52); paragraph51.Append(run53); paragraph51.Append(run54); paragraph51.Append(run55); footer1.Append(paragraph51); footerPart1.Footer = footer1; }