예제 #1
0
        void IDocumentExport.Export(SectionDocument document, Stream outputStream, string pageRange)
        {
            var html = HtmlExport(document, pageRange);

            HtmlToWord(html, ((FileStream)outputStream).Name);
            ClearHtmlPath();
        }
예제 #2
0
        void IDocumentExport.Export(SectionDocument document, string filePath, string pageRange)
        {
            var html = HtmlExport(document, pageRange);

            HtmlToWord(html, filePath);
            ClearHtmlPath();
        }
예제 #3
0
 public void Export(SectionDocument document, string destFilePath)
 {
     try
     {
         _docExp.Export(document, destFilePath, null);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
예제 #4
0
        private string HtmlExport(SectionDocument document, string pageRange)
        {
            if (!Directory.Exists(_htmlPath))
            {
                Directory.CreateDirectory(_htmlPath);
            }

            using (var htmlExport = new HtmlExport())
                htmlExport.Export(document, _htmlFilePath, pageRange);
            return(GetHtmlString());
        }
예제 #5
0
        void IDocumentExport.Export(SectionDocument document, Stream outputStream, string pageRange)
        {
            var html = HtmlExport(document, pageRange);

            using (var generatedDocument = new MemoryStream())
            {
                HtmlToOpenXml(html, generatedDocument);
                WriteAllBytes(outputStream, generatedDocument);
            }
            ClearHtmlPath();
        }
 public override void Export(SectionDocument document, string filename, NameValueCollection settings)
 {
     throw new NotImplementedException();
 }
예제 #7
0
 public override void Export(SectionDocument document, string filename, NameValueCollection settings)
 {
     throw new NotImplementedException();
 }
예제 #8
0
 public void Export(SectionDocument sectionDocument, string filePath)
 {
     Settings.Export(sectionDocument, filePath);
 }
예제 #9
0
 void IDocumentExport.Export(SectionDocument document, IOutputHtml outputHandler, string pageRange)
 {
     throw new NotSupportedException("It's not allowed to use IOutputHtml");
 }
예제 #10
0
 void IDocumentExport.Export(SectionDocument document, Stream outputStream)
 {
     ((IDocumentExport)this).Export(document, outputStream, string.Empty);
 }
예제 #11
0
 void IDocumentExport.Export(SectionDocument document, string filePath)
 {
     ((IDocumentExport)this).Export(document, filePath, string.Empty);
 }
 public abstract void Export(SectionDocument document, string filename, NameValueCollection settings);
 public abstract void Export(SectionDocument document, string filename, NameValueCollection settings);