推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
bestehen
V2EX  ›  Python

Python 中处理 pdf 问题

  •  
  •   bestehen · Sep 2, 2018 · 2803 views
    This topic created in 2946 days ago, the information mentioned may be changed or developed.

    现在情况是这样,我在处理 pdf 文件的时候遇到了一个水印 对应读取的一个元素是 FormXob.86cdf15f1994e2f2b7032e461

    我现在想办法处理

    把得到的这个元素给排除掉放进新的 pdf 里面 如何解决呢?

    我用的是 Py2PDF

    读取的一页元素如下,里面包含了 Formxob {'/Parent': IndirectObject(1, 0), '/Contents': IndirectObject(22, 0), '/Tabs': '/S', '/Resources': {'/XObject': {'/Image5': IndirectObject(23, 0), '/FormXob.86cdf15f1994e2f2b7032e461afd4234': IndirectObject(25, 0)}, '/ExtGState': {'/Xi0': IndirectObject(26, 0), '/gRLs0': {'/ca': 0.13}}, '/Font': {'/F1renamed': {'/Encoding': '/WinAnsiEncoding', '/Type': '/Font', '/Name': '/F1', '/BaseFont': '/Helvetica', '/Subtype': '/Type1'}, '/F1': IndirectObject(27, 0), '/Xi2': IndirectObject(35, 0), '/Xi1': IndirectObject(38, 0)}, '/ProcSet': ['/Text', '/ImageC', '/ImageB', '/PDF', '/ImageI']}, '/Group': {'/Type': '/Group', '/S': '/Transparency', '/CS': '/DeviceRGB'}, '/MediaBox': [0, 0, 720, 405], '/Type': '/Page', '/StructParents': 0}

    请问现在如何解决呢?

    1 replies  •  2018-09-04 17:52:35 +08:00
    bingoAI
        1
    bingoAI  
       Sep 4, 2018
    getpage 以及 mergePage,水印也是一页叠加的 page,可以看看是否有 deleltepage 的操作。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   950 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 18:45 · PVG 02:45 · LAX 11:45 · JFK 14:45
    ♥ Do have faith in what you're doing.