pdfCropMargins icon indicating copy to clipboard operation
pdfCropMargins copied to clipboard

How to change the location of /tmp directory

Open sant527 opened this issue 4 years ago • 4 comments

I am trying to crop a pdf file of 4000 pages.

My /tmp directory does not have more than 6GB

So is there any way i can tell the pdf-crop-margins to use a preferred /tmp directory location

I have set

export TMPDIR=/mylocation

but it didnt help

sant527 avatar Jul 28 '20 13:07 sant527

The program currently uses whatever directory the Python function tempfile.mkdtemp returns. That function should respect the setting of the TMPDIR, TEMP, or TMP environment variables, according to the Python docs.

What version of pdfCropMargins are you using? Are you using pdftoppm to do the rendering (the default) or Ghostscript?

abarker avatar Jul 28 '20 20:07 abarker

I tried setting TMPDIR and running with Python 3.6 on Ubuntu, using the current version of pdfCropMargins (0.2.9), and it works for me.

abarker avatar Jul 29 '20 00:07 abarker

For me TMP worked thank you very much for the wonder ful program

sant527 avatar Aug 06 '20 18:08 sant527

FYI, the new version 1.0.0, currently up on PyPI, should be faster and use less disk space when MuPDF cropping is used (now the default if you install with GUI). It does cropping in-memory, one page at a time.

abarker avatar Nov 02 '20 20:11 abarker