Answer the question
In order to leave comments, you need to log in
How to create a new PDF file and a sheet in it?
You need to create a PDF document and add two images to it.
Using the pdfrw library, I cannot do this, because to create a page, the writer.addpage() method requires the page of an already existing document as an argument.
Here's what he wants to see:
from pdfrw import PdfWriter,PdfReader
def pdf():
writer = PdfWriter()
reader = PdfReader('file.pdf')
writer.addpage(reader.pages[0]) #этот самый метод, создающий страницу в документе pdf
writer.write('file.pdf')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question