Skip to main content

ofdparser

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ofdparser-0.0.8.tar.gz (15.2 kB view hashes)

Uploaded Source

Built Distribution

ofdparser-0.0.8-py3-none-any.whl (15.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page