yushkevichv/pdf-cad-reader
Composer 安装命令:
composer require yushkevichv/pdf-cad-reader
包简介
Parse PDF CAD files for get index meta info and decoded stream vector data
README 文档
README
It is standalone PHP Library, provide simple API for get common index information about PDF file and get decoded stream vecctor data.
Parser use TCPDF library and common parsing ideas and code from PDF Parser
Install
composer require "yushkevichv/pdf-cad-reader"
Usage
$pdfReader = new PDFCadReader(); $pdfObject = $pdfReader->parseFile($pdfFilePath); // get common information about pdf file and mappers $pdfObject->getIndex(); // get array of decodedd streams $pdfObject->getStreamData(); // decode text from stream $pdfObject->decodeText('F1', '<02450262026b026c0268025c>');
Structure of PDFObject Index
[
'root' ,
'info' => [
'width',
'height',
'rotate'
],
'mappers' => [
'layers' => [
'ocCode' => 'id'
],
'streams' => [
'id'
],
'fonts' => [
'fontCode' => [
'layer',
'fontFamily',
'font' => [
'code',
'name',
'encoding',
'type',
'flags',
'composite',
'subType',
'fontInfo' => [
'fontFamily',
'fontWeight',
'fontBox' => [],
'ascent',
'descent',
'leading',
'capHeight'
],
'glyphIndexArray' => [],
' 'CIDSystemInfo' => [
'Registry',
'Ordering',
'Supplement'
]
]
]
]
],
'layers' => [
'id' => 'name'
]
]
统计信息
- 总下载量: 32
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-09-12