Ghostscript errors

I have a scanner (ADS-1500W) which produces pdf which are readable in Linux but fail in FreeBSD.

Under linux,

Code:
# gs Report_002768.pdf
GPL Ghostscript 9.21 (2017-03-16)
Copyright (C) 2017 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 2.
Page 1
>>showpage, press <return> to continue<<


# identify Report_002768.pdf 
Report_002768.pdf[0] PDF 599x791 599x791+0+0 16-bit sRGB 182715B 0.000u 0:00.000
Report_002768.pdf[1] PDF 599x791 599x791+0+0 16-bit sRGB 182715B 0.000u 0:00.000

However, FreeBSD gives

Code:
gs /tmp/Report_002768.pdf 
GPL Ghostscript 9.16 (2015-03-30)
Copyright (C) 2015 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 2.
Page 1
   **** Error reading a content stream. The page may be incomplete.
   **** File did not complete the page properly and may be damaged.
%%BoundingBox: 0 0 0 0
%%HiResBoundingBox: 0.000000 0.000000 0.000000 0.000000
>>showpage, press <return> to continue<<

# identify  /tmp/Report_002768.pdf
   **** Error reading a content stream. The page may be incomplete.
   **** File did not complete the page properly and may be damaged.
   **** Error reading a content stream. The page may be incomplete.
   **** File did not complete the page properly and may be damaged.

   **** This file had errors that were repaired or ignored.
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

/tmp/Report_002768.pdf[0] PDF 599x791 599x791+0+0 16-bit sRGB 3726B 0.000u 0:00.000
/tmp/Report_002768.pdf[1] PDF 599x791 599x791+0+0 16-bit sRGB 3726B 0.000u 0:00.000


Linux has app-text/ghostscript-gpl-9.21 whereas FreeBSD has ghostscript9-agpl-base-9.16_5 installed.

Anybody knows what could be the issue?
 
I tried the same document with print/ghostscript9-base and print/ghostscript7-x11 in FreeBSD and 'gs' was able to process the document properly. Something is odd with the agpl version of ghostscript in ports tree.

In addition to print/ghostscript9-base i also need Imagemagick. All the Imagemagick packages depend on the 'agpl' version of ghostscript rather than the standard versions.

With print/ghostscript9-base, it works
Code:
$ gs -sDEVICE=pdfwrite -sOutputFile=x13.pdf 20180318161400-report_002764.pdf
GPL Ghostscript 9.06 (2012-08-08)
Copyright (C) 2012 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 2.
Page 1
>>showpage, press <return> to continue<<

Page 2

>>showpage, press <return> to continue<<
GS>

With print/ghostscript9-agpl-base, it bombs
Code:
$ gs -sDEVICE=pdfwrite -sOutputFile=x13.pdf 20180318161400-report_002764.pdf
GPL Ghostscript 9.16 (2015-03-30)
Copyright (C) 2015 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 2.
Page 1
   **** Error reading a content stream. The page may be incomplete.
   **** File did not complete the page properly and may be damaged.
>>showpage, press <return> to continue<<

Page 2
   **** Error reading a content stream. The page may be incomplete.
   **** File did not complete the page properly and may be damaged.
>>showpage, press <return> to continue<<


   **** This file had errors that were repaired or ignored.
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

GS>

It is a scanned document with no embedded fonts,
Code:
$ pdffonts 20180318161400-report_002764.pdf
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------


$ pdfinfo 20180318161400-report_002764.pdf
Tagged:         no
UserProperties: no
Suspects:       no
Form:           none
JavaScript:     no
Pages:          2
Encrypted:      no
Page size:      599.4 x 790.56 pts
Page rot:       0
File size:      479947 bytes
Optimized:      no
PDF version:    1.3

Is it possible to build graphics/ImageMagick7-nox11 with print/ghostscript9-base rather than print/ghostscript9-agpl-base?
 
Back
Top