# pyofdpaerser
安装
pip install ofdparser
项目链接: https://github.com/renoyuan/pyofdpaerser
解析ofd 文件
1 输出坐标和文本信息图片解析
文本信息包括字体,字号,颜色
坐标信息包括文本块坐标和其偏移量
2 ofd 转pdf
3 新增对内嵌字体的转换
demo
```
from ofdparser import OfdParser
# 转pdf输出
pdfbytes = OfdParser(ofdb64).ofd2pdf()
# print(data_dict)
# print(pdfbytes)
with open(f"pdfs/{name}.pdf","wb") as f:
f.write(pdfbytes)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/renoyuan/pyofdpaerser",
"name": "ofdparser",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "",
"author": "renoyuan",
"author_email": "renoyuan@foxmail.com",
"download_url": "https://files.pythonhosted.org/packages/0d/be/8b8928b340a6d1e09b0e0557763e65a56b28a09eff15ef09fb9fff345ed5/ofdparser-0.0.8.tar.gz",
"platform": null,
"description": "# pyofdpaerser\n\u5b89\u88c5\npip install ofdparser\n\n\u9879\u76ee\u94fe\u63a5\uff1a https://github.com/renoyuan/pyofdpaerser\n\n\u89e3\u6790ofd \u6587\u4ef6\n\n1 \u8f93\u51fa\u5750\u6807\u548c\u6587\u672c\u4fe1\u606f\u56fe\u7247\u89e3\u6790\n \u6587\u672c\u4fe1\u606f\u5305\u62ec\u5b57\u4f53\uff0c\u5b57\u53f7\uff0c\u989c\u8272\n \u5750\u6807\u4fe1\u606f\u5305\u62ec\u6587\u672c\u5757\u5750\u6807\u548c\u5176\u504f\u79fb\u91cf\n \n2 ofd \u8f6cpdf\n\n3 \u65b0\u589e\u5bf9\u5185\u5d4c\u5b57\u4f53\u7684\u8f6c\u6362 \n\ndemo\n```\nfrom ofdparser import OfdParser\n# \u8f6cpdf\u8f93\u51fa\npdfbytes = OfdParser(ofdb64).ofd2pdf()\n\n# print(data_dict)\n# print(pdfbytes)\nwith open(f\"pdfs/{name}.pdf\",\"wb\") as f:\n f.write(pdfbytes)\n```\n\n\n\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "ofdparser",
"version": "0.0.8",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6fa7afb8d91d214e1e9e6d103850a7c298175804982eedfa1b56300792d98feb",
"md5": "ff4bc4fb797f2e8f1d58eaa3b0353333",
"sha256": "c6c80c16752447f7b21016e5c026396fa5bef9340ef3e0f341321d613e59fae3"
},
"downloads": -1,
"filename": "ofdparser-0.0.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ff4bc4fb797f2e8f1d58eaa3b0353333",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 15464,
"upload_time": "2023-04-11T10:00:09",
"upload_time_iso_8601": "2023-04-11T10:00:09.899664Z",
"url": "https://files.pythonhosted.org/packages/6f/a7/afb8d91d214e1e9e6d103850a7c298175804982eedfa1b56300792d98feb/ofdparser-0.0.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0dbe8b8928b340a6d1e09b0e0557763e65a56b28a09eff15ef09fb9fff345ed5",
"md5": "3db60c70cbe93006faa2c7cf4270048c",
"sha256": "1bad0418620e55c7f13846892bc011dbd72368dbe5668b9d9d4c1e8243db10b3"
},
"downloads": -1,
"filename": "ofdparser-0.0.8.tar.gz",
"has_sig": false,
"md5_digest": "3db60c70cbe93006faa2c7cf4270048c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 15227,
"upload_time": "2023-04-11T10:00:11",
"upload_time_iso_8601": "2023-04-11T10:00:11.502777Z",
"url": "https://files.pythonhosted.org/packages/0d/be/8b8928b340a6d1e09b0e0557763e65a56b28a09eff15ef09fb9fff345ed5/ofdparser-0.0.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-11 10:00:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "renoyuan",
"github_project": "pyofdpaerser",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "ofdparser"
}