12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- using DocumentFormat.OpenXml.Drawing;
- using HTEXLib;
- using HTEXLib.Builders;
- using HTEXLib.Controller;
- using HTEXLib.Helpers.ShapeHelpers;
- using HTEXLib.Models;
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Text.Json;
- using System.Text.RegularExpressions;
- namespace HTEXTest
- {
- class Program
- {
- static void Main(string[] args)
- {
-
- string a = "𝐿𝑀是㇀𝑁A𝑂Bcd𝑃𝑥𝑦𝑧";
- UTF32Encoding encoding = new UTF32Encoding();
- Byte[] encodedBytes = encoding.GetBytes(a);
- string ad = encoding.GetString(encodedBytes, 0, 4);
-
-
-
-
-
- //var a = CharHelper.chararry;
- // Dictionary<string, string> ditc = new Dictionary<string, string>();
- // foreach (var aa in a) {
- // int len = aa.Length;
- // for (int i = 1; i < len; i++) {
- // ditc[aa[i ]]=aa[0];
- // }
- // }
- //<a:schemeClr val="dk1" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" />
- // RgbColorModelHex rgbColorModelHex = new RgbColorModelHex(" <a:prstClr val=\"black\" xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" />");
- //string path = "F:\\PRD-20191015001-template-math.pptx";
- //var json = JsonSerializer.Serialize(ditc, null) ;
- string path = "F:\\1234o.pptx";
- // string path = "F:\\PRD-20191015001.pptx";
- var htexBuilder = new HtexBuilder();
- var pptSlides = htexBuilder.GetPPTSlides(path);
- double width = htexBuilder.getSlideWidth();
- double height = htexBuilder.getSlideHeight();
- int slideCounter = 1;
- Htex htex= htexBuilder.Htex;
- htex.page = pptSlides.Count;
- htex.size = new HtexSize { width = width, height = height };
- foreach (PPTSlide pptSlide in pptSlides)
- {
- var htexController = new HtexController( pptSlide, slideCounter, pptSlides.Count)
- {
- SlideWidth = width,
- SlideHeight = height
- };
- htexController.GenerateHtex();
- slideCounter++;
- }
- htexBuilder.presentationDocument.Close();
- GC.Collect();
- }
- }
- }
|