void IDocumentExport.Export(SectionDocument document, Stream outputStream, string pageRange) { var html = HtmlExport(document, pageRange); HtmlToWord(html, ((FileStream)outputStream).Name); ClearHtmlPath(); }
void IDocumentExport.Export(SectionDocument document, string filePath, string pageRange) { var html = HtmlExport(document, pageRange); HtmlToWord(html, filePath); ClearHtmlPath(); }
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); } }
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()); }
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(); }
public void Export(SectionDocument sectionDocument, string filePath) { Settings.Export(sectionDocument, filePath); }
void IDocumentExport.Export(SectionDocument document, IOutputHtml outputHandler, string pageRange) { throw new NotSupportedException("It's not allowed to use IOutputHtml"); }
void IDocumentExport.Export(SectionDocument document, Stream outputStream) { ((IDocumentExport)this).Export(document, outputStream, string.Empty); }
void IDocumentExport.Export(SectionDocument document, string filePath) { ((IDocumentExport)this).Export(document, filePath, string.Empty); }
public abstract void Export(SectionDocument document, string filename, NameValueCollection settings);