How can I change metadata fields, CreationDate and ModificationDate, when I create a pdf with Reportlab?
Take a look at where modification and creation dates are set:
D['ModDate'] = D["CreationDate"] = \
Date(ts=document._timeStamp,dateFormatter=self._dateFormatter)
# ...
return PDFDictionary(D).format(document)
Basically, metadata is a dictionary saved at the end of binary string, start of string is file contents (document).
Inside Reportlab the workflow you ask about can be:
document from canvas PDFDictionary with artificial mod and create datesPDFDictionaryChange metadata of pdf file with pypdf also attempts similar goal.