Inserting a PDF
-
Hello everyone,
I’m trying to open a pdf to later add some text with Drawbot.
Adding the pdf with image() function I partially achieved the task because I need to iterate over all the pdf pages not only the first. Is posible to this?Thanks in advance!
-
there is
path = "path/to/file.pdf" pageCount = numberOfPages(path) for pageNumber in range(1, pageCount+1): w, h = imageSize(path, pageNumber=pageNumber) newPage(w, h) image(path, (0, 0), pageNumber=pageNumber)
only I see now that
numberOfPages
is not documented...
-
-
Thank you! @frederik
I didn’t know about numberOfPages() very useful!Btw... The forum doesn’t have email notifications when a thread is replied?
-
@guidoferreyra please check your notification settings