首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

使用ITextSharp编辑PDF格式的超链接和锚点

关于使用ITextSharp编辑PDF格式的超链接和锚点,以下是完善且全面的答案:

  1. 超链接

超链接是指在PDF文档中,通过链接可以跳转到其他文档、网页或其他位置的功能。在ITextSharp中,可以使用PdfAction和PdfAnnotation来实现超链接。

以下是一个示例代码,演示如何在PDF文档中添加超链接:

代码语言:csharp
复制
using System;
using System.IO;
using iTextSharp.text.pdf;

namespace ITextSharpExample
{
    class Program
    {
        static void Main(string[] args)
        {
            // 创建一个新的PDF文档
            Document document = new Document();
            PdfWriter.GetInstance(document, new FileStream("output.pdf", FileMode.Create));
            document.Open();

            // 添加一个超链接到其他PDF文档
            Chunk link = new Chunk("点击这里跳转到其他PDF文档");
            PdfAction action = PdfAction.GotoLocalPage(1, new PdfDestination(PdfDestination.FIT), document);
            link.Action = action;
            document.Add(link);

            // 添加一个超链接到网页
            link = new Chunk("点击这里跳转到网页");
            action = PdfAction.GotoEmbedded("http://www.example.com", false, false);
            link.Action = action;
            document.Add(link);

            // 关闭文档
            document.Close();
        }
    }
}
  1. 锚点

锚点是指在PDF文档中,通过链接可以跳转到文档中的指定位置的功能。在ITextSharp中,可以使用PdfDestination来实现锚点。

以下是一个示例代码,演示如何在PDF文档中添加锚点:

代码语言:csharp
复制

using System;

using System.IO;

using iTextSharp.text;

using iTextSharp.text.pdf;

using iTextSharp.text.pdf.draw;

namespace ITextSharpExample

{

代码语言:txt
复制
class Program
代码语言:txt
复制
{
代码语言:txt
复制
    static void Main(string[] args)
代码语言:txt
复制
    {
代码语言:txt
复制
        // 创建一个新的PDF文档
代码语言:txt
复制
        Document document = new Document();
代码语言:txt
复制
        PdfWriter.GetInstance(document, new FileStream("output.pdf", FileMode.Create));
代码语言:txt
复制
        document.Open();
代码语言:txt
复制
        // 添加一个标题,作为锚点的目标位置
代码语言:txt
复制
        Paragraph header = new Paragraph("这是一个标题,作为锚点的目标位置");
代码语言:txt
复制
        string targetName = "target";
代码语言:txt
复制
        PdfDestination destination = new PdfDestination(PdfDestination.FIT, header.GetTop(document));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.FITH, header.GetTop(document)));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.FITV, header.GetTop(document)));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.FITB, header.GetTop(document)));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.FITBH, header.GetTop(document)));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.FITBV, header.GetTop(document)));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new PdfDestination(PdfDestination.XYZ, header.GetTop(document), header.GetLeft(document), 1));
代码语言:txt
复制
        destination.AddFirst(new P
页面内容是否对你有帮助?
有帮助
没帮助

相关·内容

CSharp每日代码示例:使用iTextSharp创建PDF文件

本文演示如何使用iTextSharp PDF库将文本文件转换为PDF文件。 iTextSharp是一个从JAVA项目iText衍生.Net版本开源项目,采用GPL许可证发布。...,块可以用于构建其他基础元素如短句、段落、等,块是一个有确定字体字符串,要添加块到文档中时,其他所有布局变量均要被定义。...以使用IndentationLeftIndentationRight,FirstLineIndent属性设置缩排; 六、(Anchor) 如果你想在文档中添加一个外部链接(例如使用URL链接到WEB...; anchor.Name = "website"; 如果你想添加内部链接,你需要选择该链接不同名称,就象你相位在HTML中利用名称作为一样。...使用iTextSharp工具转换为单个PDF代码 The Code 1.

2.8K10

java PDF开源库选择与iText发展历史

这一特点使它成为在Internet上进行电子文档发行和数字化信息传播理想文档格式。越来越多电子图书、产品说明、公司文告、网络资料、电子邮件在开始使用PDF格式文件。...总结一下就是PDF是一种文件格式,只要按照这种文件格式谁都能创建、阅读编辑PDF文档。...之前一直以为PDF是Adobe产物是有版权,其余阅读器什么都是向Adobe公司申请版权,才发现自己理解错了,只要你有能力完全可以自己设计PDF阅读器编辑器 1.2 PDF SDK 对于我们开发人员来说...Adobe PDF SDKFoxit PDF SDK资料很齐全,函数功能也很齐全,但是缺乏编辑创建模块,相应模块都是需要申请试用购买。...iText库.NET版本,并且与iText版本号同步,iText 5.0.0iTextSharp5.0.0同时发布 Java方面,使用Java 5/JDK 1.5 iText开始逐渐专业化,iText

6.4K30
  • 强大 .NET PDF处理神器:PDFSharp

    前言 PDFSharp是一款开源.NET库,专为处理PDF文档而设计。它以其丰富功能和易用性赢得了广大开发者青睐。无论是创建、编辑、合并、拆分还是转换PDF文件,PDFSharp都能轻松应对。...://www.e-iceblue.cn/Introduce/Spire-Office-NET.html iTextSharp:https://github.com/itext/itextsharp 有一说一都挺好用...尝试使用了下,还不错,该有的都有,简单pdf文件可以直接使用PDFSharp库生成,复杂点则提供了MigraDoc来编辑。 自己小应用都已经上生成环境了,觉得该库是挺ok了。...3、格式化:提供字体选择、颜色设定、布局调整等样式控制功能,帮助您创建高度定制化PDF文档。 4、合并与拆分:能够将多个PDF文档合并成一个,或将一个PDF文档拆分成多个部分。...PDFSharp文档 .NET Framework 文档站点下有很多例子大家可以看看 我使用方式较为粗暴,使用MigraDoc编辑文档表格,再生成PDF文件。

    1.1K10

    .NET Core.NET5.NET6 开源项目汇总1:常用必备组件

    它基于关注分离理念,将数据与表格样式、字体格式分离。 其中模板承载表格样式、字体格式在可视化情况下编辑。开发人员只需要绑定数据与目标标签对应关系。...ExcelReport.Driver.NPOI是使用NPOI对ExcelReport.Driver实现。支持xls、xlsx两种格式Excel文档。...使用 itextsharp.lgplv2.core 把Html转PDF https://www.cnblogs.com/ping9719/p/12759848.html....Net Core 使用 itextsharp.lgplv2.core 生成PDF https://blog.csdn.net/weixin_30737363/article/details/96669770...可以自动更新文档中字段。 在Word文档中插入html/rtf文本(带标记)或html/rtf文档。 克隆列表或表。 添加或修改复选框。 设置图片透明度。 基于引用超链接创建格式超链接

    4.1K10

    文档在线预览实现

    这一微软高级解决方案是使用RMS,能够设置每个用户打开权限,是否打印等,要求必须是域内,而且只管理Office文件权限,对txt,pdf就没办法了。...这就就是百度文库,豆丁之类网站功能。下面来说说怎么实现。 1.文档统一转换为pdf 这里文档我们要看是什么格式,不同格式有不同转换方法。...如果是文本需要转换为PDF,我们可以使用iTextSharp这个组件,对于纯文本,注意是源文件中没有设置字体之类,需要在转换成PDF时指定字体,否则对于中文可能由于没有设置字体而转换不出来。...功能,在转换后,我们可以进一步使用ITextSharppdf进行加工,比较常见添加水印功能。...file=yourpdf.pdf 我们可以进一步修改viewer.html中代码,根据需求去掉下载,打印等按钮,禁止用户下载打印文件。

    3.6K10

    一些好用开源控件

    大家还有什么好用开源控件欢迎补充。 一、CKeditor 富文本编辑器       老版名称为fckeditor,相信大家耳熟能详。能够在页面上像word一样编辑文字效果。...配合Highlighter.Net工具可实现google那样关键字上下文提示,关键字可以高亮显示。也是一个java移植项目,书写格式或者api都与java版相同。.../Files/lts8989/lucene.rar 官网地址:http://lucene.apache.org/ 五、PDFBox读取PDF文件       好多对pdf操作工具都是创建pdf文件,...读取pdf工具有PDFBoxiTextSharp,有网友推荐使用iTextSharp,我在项目中使用是PDFBox,个人感觉这个工具效率很低。...PDFBox是一个将java源码编译成.netdll文件工具(看到此处时候我也感到很神奇)。以下地址不太详细介绍了PDFBoxiTextSharp使用

    1.6K60

    基于iTextSharpPDF文档操作

    最近在DHL物流公司(应该是个大公司)对接,取运单号方式是调用对方提供API,简单说,就是我们传一些发货地址客户信息,要发货物等,对方返回一个运单号物流面单(就是我们淘宝快递上面单)。...,DHL公司将物流面单以pdf文件流形式返回,就是我们可以保存成Pdf文件,这样就容易处理多,我们自己拣货面单,如果也可以保存至Pdf文件,这样就可以将这2个Pdf文件一块打印出来,这算是一个折中解决方案...技术如下     1, 将DataTable导出至Pdf     2, DataTable中包含图片,也要能导出     3, Pdf类库,字体引入(居然需要引用字体绝对路径,想不通)   下面分别讲解...baseFont = iTextSharp.text.pdf.BaseFont.CreateFont(fontPath, iTextSharp.text.pdf.BaseFont.IDENTITY_H...前2联是DHL返回Pdf文件,第3联是我本地生成Pdf文件,合并成一个完整发货面单 ?

    1.7K100

    Markdown语法介绍+Typora简单使用

    代码块 9.LaTeX数学公式 10.快捷键、语法汇总 11. 12.技巧分享 前言 Markdown是一种可以使用普通文本编辑器编写标记语言,通过简单标记语法,它可以使普通文本内容具有一定格式...Typora是一款轻便简洁Markdown编辑器,支持即时渲染技术,这也是与其他Markdown编辑器最显著区别即时渲染使得你写Markdown就想是写Word文档一样流畅自如,不像其他编辑编辑显示栏...,它还可以免费导出成Html、PDF、Word等多种文件 1.标题用法(#号) 效果 实现 一级标题 # 一级标题 二级标题 ## 二级标题 三级标题 ### 三级标题 四级标题 #### 四级标题...利用Ctrl / 快捷键把源码模式打开,然后把#号删除即可 注意 ​ 在没有标题文字中使用Ctrl += 快捷键则是默认H6(六级标题),而Ctrl - 则是没反应 2.文字格式 效果 实现 快捷键...11. 网页中,其实就是页内超链接,也就是链接本文档内部某些元素,实现当前页面中跳转。

    3.4K20

    【Java 进阶篇】HTML链接标签详解

    本篇博客将详细介绍HTML链接标签,包括超链接类型、属性、用法示例代码,旨在帮助基础小白更好地理解使用链接标签。 1.... 标签基本结构 标签是HTML中用来创建超链接标签,其基本结构如下: 链接文本 href 属性:指定链接目标地址,可以是其他网页URL,也可以是同一页面内...(后文会详细介绍)。...例如,链接到同一网站内 About 页面: 关于我们 3.2.2. 在同一页面内创建链接,使用户可以快速跳转到页面内不同位置。... 然后,通过 href 属性指定名称来创建链接: 跳转到第一部分 3.3. 下载链接 下载链接用于提供文件下载,例如PDF、图片、文档等。

    37030

    开源免费且稳定实用.NET PDF打印组件itextSharp(.NET组件介绍之八)

    对于项目开发中使用到打印地方会非常多,在.NET项目中,选择打印方式比较多,例如原始IE网页打印、水晶报表、JS插件实现打印、导出文档打印,以及今天提到使用itextSharp组件实现PDF打印等等...一.itextSharp组件概述:          1.iTextPDF库,它允许你创建,调整,检查维护可移植文档格式文件(PDF):         (1).基于从XML文件或数据库中数据生成文件报告...iText所使用Java,.NET,AndroidGAE开发人员加强与PDF功能应用程序。iTextSharp是.NET端口。    ...以上是对itextSharp组件一些特性简单介绍,如果需要更加深入了解itextSharp组件相关信息,可以细致查看API文档itextSharp产品介绍。...组件介绍之七)    口碑性能都高.NET PDF打印组件itextSharp(.NET组件介绍之八)

    7.5K50

    HTML常用文本标记,超级链接路径描述

    格式化文本,按照编辑器里文本样式、字体大小、字体颜色,直接在网页上显示,示例: ? 运行结果: ?...标记也是删除线,不过里能使用一些属性,例如常用citedatetime,前者用于指定删除原因,后者用于指定删除时间,示例: ? 运行结果: ?...上面所介绍路径描述在超级链接里会应用到,当需要使用超级链接来链接工程下某个html文件时可以使用相对路径绝对路径,但是尽量使用相对路径。...运行结果,当鼠标移动到这个超链接时候就会显示title内容: 文本 ? 是网页制作中超级链接一种,又叫命名记。...同样可以跳转到另一个网页中,示例: ? 运行结果: ? ?

    1.9K20

    使用 iTextSharp VS ComPDFKit 在 C# 中从 PDF 中提取文本

    对于开发人员来说,从 PDF 中提取文本是有效数据提取第一步。你们中一些人可能会担心如何使用 C# 从 PDF 中提取文本。iTextSharp 一直是 PDF 文本提取有效解决方案。...在本指南中,我们将深入研究如何使用 iTextSharp 在 C# 中进行 PDF 文本提取,涵盖从安装项目设置到提供代码示例所有内容。...使用 iTextSharp 进行文本提取步骤与 ComPDFKit 类似。安装 iTextSharp PDF 库并创建项目后。...使用 iTextSharp,开发人员需要编写自定义代码或逻辑来实现所需功能,这需要对库 C# 有深入了解。...因此,在ComPDFKit与iTextSharpPDF文本提取准确率相近前提下,ComPDFKit在性能代码可读性方面更胜一筹。

    8910

    wkhtmltopdf参数详解及精讲使用方法

    这类对象会成为PDF文档中目录。 大纲 “大纲”是指阅读PDF文档时书签导航。 外链 “外链”是指所有在这个页面中且不指向它自身页面中超链接。...内链 “内链”是指在这个页面中且指向目标页面是这个页面本身中一个超链接。 命令格式 wkhtmltopdf [GLOBAL OPTION]... [OBJECT]......默认 --enable-internal-links 参数被打开,所以默认情况是页面中内链是以超链接形式出现PDF文档中,点击在当前PDF中跳转到指定。...生成超链接点击后会跳转到目录大纲中该H标签对应位置。默认情况下 --disable-toc-back-links 参数被打开,不会在PDF文档H标签处生成超链接。... 第级标题在目录中缩进宽度(默认为1em) --disable-toc-links 在目录中不生成指向内容超链接 --toc-text-size-shrink

    89910

    Markdown 语法手册 (完整整理版)

    斜体粗体 2. 分级标题 3. 超链接 3.1. 行内式 3.2. 参考式 3.3. 自动链接 4. 5. 列表 5.1. 无序列表 5.2. 有序列表 5.3....同学们自己在编辑器中观察,很简单,一级标题字号最大,依级递减。 ---- 3. 超链接 Markdown 支持两种形式链接语法: 行内式参考式两种形式,行内式一般使用较多。 3.1.... 网页中,其实就是页内超链接,也就是链接本文档内部某些元素,实现当前页面中跳转。比如我这里写下一个,点击回到目录,就能跳转到目录。 在目录中点击这一节,就能跳过来。还有下一节注脚。...解释写法:紧跟一个缩进(Tab) 代码: Markdown :轻量级文本标记语言,可以转换成html,pdf格式(左侧有一个可见冒号四个不可见空格) 代码块2 :这是代码块定义...(左侧有一个可见冒号四个不可见空格) 代码块(左侧有八个不可见空格) 显示效果: Markdown轻量级文本标记语言,可以转换成html,pdf格式代码块 2 这是代码块定义

    1K11
    领券