【问题标题】:Read Pdf file and convert to html elements读取 Pdf 文件并转换为 html 元素
【发布时间】:2018-06-09 02:15:22
【问题描述】:

我们需要阅读 pdf 文件并将其转换为 html 元素(即文本、日期字段、文本区域等)。有没有可用的插件...或任何其他方法。

【问题讨论】:

  • 你有没有尝试找到类似的东西?了解您的需求。
  • 这可能会因为基于意见而被关闭,因为它基本上是在寻求一种工具。只是提醒一下。
  • “要求我们推荐或查找书籍、工具、软件库、教程或其他非现场资源的问题对于 Stack Overflow 来说是题外话,因为它们往往会吸引自以为是的答案和垃圾邮件。相反,请描述问题以及迄今为止为解决该问题所做的工作。”

标签: c# jquery html pdf model-view-controller


【解决方案1】:

也许这些信息可以帮助你

nuget

PM> Install-Package sautinsoft.pdffocus

示例

string pathToPdf = @"d:\Tempos\table.pdf"; 
string pathToHtml = Path.ChangeExtension(pathToPdf, ".htm"); 

// Convert PDF file to HTML file 
SautinSoft.PdfFocus f = new SautinSoft.PdfFocus(); 
// You may download the latest version of SDK here:  
// www.sautinsoft.com/products/pdf-focus/download.php  

 
// Let's force the component to store images inside HTML document 
// using base-64 encoding 
f.HtmlOptions.IncludeImageInHtml = true; 
f.HtmlOptions.Title = "Simple text"; 

// This property is necessary only for registered version 
 

f.OpenPdf(pathToPdf); 

if (f.PageCount > 0) 
{ 
    int result = f.ToHtml(pathToHtml); 

    //Show HTML document in browser 
    if (result == 0) 
    { 
        System.Diagnostics.Process.Start(pathToHtml); 
    } 
} 

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-12-12
    • 1970-01-01
    • 2021-09-26
    • 2018-06-03
    • 2013-07-10
    相关资源
    最近更新 更多