Is it possible to create a totally uncompressed PDF?
Testing with
doc.save(file.replace(".py", ".pdf"),deflate=False,expand=255, garbage=2, pretty=True)
creates the attached PDF with, what I understand, all objects created with draw_rect, insert_text etc. included as binary streams.
scratch3.pdf