Stirling-PDF icon indicating copy to clipboard operation
Stirling-PDF copied to clipboard

[Bug]: java.io.IOException: Command process failed with exit code 7. Error message: DEBUG ocrmypdf - ocrmypdf 16.1.1

Open Xelaph opened this issue 1 year ago • 4 comments

Installation Method

Docker

The Problem

I'm trying to OCR a Dutch pdf. I've downloaded the Dutch language pack into the linked folder, but I'm getting an error that Ghostscript rasterization failed.

Version of Stirling-PDF

0.30.1

Last Working Version of Stirling-PDF

No response

Page Where the Problem Occurred

No response

Docker Configuration

No response

Relevant Log Output

Stack trace:

java.io.IOException: Command process failed with exit code 7. Error message:   DEBUG ocrmypdf - ocrmypdf 16.1.1
  DEBUG ocrmypdf.subprocess - Running: ['tesseract', '--version']
  DEBUG ocrmypdf.subprocess - Found tesseract 5.3.4
  DEBUG ocrmypdf.subprocess - Running: ['tesseract', '--version']
  DEBUG ocrmypdf.subprocess - Running: ['gs', '--version']
  DEBUG ocrmypdf.subprocess - Found gs 10.4.0
  DEBUG ocrmypdf.subprocess - Running: ['gs', '--version']
  DEBUG ocrmypdf.subprocess - Running: ['tesseract', '--list-langs']
  DEBUG ocrmypdf.subprocess.tesseract - stdout/stderr = [DS] Profile read from file (tesseract_opencl_profile_devices.dat).
[DS] Device[1] 0:(null) score is 0.199492
[DS] Selected Device[1]: "(null)" (Native)
List of available languages in "/usr/share/tessdata/" (2):
eng
nld

  DEBUG ocrmypdf.helpers - pikepdf mmap enabled
  DEBUG ocrmypdf.helpers - os.symlink(/tmp/input_5343014304254140865.pdf, /tmp/ocrmypdf.io.4nez3z4h/origin)
  DEBUG ocrmypdf.helpers - os.symlink(/tmp/ocrmypdf.io.4nez3z4h/origin, /tmp/ocrmypdf.io.4nez3z4h/origin.pdf)
  DEBUG root - Gathering info with 1 thread workers
  DEBUG ocrmypdf.helpers - pikepdf mmap enabled

  DEBUG ocrmypdf.builtin_plugins.tesseract_ocr - Using Tesseract OpenMP thread limit 1
   INFO ocrmypdf._pipelines.ocr - Start processing 16 pages concurrently
  DEBUG ocrmypdf.helpers - pikepdf mmap enabled
  DEBUG ocrmypdf.helpers - pikepdf mmap enabled
  DEBUG ocrmypdf.helpers - pikepdf mmap enabled
  DEBUG ocrmypdf._pipeline -    1  Rasterize with png16m, rotation 0
  DEBUG ocrmypdf.helpers - pikepdf mmap enabled
  DEBUG ocrmypdf._pipeline -    2  Rasterize with png16m, rotation 0
  DEBUG ocrmypdf.helpers - pikepdf mmap enabled
  DEBUG ocrmypdf._pipeline -    3  Rasterize with png16m, rotation 0
  DEBUG ocrmypdf.helpers - pikepdf mmap enabled
  DEBUG ocrmypdf.subprocess -    1  Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=1', '-dLastPage=1', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf']
  DEBUG ocrmypdf.helpers - pikepdf mmap enabled
  DEBUG ocrmypdf._pipeline -    4  Rasterize with png16m, rotation 0
  DEBUG ocrmypdf.helpers - pikepdf mmap enabled
  DEBUG ocrmypdf.subprocess -    2  Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=2', '-dLastPage=2', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf']
  DEBUG ocrmypdf.helpers - pikepdf mmap enabled
  DEBUG ocrmypdf._pipeline -    5  Rasterize with png16m, rotation 0
  DEBUG ocrmypdf.helpers - pikepdf mmap enabled
  DEBUG ocrmypdf.subprocess -    3  Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=3', '-dLastPage=3', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf']
  DEBUG ocrmypdf.helpers - pikepdf mmap enabled
  DEBUG ocrmypdf._pipeline -    6  Rasterize with png16m, rotation 0
  DEBUG ocrmypdf.helpers - pikepdf mmap enabled
  DEBUG ocrmypdf.helpers - pikepdf mmap enabled
  DEBUG ocrmypdf._pipeline -    7  Rasterize with png16m, rotation 0
  DEBUG ocrmypdf.helpers - pikepdf mmap enabled
  DEBUG ocrmypdf.subprocess -    4  Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=4', '-dLastPage=4', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf']
  DEBUG ocrmypdf.helpers - pikepdf mmap enabled
  DEBUG ocrmypdf.helpers - pikepdf mmap enabled
  DEBUG ocrmypdf._pipeline -    8  Rasterize with png16m, rotation 0
  DEBUG ocrmypdf._pipeline -    9  Rasterize with png16m, rotation 0
  DEBUG ocrmypdf.subprocess -    5  Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=5', '-dLastPage=5', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf']
  DEBUG ocrmypdf._pipeline -   10  Rasterize with png16m, rotation 0
  DEBUG ocrmypdf._pipeline -   11  Rasterize with png16m, rotation 0
  DEBUG ocrmypdf.subprocess -    6  Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=6', '-dLastPage=6', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf']
  DEBUG ocrmypdf._pipeline -   12  Rasterize with png16m, rotation 0
  DEBUG ocrmypdf._pipeline -   13  Rasterize with png16m, rotation 0
  DEBUG ocrmypdf.subprocess -    7  Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=7', '-dLastPage=7', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf']
  DEBUG ocrmypdf._pipeline -   14  Rasterize with png16m, rotation 0
  DEBUG ocrmypdf._pipeline -   15  Rasterize with png16m, rotation 0
  DEBUG ocrmypdf._pipeline -   16  Rasterize with png16m, rotation 0
  DEBUG ocrmypdf.subprocess -    8  Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=8', '-dLastPage=8', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf']
  DEBUG ocrmypdf.subprocess -    9  Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=9', '-dLastPage=9', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf']
  DEBUG ocrmypdf.subprocess -   10  Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=10', '-dLastPage=10', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf']
  DEBUG ocrmypdf.subprocess -   11  Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=11', '-dLastPage=11', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf']
  DEBUG ocrmypdf.subprocess -   12  Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=12', '-dLastPage=12', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf']
  DEBUG ocrmypdf.subprocess -   13  Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=13', '-dLastPage=13', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf']
  DEBUG ocrmypdf.subprocess -   14  Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=14', '-dLastPage=14', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf']
  DEBUG ocrmypdf.subprocess -   15  Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=15', '-dLastPage=15', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf']
  DEBUG ocrmypdf.subprocess -   16  Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=16', '-dLastPage=16', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf']
  DEBUG ocrmypdf.subprocess.gs -    9  stderr = Error: /undefined in --runpdf--
Operand stack:
   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   runpdf   --nostringval--   2   %stopped_push   --nostringval--   runpdf   runpdf   false   1   %stopped_push   1933   1   3   %oparray_pop   1932   1   3   %oparray_pop   1917   1   3   %oparray_pop   1918   1   3   %oparray_pop   runpdf   runpdf   runpdf   runpdf
Dictionary stack:
   --dict:750/1123(ro)(G)--   --dict:0/20(G)--   --dict:86/200(L)--   --dict:6/10(L)--
Current allocation mode is local
GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1

  ERROR ocrmypdf._exec.ghostscript -    9  Error: /undefined in --runpdf--
Operand stack:
   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   runpdf   --nostringval--   2   %stopped_push   --nostringval--   runpdf   runpdf   false   1   %stopped_push   1933   1   3   %oparray_pop   1932   1   3   %oparray_pop   1917   1   3   %oparray_pop   1918   1   3   %oparray_pop   runpdf   runpdf   runpdf   runpdf
Dictionary stack:
   --dict:750/1123(ro)(G)--   --dict:0/20(G)--   --dict:86/200(L)--   --dict:6/10(L)--
Current allocation mode is local
GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1

  DEBUG ocrmypdf._pipeline -   17  Rasterize with png16m, rotation 0
  DEBUG ocrmypdf.subprocess -   17  Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=17', '-dLastPage=17', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf']
  DEBUG ocrmypdf.subprocess.gs -    1  stderr = Error: /undefined in --runpdf--
Operand stack:
   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   runpdf   --nostringval--   2   %stopped_push   --nostringval--   runpdf   runpdf   false   1   %stopped_push   1933   1   3   %oparray_pop   1932   1   3   %oparray_pop   1917   1   3   %oparray_pop   1918   1   3   %oparray_pop   runpdf   runpdf   runpdf   runpdf
Dictionary stack:
   --dict:750/1123(ro)(G)--   --dict:0/20(G)--   --dict:86/200(L)--   --dict:6/10(L)--
Current allocation mode is local
GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1

  DEBUG ocrmypdf.subprocess.gs -    3  stderr = Error: /undefined in --runpdf--
Operand stack:
   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   runpdf   --nostringval--   2   %stopped_push   --nostringval--   runpdf   runpdf   false   1   %stopped_push   1933   1   3   %oparray_pop   1932   1   3   %oparray_pop   1917   1   3   %oparray_pop   1918   1   3   %oparray_pop   runpdf   runpdf   runpdf   runpdf
Dictionary stack:
   --dict:750/1123(ro)(G)--   --dict:0/20(G)--   --dict:86/200(L)--   --dict:6/10(L)--
Current allocation mode is local
GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1

  DEBUG ocrmypdf.subprocess.gs -    2  stderr = Error: /undefined in --runpdf--
Operand stack:
   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   runpdf   --nostringval--   2   %stopped_push   --nostringval--   runpdf   runpdf   false   1   %stopped_push   1933   1   3   %oparray_pop   1932   1   3   %oparray_pop   1917   1   3   %oparray_pop   1918   1   3   %oparray_pop   runpdf   runpdf   runpdf   runpdf
Dictionary stack:
   --dict:750/1123(ro)(G)--   --dict:0/20(G)--   --dict:86/200(L)--   --dict:6/10(L)--
Current allocation mode is local
GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1

  DEBUG ocrmypdf.subprocess.gs -    4  stderr = Error: /undefined in --runpdf--
Operand stack:
   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   runpdf   --nostringval--   2   %stopped_push   --nostringval--   runpdf   runpdf   false   1   %stopped_push   1933   1   3   %oparray_pop   1932   1   3   %oparray_pop   1917   1   3   %oparray_pop   1918   1   3   %oparray_pop   runpdf   runpdf   runpdf   runpdf
Dictionary stack:
   --dict:750/1123(ro)(G)--   --dict:0/20(G)--   --dict:86/200(L)--   --dict:6/10(L)--
Current allocation mode is local
GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1

  DEBUG ocrmypdf.subprocess.gs -    6  stderr = Error: /undefined in --runpdf--
Operand stack:
   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   runpdf   --nostringval--   2   %stopped_push   --nostringval--   runpdf   runpdf   false   1   %stopped_push   1933   1   3   %oparray_pop   1932   1   3   %oparray_pop   1917   1   3   %oparray_pop   1918   1   3   %oparray_pop   runpdf   runpdf   runpdf   runpdf
Dictionary stack:
   --dict:750/1123(ro)(G)--   --dict:0/20(G)--   --dict:86/200(L)--   --dict:6/10(L)--
Current allocation mode is local
GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1

  DEBUG ocrmypdf.subprocess.gs -   11  stderr = Error: /undefined in --runpdf--
Operand stack:
   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   runpdf   --nostringval--   2   %stopped_push   --nostringval--   runpdf   runpdf   false   1   %stopped_push   1933   1   3   %oparray_pop   1932   1   3   %oparray_pop   1917   1   3   %oparray_pop   1918   1   3   %oparray_pop   runpdf   runpdf   runpdf   runpdf
Dictionary stack:
   --dict:750/1123(ro)(G)--   --dict:0/20(G)--   --dict:86/200(L)--   --dict:6/10(L)--
Current allocation mode is local
GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1

  DEBUG ocrmypdf.subprocess.gs -    8  stderr = Error: /undefined in --runpdf--
Operand stack:
   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   runpdf   --nostringval--   2   %stopped_push   --nostringval--   runpdf   runpdf   false   1   %stopped_push   1933   1   3   %oparray_pop   1932   1   3   %oparray_pop   1917   1   3   %oparray_pop   1918   1   3   %oparray_pop   runpdf   runpdf   runpdf   runpdf
Dictionary stack:
   --dict:750/1123(ro)(G)--   --dict:0/20(G)--   --dict:86/200(L)--   --dict:6/10(L)--
Current allocation mode is local
GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1

  DEBUG ocrmypdf.subprocess.gs -    7  stderr = Error: /undefined in --runpdf--
Operand stack:
   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   runpdf   --nostringval--   2   %stopped_push   --nostringval--   runpdf   runpdf   false   1   %stopped_push   1933   1   3   %oparray_pop   1932   1   3   %oparray_pop   1917   1   3   %oparray_pop   1918   1   3   %oparray_pop   runpdf   runpdf   runpdf   runpdf
Dictionary stack:
   --dict:750/1123(ro)(G)--   --dict:0/20(G)--   --dict:86/200(L)--   --dict:6/10(L)--
Current allocation mode is local
GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1

  DEBUG ocrmypdf.subprocess.gs -   12  stderr = Error: /undefined in --runpdf--
Operand stack:
   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   runpdf   --nostringval--   2   %stopped_push   --nostringval--   runpdf   runpdf   false   1   %stopped_push   1933   1   3   %oparray_pop   1932   1   3   %oparray_pop   1917   1   3   %oparray_pop   1918   1   3   %oparray_pop   runpdf   runpdf   runpdf   runpdf
Dictionary stack:
   --dict:750/1123(ro)(G)--   --dict:0/20(G)--   --dict:86/200(L)--   --dict:6/10(L)--
Current allocation mode is local
GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1

  DEBUG ocrmypdf.subprocess.gs -   10  stderr = Error: /undefined in --runpdf--
Operand stack:
   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   runpdf   --nostringval--   2   %stopped_push   --nostringval--   runpdf   runpdf   false   1   %stopped_push   1933   1   3   %oparray_pop   1932   1   3   %oparray_pop   1917   1   3   %oparray_pop   1918   1   3   %oparray_pop   runpdf   runpdf   runpdf   runpdf
Dictionary stack:
   --dict:750/1123(ro)(G)--   --dict:0/20(G)--   --dict:86/200(L)--   --dict:6/10(L)--
Current allocation mode is local
GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1

  DEBUG ocrmypdf.subprocess.gs -   16  stderr = Error: /undefined in --runpdf--
Operand stack:
   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   runpdf   --nostringval--   2   %stopped_push   --nostringval--   runpdf   runpdf   false   1   %stopped_push   1933   1   3   %oparray_pop   1932   1   3   %oparray_pop   1917   1   3   %oparray_pop   1918   1   3   %oparray_pop   runpdf   runpdf   runpdf   runpdf
Dictionary stack:
   --dict:750/1123(ro)(G)--   --dict:0/20(G)--   --dict:86/200(L)--   --dict:6/10(L)--
Current allocation mode is local
GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1

  DEBUG ocrmypdf.subprocess.gs -   15  stderr = Error: /undefined in --runpdf--
Operand stack:
   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   runpdf   --nostringval--   2   %stopped_push   --nostringval--   runpdf   runpdf   false   1   %stopped_push   1933   1   3   %oparray_pop   1932   1   3   %oparray_pop   1917   1   3   %oparray_pop   1918   1   3   %oparray_pop   runpdf   runpdf   runpdf   runpdf
Dictionary stack:
   --dict:750/1123(ro)(G)--   --dict:0/20(G)--   --dict:86/200(L)--   --dict:6/10(L)--
Current allocation mode is local
GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1

  DEBUG ocrmypdf.subprocess.gs -   13  stderr = Error: /undefined in --runpdf--
Operand stack:
   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   runpdf   --nostringval--   2   %stopped_push   --nostringval--   runpdf   runpdf   false   1   %stopped_push   1933   1   3   %oparray_pop   1932   1   3   %oparray_pop   1917   1   3   %oparray_pop   1918   1   3   %oparray_pop   runpdf   runpdf   runpdf   runpdf
Dictionary stack:
   --dict:750/1123(ro)(G)--   --dict:0/20(G)--   --dict:86/200(L)--   --dict:6/10(L)--
Current allocation mode is local
GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1

  DEBUG ocrmypdf.subprocess.gs -    5  stderr = Error: /undefined in --runpdf--
Operand stack:
   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   runpdf   --nostringval--   2   %stopped_push   --nostringval--   runpdf   runpdf   false   1   %stopped_push   1933   1   3   %oparray_pop   1932   1   3   %oparray_pop   1917   1   3   %oparray_pop   1918   1   3   %oparray_pop   runpdf   runpdf   runpdf   runpdf
Dictionary stack:
   --dict:750/1123(ro)(G)--   --dict:0/20(G)--   --dict:86/200(L)--   --dict:6/10(L)--
Current allocation mode is local
GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1

  DEBUG ocrmypdf.subprocess.gs -   14  stderr = Error: /undefined in --runpdf--
Operand stack:
   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   runpdf   --nostringval--   2   %stopped_push   --nostringval--   runpdf   runpdf   false   1   %stopped_push   1933   1   3   %oparray_pop   1932   1   3   %oparray_pop   1917   1   3   %oparray_pop   1918   1   3   %oparray_pop   runpdf   runpdf   runpdf   runpdf
Dictionary stack:
   --dict:750/1123(ro)(G)--   --dict:0/20(G)--   --dict:86/200(L)--   --dict:6/10(L)--
Current allocation mode is local
GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1

  DEBUG ocrmypdf.subprocess.gs -   17  stderr = Error: /undefined in --runpdf--
Operand stack:
   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   runpdf   --nostringval--   2   %stopped_push   --nostringval--   runpdf   runpdf   false   1   %stopped_push   1933   1   3   %oparray_pop   1932   1   3   %oparray_pop   1917   1   3   %oparray_pop   1918   1   3   %oparray_pop   runpdf   runpdf   runpdf   runpdf
Dictionary stack:
   --dict:750/1123(ro)(G)--   --dict:0/20(G)--   --dict:86/200(L)--   --dict:6/10(L)--
Current allocation mode is local
GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1


  ERROR ocrmypdf._pipelines._common - ExitCodeException
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/ocrmypdf/_exec/ghostscript.py", line 137, in rasterize_pdf
    p = run(args_gs, stdout=PIPE, stderr=PIPE, check=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ocrmypdf/subprocess/__init__.py", line 62, in run
    proc = subprocess_run(args, env=env, check=check, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=9', '-dLastPage=9', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/ocrmypdf/_pipelines/_common.py", line 249, in cli_exception_handler
    return fn(options, plugin_manager)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ocrmypdf/_pipelines/ocr.py", line 191, in _run_pipeline
    optimize_messages = exec_concurrent(context, executor)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ocrmypdf/_pipelines/ocr.py", line 118, in exec_concurrent
    executor(
  File "/usr/lib/python3.12/site-packages/ocrmypdf/_concurrent.py", line 78, in __call__
    self._execute(
  File "/usr/lib/python3.12/site-packages/ocrmypdf/builtin_plugins/concurrency.py", line 144, in _execute
    result = future.result()
             ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/usr/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ocrmypdf/_pipelines/ocr.py", line 79, in _exec_page_sync
    ocr_image_out, pdf_page_from_image_out, orientation_correction = process_page(
                                                                     ^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ocrmypdf/_pipelines/_common.py", line 391, in process_page
    ocr_image, preprocess_out = make_intermediate_images(
                                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ocrmypdf/_pipelines/_common.py", line 327, in make_intermediate_images
    rasterize_out = rasterize(
                    ^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ocrmypdf/_pipeline.py", line 532, in rasterize
    page_context.plugin_manager.hook.rasterize_pdf_page(
  File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 513, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 139, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 103, in _multicall
    res = hook_impl.function(*args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ocrmypdf/builtin_plugins/ghostscript.py", line 105, in rasterize_pdf_page
    ghostscript.rasterize_pdf(
  File "/usr/lib/python3.12/site-packages/ocrmypdf/_exec/ghostscript.py", line 140, in rasterize_pdf
    raise SubprocessOutputError('Ghostscript rasterizing failed') from e
ocrmypdf.exceptions.SubprocessOutputError: Ghostscript rasterizing failed
	at stirling.software.SPDF.utils.ProcessExecutor.runCommandWithOutputHandling(ProcessExecutor.java:190)
	at stirling.software.SPDF.utils.ProcessExecutor.runCommandWithOutputHandling(ProcessExecutor.java:85)
	at stirling.software.SPDF.controller.api.misc.OCRController.processPdfWithOCR(OCRController.java:157)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:255)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:188)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:926)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:831)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:547)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614)
	at org.eclipse.jetty.ee10.servlet.ServletHolder.handle(ServletHolder.java:736)
	at org.eclipse.jetty.ee10.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1614)
	at org.eclipse.jetty.ee10.websocket.servlet.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:195)
	at org.eclipse.jetty.ee10.servlet.FilterHolder.doFilter(FilterHolder.java:205)
	at org.eclipse.jetty.ee10.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1586)
	at stirling.software.SPDF.config.MetricsFilter.doFilterInternal(MetricsFilter.java:48)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.eclipse.jetty.ee10.servlet.FilterHolder.doFilter(FilterHolder.java:205)
	at org.eclipse.jetty.ee10.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1586)
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.eclipse.jetty.ee10.servlet.FilterHolder.doFilter(FilterHolder.java:205)
	at org.eclipse.jetty.ee10.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1586)
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.eclipse.jetty.ee10.servlet.FilterHolder.doFilter(FilterHolder.java:205)
	at org.eclipse.jetty.ee10.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1586)
	at org.springframework.web.filter.ServerHttpObservationFilter.doFilterInternal(ServerHttpObservationFilter.java:113)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.eclipse.jetty.ee10.servlet.FilterHolder.doFilter(FilterHolder.java:205)
	at org.eclipse.jetty.ee10.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1586)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.eclipse.jetty.ee10.servlet.FilterHolder.doFilter(FilterHolder.java:205)
	at org.eclipse.jetty.ee10.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1586)
	at org.eclipse.jetty.ee10.servlet.ServletHandler$MappedServlet.handle(ServletHandler.java:1547)
	at org.eclipse.jetty.ee10.servlet.ServletChannel.dispatch(ServletChannel.java:824)
	at org.eclipse.jetty.ee10.servlet.ServletChannel.handle(ServletChannel.java:436)
	at org.eclipse.jetty.ee10.servlet.ServletHandler.handle(ServletHandler.java:464)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:575)
	at org.eclipse.jetty.ee10.servlet.SessionHandler.handle(SessionHandler.java:703)
	at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1060)
	at org.eclipse.jetty.server.Server.handle(Server.java:181)
	at org.eclipse.jetty.server.internal.HttpChannelState$HandlerInvoker.run(HttpChannelState.java:661)
	at org.eclipse.jetty.server.internal.HttpConnection.onFillable(HttpConnection.java:406)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:322)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:99)
	at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:478)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:441)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:293)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.produce(AdaptiveExecutionStrategy.java:195)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:979)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1209)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1164)
	at java.base/java.lang.Thread.run(Thread.java:1583)

Full log:

Internal Server Error:java.io.IOException: Command process failed with exit code 7. Error message: DEBUG ocrmypdf - ocrmypdf 16.1.1 DEBUG ocrmypdf.subprocess - Running: ['tesseract', '--version'] DEBUG ocrmypdf.subprocess - Found tesseract 5.3.4 DEBUG ocrmypdf.subprocess - Running: ['tesseract', '--version'] DEBUG ocrmypdf.subprocess - Running: ['gs', '--version'] DEBUG ocrmypdf.subprocess - Found gs 10.4.0 DEBUG ocrmypdf.subprocess - Running: ['gs', '--version'] DEBUG ocrmypdf.subprocess - Running: ['tesseract', '--list-langs'] DEBUG ocrmypdf.subprocess.tesseract - stdout/stderr = [DS] Profile read from file (tesseract_opencl_profile_devices.dat). [DS] Device[1] 0:(null) score is 0.199492 [DS] Selected Device[1]: "(null)" (Native) List of available languages in "/usr/share/tessdata/" (2): eng nld DEBUG ocrmypdf.helpers - pikepdf mmap enabled DEBUG ocrmypdf.helpers - os.symlink(/tmp/input_5343014304254140865.pdf, /tmp/ocrmypdf.io.4nez3z4h/origin) DEBUG ocrmypdf.helpers - os.symlink(/tmp/ocrmypdf.io.4nez3z4h/origin, /tmp/ocrmypdf.io.4nez3z4h/origin.pdf) DEBUG root - Gathering info with 1 thread workers DEBUG ocrmypdf.helpers - pikepdf mmap enabled DEBUG ocrmypdf.builtin_plugins.tesseract_ocr - Using Tesseract OpenMP thread limit 1 INFO ocrmypdf._pipelines.ocr - Start processing 16 pages concurrently DEBUG ocrmypdf.helpers - pikepdf mmap enabled DEBUG ocrmypdf.helpers - pikepdf mmap enabled DEBUG ocrmypdf.helpers - pikepdf mmap enabled DEBUG ocrmypdf._pipeline - 1 Rasterize with png16m, rotation 0 DEBUG ocrmypdf.helpers - pikepdf mmap enabled DEBUG ocrmypdf._pipeline - 2 Rasterize with png16m, rotation 0 DEBUG ocrmypdf.helpers - pikepdf mmap enabled DEBUG ocrmypdf._pipeline - 3 Rasterize with png16m, rotation 0 DEBUG ocrmypdf.helpers - pikepdf mmap enabled DEBUG ocrmypdf.subprocess - 1 Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=1', '-dLastPage=1', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf'] DEBUG ocrmypdf.helpers - pikepdf mmap enabled DEBUG ocrmypdf._pipeline - 4 Rasterize with png16m, rotation 0 DEBUG ocrmypdf.helpers - pikepdf mmap enabled DEBUG ocrmypdf.subprocess - 2 Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=2', '-dLastPage=2', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf'] DEBUG ocrmypdf.helpers - pikepdf mmap enabled DEBUG ocrmypdf._pipeline - 5 Rasterize with png16m, rotation 0 DEBUG ocrmypdf.helpers - pikepdf mmap enabled DEBUG ocrmypdf.subprocess - 3 Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=3', '-dLastPage=3', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf'] DEBUG ocrmypdf.helpers - pikepdf mmap enabled DEBUG ocrmypdf._pipeline - 6 Rasterize with png16m, rotation 0 DEBUG ocrmypdf.helpers - pikepdf mmap enabled DEBUG ocrmypdf.helpers - pikepdf mmap enabled DEBUG ocrmypdf._pipeline - 7 Rasterize with png16m, rotation 0 DEBUG ocrmypdf.helpers - pikepdf mmap enabled DEBUG ocrmypdf.subprocess - 4 Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=4', '-dLastPage=4', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf'] DEBUG ocrmypdf.helpers - pikepdf mmap enabled DEBUG ocrmypdf.helpers - pikepdf mmap enabled DEBUG ocrmypdf._pipeline - 8 Rasterize with png16m, rotation 0 DEBUG ocrmypdf._pipeline - 9 Rasterize with png16m, rotation 0 DEBUG ocrmypdf.subprocess - 5 Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=5', '-dLastPage=5', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf'] DEBUG ocrmypdf._pipeline - 10 Rasterize with png16m, rotation 0 DEBUG ocrmypdf._pipeline - 11 Rasterize with png16m, rotation 0 DEBUG ocrmypdf.subprocess - 6 Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=6', '-dLastPage=6', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf'] DEBUG ocrmypdf._pipeline - 12 Rasterize with png16m, rotation 0 DEBUG ocrmypdf._pipeline - 13 Rasterize with png16m, rotation 0 DEBUG ocrmypdf.subprocess - 7 Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=7', '-dLastPage=7', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf'] DEBUG ocrmypdf._pipeline - 14 Rasterize with png16m, rotation 0 DEBUG ocrmypdf._pipeline - 15 Rasterize with png16m, rotation 0 DEBUG ocrmypdf._pipeline - 16 Rasterize with png16m, rotation 0 DEBUG ocrmypdf.subprocess - 8 Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=8', '-dLastPage=8', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf'] DEBUG ocrmypdf.subprocess - 9 Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=9', '-dLastPage=9', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf'] DEBUG ocrmypdf.subprocess - 10 Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=10', '-dLastPage=10', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf'] DEBUG ocrmypdf.subprocess - 11 Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=11', '-dLastPage=11', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf'] DEBUG ocrmypdf.subprocess - 12 Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=12', '-dLastPage=12', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf'] DEBUG ocrmypdf.subprocess - 13 Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=13', '-dLastPage=13', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf'] DEBUG ocrmypdf.subprocess - 14 Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=14', '-dLastPage=14', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf'] DEBUG ocrmypdf.subprocess - 15 Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=15', '-dLastPage=15', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf'] DEBUG ocrmypdf.subprocess - 16 Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=16', '-dLastPage=16', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf'] DEBUG ocrmypdf.subprocess.gs - 9 stderr = Error: /undefined in --runpdf-- Operand stack: --nostringval-- --nostringval-- --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- runpdf --nostringval-- 2 %stopped_push --nostringval-- runpdf runpdf false 1 %stopped_push 1933 1 3 %oparray_pop 1932 1 3 %oparray_pop 1917 1 3 %oparray_pop 1918 1 3 %oparray_pop runpdf runpdf runpdf runpdf Dictionary stack: --dict:750/1123(ro)(G)-- --dict:0/20(G)-- --dict:86/200(L)-- --dict:6/10(L)-- Current allocation mode is local GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1 ERROR ocrmypdf._exec.ghostscript - 9 Error: /undefined in --runpdf-- Operand stack: --nostringval-- --nostringval-- --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- runpdf --nostringval-- 2 %stopped_push --nostringval-- runpdf runpdf false 1 %stopped_push 1933 1 3 %oparray_pop 1932 1 3 %oparray_pop 1917 1 3 %oparray_pop 1918 1 3 %oparray_pop runpdf runpdf runpdf runpdf Dictionary stack: --dict:750/1123(ro)(G)-- --dict:0/20(G)-- --dict:86/200(L)-- --dict:6/10(L)-- Current allocation mode is local GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1 DEBUG ocrmypdf._pipeline - 17 Rasterize with png16m, rotation 0 DEBUG ocrmypdf.subprocess - 17 Running: ['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=17', '-dLastPage=17', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf'] DEBUG ocrmypdf.subprocess.gs - 1 stderr = Error: /undefined in --runpdf-- Operand stack: --nostringval-- --nostringval-- --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- runpdf --nostringval-- 2 %stopped_push --nostringval-- runpdf runpdf false 1 %stopped_push 1933 1 3 %oparray_pop 1932 1 3 %oparray_pop 1917 1 3 %oparray_pop 1918 1 3 %oparray_pop runpdf runpdf runpdf runpdf Dictionary stack: --dict:750/1123(ro)(G)-- --dict:0/20(G)-- --dict:86/200(L)-- --dict:6/10(L)-- Current allocation mode is local GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1 DEBUG ocrmypdf.subprocess.gs - 3 stderr = Error: /undefined in --runpdf-- Operand stack: --nostringval-- --nostringval-- --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- runpdf --nostringval-- 2 %stopped_push --nostringval-- runpdf runpdf false 1 %stopped_push 1933 1 3 %oparray_pop 1932 1 3 %oparray_pop 1917 1 3 %oparray_pop 1918 1 3 %oparray_pop runpdf runpdf runpdf runpdf Dictionary stack: --dict:750/1123(ro)(G)-- --dict:0/20(G)-- --dict:86/200(L)-- --dict:6/10(L)-- Current allocation mode is local GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1 DEBUG ocrmypdf.subprocess.gs - 2 stderr = Error: /undefined in --runpdf-- Operand stack: --nostringval-- --nostringval-- --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- runpdf --nostringval-- 2 %stopped_push --nostringval-- runpdf runpdf false 1 %stopped_push 1933 1 3 %oparray_pop 1932 1 3 %oparray_pop 1917 1 3 %oparray_pop 1918 1 3 %oparray_pop runpdf runpdf runpdf runpdf Dictionary stack: --dict:750/1123(ro)(G)-- --dict:0/20(G)-- --dict:86/200(L)-- --dict:6/10(L)-- Current allocation mode is local GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1 DEBUG ocrmypdf.subprocess.gs - 4 stderr = Error: /undefined in --runpdf-- Operand stack: --nostringval-- --nostringval-- --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- runpdf --nostringval-- 2 %stopped_push --nostringval-- runpdf runpdf false 1 %stopped_push 1933 1 3 %oparray_pop 1932 1 3 %oparray_pop 1917 1 3 %oparray_pop 1918 1 3 %oparray_pop runpdf runpdf runpdf runpdf Dictionary stack: --dict:750/1123(ro)(G)-- --dict:0/20(G)-- --dict:86/200(L)-- --dict:6/10(L)-- Current allocation mode is local GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1 DEBUG ocrmypdf.subprocess.gs - 6 stderr = Error: /undefined in --runpdf-- Operand stack: --nostringval-- --nostringval-- --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- runpdf --nostringval-- 2 %stopped_push --nostringval-- runpdf runpdf false 1 %stopped_push 1933 1 3 %oparray_pop 1932 1 3 %oparray_pop 1917 1 3 %oparray_pop 1918 1 3 %oparray_pop runpdf runpdf runpdf runpdf Dictionary stack: --dict:750/1123(ro)(G)-- --dict:0/20(G)-- --dict:86/200(L)-- --dict:6/10(L)-- Current allocation mode is local GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1 DEBUG ocrmypdf.subprocess.gs - 11 stderr = Error: /undefined in --runpdf-- Operand stack: --nostringval-- --nostringval-- --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- runpdf --nostringval-- 2 %stopped_push --nostringval-- runpdf runpdf false 1 %stopped_push 1933 1 3 %oparray_pop 1932 1 3 %oparray_pop 1917 1 3 %oparray_pop 1918 1 3 %oparray_pop runpdf runpdf runpdf runpdf Dictionary stack: --dict:750/1123(ro)(G)-- --dict:0/20(G)-- --dict:86/200(L)-- --dict:6/10(L)-- Current allocation mode is local GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1 DEBUG ocrmypdf.subprocess.gs - 8 stderr = Error: /undefined in --runpdf-- Operand stack: --nostringval-- --nostringval-- --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- runpdf --nostringval-- 2 %stopped_push --nostringval-- runpdf runpdf false 1 %stopped_push 1933 1 3 %oparray_pop 1932 1 3 %oparray_pop 1917 1 3 %oparray_pop 1918 1 3 %oparray_pop runpdf runpdf runpdf runpdf Dictionary stack: --dict:750/1123(ro)(G)-- --dict:0/20(G)-- --dict:86/200(L)-- --dict:6/10(L)-- Current allocation mode is local GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1 DEBUG ocrmypdf.subprocess.gs - 7 stderr = Error: /undefined in --runpdf-- Operand stack: --nostringval-- --nostringval-- --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- runpdf --nostringval-- 2 %stopped_push --nostringval-- runpdf runpdf false 1 %stopped_push 1933 1 3 %oparray_pop 1932 1 3 %oparray_pop 1917 1 3 %oparray_pop 1918 1 3 %oparray_pop runpdf runpdf runpdf runpdf Dictionary stack: --dict:750/1123(ro)(G)-- --dict:0/20(G)-- --dict:86/200(L)-- --dict:6/10(L)-- Current allocation mode is local GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1 DEBUG ocrmypdf.subprocess.gs - 12 stderr = Error: /undefined in --runpdf-- Operand stack: --nostringval-- --nostringval-- --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- runpdf --nostringval-- 2 %stopped_push --nostringval-- runpdf runpdf false 1 %stopped_push 1933 1 3 %oparray_pop 1932 1 3 %oparray_pop 1917 1 3 %oparray_pop 1918 1 3 %oparray_pop runpdf runpdf runpdf runpdf Dictionary stack: --dict:750/1123(ro)(G)-- --dict:0/20(G)-- --dict:86/200(L)-- --dict:6/10(L)-- Current allocation mode is local GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1 DEBUG ocrmypdf.subprocess.gs - 10 stderr = Error: /undefined in --runpdf-- Operand stack: --nostringval-- --nostringval-- --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- runpdf --nostringval-- 2 %stopped_push --nostringval-- runpdf runpdf false 1 %stopped_push 1933 1 3 %oparray_pop 1932 1 3 %oparray_pop 1917 1 3 %oparray_pop 1918 1 3 %oparray_pop runpdf runpdf runpdf runpdf Dictionary stack: --dict:750/1123(ro)(G)-- --dict:0/20(G)-- --dict:86/200(L)-- --dict:6/10(L)-- Current allocation mode is local GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1 DEBUG ocrmypdf.subprocess.gs - 16 stderr = Error: /undefined in --runpdf-- Operand stack: --nostringval-- --nostringval-- --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- runpdf --nostringval-- 2 %stopped_push --nostringval-- runpdf runpdf false 1 %stopped_push 1933 1 3 %oparray_pop 1932 1 3 %oparray_pop 1917 1 3 %oparray_pop 1918 1 3 %oparray_pop runpdf runpdf runpdf runpdf Dictionary stack: --dict:750/1123(ro)(G)-- --dict:0/20(G)-- --dict:86/200(L)-- --dict:6/10(L)-- Current allocation mode is local GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1 DEBUG ocrmypdf.subprocess.gs - 15 stderr = Error: /undefined in --runpdf-- Operand stack: --nostringval-- --nostringval-- --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- runpdf --nostringval-- 2 %stopped_push --nostringval-- runpdf runpdf false 1 %stopped_push 1933 1 3 %oparray_pop 1932 1 3 %oparray_pop 1917 1 3 %oparray_pop 1918 1 3 %oparray_pop runpdf runpdf runpdf runpdf Dictionary stack: --dict:750/1123(ro)(G)-- --dict:0/20(G)-- --dict:86/200(L)-- --dict:6/10(L)-- Current allocation mode is local GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1 DEBUG ocrmypdf.subprocess.gs - 13 stderr = Error: /undefined in --runpdf-- Operand stack: --nostringval-- --nostringval-- --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- runpdf --nostringval-- 2 %stopped_push --nostringval-- runpdf runpdf false 1 %stopped_push 1933 1 3 %oparray_pop 1932 1 3 %oparray_pop 1917 1 3 %oparray_pop 1918 1 3 %oparray_pop runpdf runpdf runpdf runpdf Dictionary stack: --dict:750/1123(ro)(G)-- --dict:0/20(G)-- --dict:86/200(L)-- --dict:6/10(L)-- Current allocation mode is local GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1 DEBUG ocrmypdf.subprocess.gs - 5 stderr = Error: /undefined in --runpdf-- Operand stack: --nostringval-- --nostringval-- --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- runpdf --nostringval-- 2 %stopped_push --nostringval-- runpdf runpdf false 1 %stopped_push 1933 1 3 %oparray_pop 1932 1 3 %oparray_pop 1917 1 3 %oparray_pop 1918 1 3 %oparray_pop runpdf runpdf runpdf runpdf Dictionary stack: --dict:750/1123(ro)(G)-- --dict:0/20(G)-- --dict:86/200(L)-- --dict:6/10(L)-- Current allocation mode is local GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1 DEBUG ocrmypdf.subprocess.gs - 14 stderr = Error: /undefined in --runpdf-- Operand stack: --nostringval-- --nostringval-- --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- runpdf --nostringval-- 2 %stopped_push --nostringval-- runpdf runpdf false 1 %stopped_push 1933 1 3 %oparray_pop 1932 1 3 %oparray_pop 1917 1 3 %oparray_pop 1918 1 3 %oparray_pop runpdf runpdf runpdf runpdf Dictionary stack: --dict:750/1123(ro)(G)-- --dict:0/20(G)-- --dict:86/200(L)-- --dict:6/10(L)-- Current allocation mode is local GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1 DEBUG ocrmypdf.subprocess.gs - 17 stderr = Error: /undefined in --runpdf-- Operand stack: --nostringval-- --nostringval-- --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- runpdf --nostringval-- 2 %stopped_push --nostringval-- runpdf runpdf false 1 %stopped_push 1933 1 3 %oparray_pop 1932 1 3 %oparray_pop 1917 1 3 %oparray_pop 1918 1 3 %oparray_pop runpdf runpdf runpdf runpdf Dictionary stack: --dict:750/1123(ro)(G)-- --dict:0/20(G)-- --dict:86/200(L)-- --dict:6/10(L)-- Current allocation mode is local GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1 ERROR ocrmypdf._pipelines._common - ExitCodeException Traceback (most recent call last): File "/usr/lib/python3.12/site-packages/ocrmypdf/_exec/ghostscript.py", line 137, in rasterize_pdf p = run(args_gs, stdout=PIPE, stderr=PIPE, check=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/ocrmypdf/subprocess/__init__.py", line 62, in run proc = subprocess_run(args, env=env, check=check, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=png16m', '-dFirstPage=9', '-dLastPage=9', '-r96.000000x96.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.4nez3z4h/origin.pdf']' returned non-zero exit status 1. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/lib/python3.12/site-packages/ocrmypdf/_pipelines/_common.py", line 249, in cli_exception_handler return fn(options, plugin_manager) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/ocrmypdf/_pipelines/ocr.py", line 191, in _run_pipeline optimize_messages = exec_concurrent(context, executor) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/ocrmypdf/_pipelines/ocr.py", line 118, in exec_concurrent executor( File "/usr/lib/python3.12/site-packages/ocrmypdf/_concurrent.py", line 78, in __call__ self._execute( File "/usr/lib/python3.12/site-packages/ocrmypdf/builtin_plugins/concurrency.py", line 144, in _execute result = future.result() ^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/concurrent/futures/_base.py", line 449, in result return self.__get_result() ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result raise self._exception File "/usr/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/ocrmypdf/_pipelines/ocr.py", line 79, in _exec_page_sync ocr_image_out, pdf_page_from_image_out, orientation_correction = process_page( ^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/ocrmypdf/_pipelines/_common.py", line 391, in process_page ocr_image, preprocess_out = make_intermediate_images( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/ocrmypdf/_pipelines/_common.py", line 327, in make_intermediate_images rasterize_out = rasterize( ^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/ocrmypdf/_pipeline.py", line 532, in rasterize page_context.plugin_manager.hook.rasterize_pdf_page( File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 513, in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 120, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 139, in _multicall raise exception.with_traceback(exception.__traceback__) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 103, in _multicall res = hook_impl.function(*args) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/ocrmypdf/builtin_plugins/ghostscript.py", line 105, in rasterize_pdf_page ghostscript.rasterize_pdf( File "/usr/lib/python3.12/site-packages/ocrmypdf/_exec/ghostscript.py", line 140, in rasterize_pdf raise SubprocessOutputError('Ghostscript rasterizing failed') from e ocrmypdf.exceptions.SubprocessOutputError: Ghostscript rasterizing failed

Additional Information

No response

Browsers Affected

Firefox

No Duplicate of the Issue

  • [X] I have verified that there are no existing issues raised related to my problem.

Xelaph avatar Oct 25 '24 08:10 Xelaph

i have the same issue with ocr on docker frooodle/s-pdf:alpha from 24.10.2024

java.io.IOException: Process timeout exceeded.
	at stirling.software.SPDF.utils.ProcessExecutor.runCommandWithOutputHandling(ProcessExecutor.java:168)
	at stirling.software.SPDF.utils.ProcessExecutor.runCommandWithOutputHandling(ProcessExecutor.java:85)
	at stirling.software.SPDF.controller.api.misc.OCRController.processPdfWithOCR(OCRController.java:157)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:255)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:188)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:926)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:831)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:547)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614)
	at org.eclipse.jetty.ee10.servlet.ServletHolder.handle(ServletHolder.java:736)
	at org.eclipse.jetty.ee10.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1614)
	at org.eclipse.jetty.ee10.websocket.servlet.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:195)
	at org.eclipse.jetty.ee10.servlet.FilterHolder.doFilter(FilterHolder.java:205)
	at org.eclipse.jetty.ee10.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1586)

kuhytitusdlz avatar Oct 25 '24 12:10 kuhytitusdlz

Hey @Xelaph! I'm here to help you with the issue you're facing. I can assist with bugs, questions, and even guide you on becoming a contributor. Let's work on resolving this together!

To resolve the "java.io.IOException: Command process failed with exit code 7" error when trying to OCR a Dutch PDF using Stirling-PDF 0.30.1 with Docker, where Ghostscript rasterization fails, you can try the following steps:

  1. Check Ghostscript Command: Ensure that the Ghostscript command is correctly formed and that the -dFILTERIMAGE option is supported by your Ghostscript version. The command in the code is:

    List<String> gsCommand = Arrays.asList(
        "gs",
        "-sDEVICE=pdfwrite",
        "-dFILTERIMAGE",
        "-o",
        tempPdfWithoutImages.toString(),
        tempOutputFile.toString()
    );
    
  2. Verify Ghostscript Installation: Make sure that Ghostscript is properly installed and accessible within the Docker container. You can test this by running a simple Ghostscript command inside the container to see if it executes without errors.

  3. Check for Additional Error Messages: Look for any additional error messages in the logs that might provide more context about why the Ghostscript command is failing. This can help identify if there are missing dependencies or incorrect command options.

  4. Update Ghostscript: If the issue persists, consider updating Ghostscript to the latest version, as newer versions might have bug fixes or improved support for certain options.

If these steps do not resolve the issue, further investigation into the specific environment and configuration might be necessary [1].

To continue talking to Dosu, mention @dosu.

dosubot[bot] avatar Oct 25 '24 13:10 dosubot[bot]

above is a AI bot test btw

Frooodle avatar Oct 25 '24 13:10 Frooodle

Seems it thinks it's ghostscript not ocrmypdf Please ignore

Frooodle avatar Oct 25 '24 13:10 Frooodle

maybe this solution will solve your problem click

Olowojaye avatar Oct 28 '24 14:10 Olowojaye

ocrmypdf has been removed, closing ticket

Frooodle avatar Jan 30 '25 16:01 Frooodle