from pdfCropMargins import crop

files = [
    "intermittent_computing.pdf",
    "detailed_execution_model.pdf",
    "system.pdf",
]

need_top_margins = [
    # "expr_ckpt_2.pdf",
]

need_right_margins = [
    # "validation_2_3.pdf",
]

for file in files:
    outfile = "cropped/" + file
    if file in need_top_margins:
        crop(["-o", outfile, "-p4", "0", "0", "0", "50", file])
    elif file in need_right_margins:
        crop(["-o", outfile, "-p4", "0", "0", "50", "0", file])
    else:
        crop(["-o", outfile, file])