pdf文件转换成html文件方法 其中用到了Aspose.Pdf 这个插件
using System.IO; using System.Text; using Aspose.Pdf; namespace System.Extensions { public static class PdfConverter { public static string Read(Stream stream, string fullPath) { if (Directory.Exists(fullPath)) { Directory.Delete(fullPath, true); } Directory.CreateDirectory(fullPath); try { var doc = new Document(stream); var saveOptions = new HtmlSaveOptions() { FixedLayout = true, SplitIntoPages = false, SplitCssIntoPages = false, RasterImagesSavingMode = HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground, SpecialFolderForAllImages = fullPath }; var path = Path.C
pdf文件转换成html文件方法
最新推荐文章于 2021-06-17 08:23:09 发布