반응형
특정 좌표 위치에서 기존 PDF 파일 위에 이미지를 배치하려면 어떻게해야합니까? pdf는 한 페이지가있는 도면 시트를 나타냅니다. 이미지 크기가 조정됩니다. ReportLab을 확인하고 있지만 답을 찾을 수 없습니다. 감사.
해결 방법
from pyPdf import PdfFileWriter, PdfFileReader
output = PdfFileWriter()
input1 = PdfFileReader(file("document1.pdf", "rb"))
watermark = PdfFileReader(file("watermark.pdf", "rb"))
input1.mergePage(watermark.getPage(0))
# finally, write "output" to document-output.pdf
outputStream = file("document-output.pdf", "wb")
output.write(input1)
outputStream.close()
워터 마크
같다고 생각합니다. 더 나은 아이디어는 매뉴얼을 참조하세요.
참조 페이지 https://stackoverflow.com/questions/2925484
반응형
'파이썬' 카테고리의 다른 글
파이썬 How to delete the current row in pandas dataframe during df.iterrows() (0) | 2020.11.28 |
---|---|
파이썬 'module' has no attribute 'urlencode' (0) | 2020.11.28 |
파이썬 PyQt5는 'QApplication'이름을 가져올 수 없습니다. (0) | 2020.11.28 |
파이썬 사전을 표로 인쇄 (0) | 2020.11.28 |
파이썬에서 % timeit은 무엇입니까? (0) | 2020.11.28 |
댓글