Ghostscript 9.50 and SAFER mode

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, helmut, xnview

Posts: 1
Joined: Mon Feb 24, 2020 3:42 pm

Ghostscript 9.50 and SAFER mode

Post by fredrikhultin »

I try to get info about a pdf containing vector graphics using the -info and -fullinfo commands but gets stopped by GhostScript:

Code: Select all

 % nconvert -info -v 0B9B69567B7311E8BBEC47C09B5CFF74.pdf
** NCONVERT v7.25 (c) 1991-2019 Pierre-E Gougelet (Jan 16 2019/13:44:54) **
        Version for MacOS X  (All rights reserved)
** This is freeware software (for non-commercial use)

2020-02-24 21:22:38.386 nconvert[1062:42604] Template: /var/folders/x1/1v_6x94j0cv7r_vrrpnzt6vh0000gn/T/20CD3D60-D64F-4ABD-B1A5-D8C5BFECF24E
2020-02-24 21:22:38.386 nconvert[1062:42604] FS Template: /var/folders/x1/1v_6x94j0cv7r_vrrpnzt6vh0000gn/T/20CD3D60-D64F-4ABD-B1A5-D8C5BFECF24E
Error: /invalidfileaccess in --file--
Operand stack:
   PDFfile   (0B9B69567B7311E8BBEC47C09B5CFF74.pdf)   (r)
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1974   1   3   %oparray_pop   1973   1   3   %oparray_pop   1961   1   3   %oparray_pop   1817   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:726/1123(ro)(G)--   --dict:0/20(G)--   --dict:75/200(L)--
Current allocation mode is local
Last OS error: Permission denied
Current file position is 1814
GPL Ghostscript 9.50: Unrecoverable error, exit code 1
my_error_exit...<Not a JPEG file: starts with 0x25 0x50>

0B9B69567B7311E8BBEC47C09B5CFF74.pdf : Failed
  Error: Don't know how to read this picture (0B9B69567B7311E8BBEC47C09B5CFF74.pdf)

##########################Files opened: 0
Files written: 0
As far as I can understand this has to do with GhostScript 9.50 since they now defaults to the SAFER mode.
Is there any way I can send parameters through to GhostScript or could you add some way to disable the SAFER mode in GhostScript?

User avatar
Author of XnView
Posts: 43613
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Ghostscript 9.50 and SAFER mode

Post by xnview »

NConvert needs to be updated