python pdf_usps_label_only.py

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python pdf_usps_label_only.py相关的知识,希望对你有一定的参考价值。

#!/usr/bin/env python
#
# Take a USPS click-n-ship label and cut off half the page (instructions).
# This is useful to not waste 2x1 labels.
#
import copy, sys
from pyPdf import PdfFileWriter, PdfFileReader
input = PdfFileReader(sys.stdin)
output = PdfFileWriter()
for p in [input.getPage(i) for i in range(0,input.getNumPages())]:
    (w, h) = p.mediaBox.upperRight
    p.mediaBox.lowerRight = (w, h/2)
    output.addPage(p)
output.write(sys.stdout)

以上是关于python pdf_usps_label_only.py的主要内容,如果未能解决你的问题,请参考以下文章

Python代写,Python作业代写,代写Python,代做Python

Python开发

Python,python,python

Python 介绍

Python学习之认识python

python初识