示例#1
0
        public static void Test_Trace_HtmlToOXml_v2(string file, string imageDirectory)
        {
            string traceFile = file + ".oxml.json";
            //HtmlToOXmlElements_v2.ToOXmlXElements(HtmlDocReader.ReadFile(file), imageDirectory).zSave(traceFile);
            //HtmlToOXmlElements_v2 htmlToOXmlElements = HtmlToOXmlElements_v2.Create(BlogDemoor_v4.GetConfigElement().zXPathElement("HtmlToDocx"), imageDirectory);
            HtmlToOXmlElements_v2 htmlToOXmlElements = CreateHtmlToOXmlElements(BlogDemoor_v4.GetConfigElement(), imageDirectory);

            htmlToOXmlElements.ToOXmlXElements(HtmlDocReader.ReadFile(file)).zSave(traceFile, jsonIndent: true);
        }
示例#2
0
        public static void Test_HtmlToDocx(string file, string imageDirectory, string title = null, string footerText = null)
        {
            IEnumerable <OXmlElement> elements =
                GetDocDefaults().Union(
                    GetStyles()).Union(
                    GetDocSection()).Union(
                    GetHeaderFooter(footerText));

            if (title != null)
            {
                elements = elements.Union(GetTitle(title));
            }
            //HtmlToOXmlElements_v2 htmlToOXmlElements = HtmlToOXmlElements_v2.Create(BlogDemoor_v4.GetConfigElement().zXPathElement("HtmlToDocx"), imageDirectory);
            HtmlToOXmlElements_v2 htmlToOXmlElements = CreateHtmlToOXmlElements(BlogDemoor_v4.GetConfigElement(), imageDirectory);

            //elements = elements.Union(HtmlToOXmlElements_v2.ToOXmlXElements(HtmlDocReader.ReadFile(file), imageDirectory));
            elements = elements.Union(htmlToOXmlElements.ToOXmlXElements(HtmlDocReader.ReadFile(file)));
            OXmlDoc.Create(file + ".docx", elements);
        }
示例#3
0
        public static void Test_Trace_HtmlToOXmlText(string file)
        {
            string traceFile = file + ".htmltooxml.text.trace";

            HtmlToOXmlElements_v1.ToOXmlXElements(HtmlDocReader.ReadFile(file)).zTraceToFile(traceFile);
        }
示例#4
0
        public static void Test_Trace_HtmlToOXml_v1(string file)
        {
            string traceFile = file + ".oxml.json";

            HtmlToOXmlElements_v1.ToOXmlXElements(HtmlDocReader.ReadFile(file)).zSave(traceFile, jsonIndent: true);
        }
示例#5
0
        public static void Test_Trace_HtmlDocText(string file)
        {
            string traceFile = file + ".htmldoc.text.trace";

            HtmlDocReader.ReadFile(file).zTraceToFile(traceFile);
        }
示例#6
0
        public static void Test_Trace_HtmlDoc(string file)
        {
            string traceFile = file + ".htmldoc.trace";

            HtmlDocReader.ReadFile(file).zSave(traceFile, jsonIndent: true);
        }