# CHAPTER 12. File Attachments def attachFile(filename, pdf): """attachFile(filename, pdf) attaches a file to the pdf. It is attached at document level.""" def attachFileToPage(filename, pdf, pagenumber): """attachFileToPage(filename, pdf, pagenumber) attaches a file, given its file name, pdf, and the page number to which it should be attached.""" def attachFileFromMemory(data, filename, pdf): """attachFileFromMemory(memory, length, filename, pdf) attaches from memory, just like attachFile.""" def attachFileToPageFromMemory(data, filename, pdf, pagenumber): """attachFileToPageFromMemory(memory, length, filename, pdf, pagenumber) attaches from memory, just like attachFileToPage.""" def removeAttachedFiles(pdf): """Remove all page- and document-level attachments from a document""" def getAttachments(pdf): """List information about attachements. Returns a list of tuples (name, page number, byte array of data)"""