vivicai / PDFium-aardio

使用aardio封装的PDFium库

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PDFium-aardio

PDFium是Google著名开源项目Chromium的一部分,这部分代码就是福昕的技术中比较核心的引擎代码,它比较底层和基础,能够支持PDF的阅读、搜索、打印和文档/表单的填写。开发者可以在此基础上开发出比较简单的PDF应用

经过我的实际使用经验来看,PDFium解析PDF的完整度要好于python的著名项目pdfminer ,尤其是解析带签名的合同制式时,pdfminer经常丢失内容.PDFium暂时没发现有此类问题,且对中文支持友好.

dll下载地址:https://github.com/xuncv/PDFium-aardio/releases/download/0.0.1/pdfium.dll

examples:

//载入pdf

reader = fsys.PDFium("test.pdf")

//提取树形目录

var bm = reader.extractBookmarks()

treeData = bm.asTree()

//提取某页文本

reader.pageNum = 8; //设置页码

var text = reader.extractText();`

// 遍历某页文本块,带坐标数据

import console
reader.pageNum = 8; //设置页码
for left,top,right,bottom,text in reader.eachTextRect(){
	console.log(left,top,right,bottom,text)
}

依赖项目:

  1. pdfium - Git at Google (googlesource.com)
  2. bblanchon/pdfium-binaries: 📰 Binary distribution of PDFium (github.com) (pdfium去掉v8核心的预编译动态库)

About

使用aardio封装的PDFium库

License:Apache License 2.0


Languages

Language:C 98.8%Language:C++ 1.2%