crop_margin.py 531 B

123456789101112131415161718192021222324
  1. from pdfCropMargins import crop
  2. files = [
  3. "intermittent_computing.pdf",
  4. "detailed_execution_model.pdf",
  5. "system.pdf",
  6. ]
  7. need_top_margins = [
  8. # "expr_ckpt_2.pdf",
  9. ]
  10. need_right_margins = [
  11. # "validation_2_3.pdf",
  12. ]
  13. for file in files:
  14. outfile = "cropped/" + file
  15. if file in need_top_margins:
  16. crop(["-o", outfile, "-p4", "0", "0", "0", "50", file])
  17. elif file in need_right_margins:
  18. crop(["-o", outfile, "-p4", "0", "0", "50", "0", file])
  19. else:
  20. crop(["-o", outfile, file])