Bug 251941 - print/ghostscript9-base reports errors while interpreting PDF, stock GS has no issues.
Summary: print/ghostscript9-base reports errors while interpreting PDF, stock GS has n...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Document Engineering Group (Nobody)
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-12-18 15:12 UTC by bugreport
Modified: 2021-06-07 13:00 UTC (History)
2 users (show)

See Also:
linimon: maintainer-feedback? (doceng)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bugreport 2020-12-18 15:12:34 UTC
FreeBSD verion:

12.2-RELEASE FreeBSD 12.2-RELEASE  amd64

after update GS started having issues while interpreting following pdf file:

https://media.lidl-flyer.com/306a7f70-33ea-11eb-9bd1-005056ae4067/Kaufland-03-12-2020-24-12-2020-01.pdf

---------

$ gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=png16m -dGraphicsAlphaBits=4 \ -sOutputFile=tiger.png ~/gs2/bin/Kaufland-03-12-2020-24-12-2020-01.pdf

GPL Ghostscript 9.52 (2020-03-19)

Copyright (C) 2020 Artifex Software, Inc.  All rights reserved.

This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:

see the file COPYING for details.

Processing pages 1 through 8.

Page 1

   **** Error reading a content stream. The page may be incomplete.

               Output may be incorrect.   **** Error: File has unbalanced q/Q operators (too many Q's)

               Output may be incorrect.

   **** Error: File did not complete the page properly and may be damaged.

               Output may be incorrect.

Page 2

   **** Error reading a content stream. The page may be incomplete.

               Output may be incorrect.

   **** Error: File did not complete the page properly and may be damaged.

               Output may be incorrect.

Page 3

   **** Error reading a content stream. The page may be incomplete.

               Output may be incorrect.

   **** Error: File did not complete the page properly and may be damaged.

               Output may be incorrect.

Page 4

   **** Error reading a content stream. The page may be incomplete.

               Output may be incorrect.

   **** Error: File did not complete the page properly and may be damaged.

               Output may be incorrect.

Page 5

   **** Error reading a content stream. The page may be incomplete.

               Output may be incorrect.

   **** Error: File did not complete the page properly and may be damaged.

               Output may be incorrect.

Page 6

   **** Error reading a content stream. The page may be incomplete.

               Output may be incorrect.

   **** Error: File did not complete the page properly and may be damaged.

               Output may be incorrect.

Page 7

   **** Error reading a content stream. The page may be incomplete.

               Output may be incorrect.

   **** Error: File did not complete the page properly and may be damaged.

               Output may be incorrect.

Page 8

$

---------

When GS compiled from stock source repository is used

---------

 ./gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=png16m -dGraphicsAlphaBits=4 \ -sOutputFile=tiger.png Kaufland-03-12-2020-24-12-2020-01.pdf

GPL Ghostscript 9.52 (2020-03-19)

Copyright (C) 2020 Artifex Software, Inc.  All rights reserved.

This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:

see the file COPYING for details.

Processing pages 1 through 8.

Page 1

Page 2

Page 3

Page 4

Page 5

Page 6

Page 7

Page 8

$

---------

So it seems to work OK
Comment 1 bugreport 2020-12-18 15:13:48 UTC
*After system upgrade from older FreeBSD version.
Comment 2 om 2021-06-07 13:00:33 UTC
Hi bugreport@pokemail.net & everybody, 

I just landed on your ticket as it seems we have the same or a very similar issue using the latest ports gs version (9.52).   The issues is not there on a much older setup (gs 8.70 / freebsd 8.x), under Mac OS (gs 9.54.0) and also under linux. 

I just wanted to ask you if you have been able to solve the issue on your side in the mean time and how ?  I also tried compiling it from stock source (under 12.2, in /usr/local/src), but also here it fails most probably for other reasons. 


(...)
-DHAVE_POPEN_PROTO=1 -DGS_DEVS_SHARED
-DGS_DEVS_SHARED_DIR=\"/usr/local/lib/ghostscript/9.52\"   -I./psi
-I./obj -I./obj -I./base -I./devices  -o ./obj/zpdfops.o -c
./psi/zpdfops.c
./psi/zpdfops.c:34:12: fatal error:
'stringprep.h' file not found
#  include <stringprep.h>
           ^~~~~~~~~~~~~~
1 error generated.
gmake: *** [psi/int.mak:1842: obj/zpdfops.o] Error 1


Ghostscript 9.52 is also quite old now (more than one year, released in March 2020). Is such an (relatively) important port really maintainer-less ? 

Thanks in advance for any update & kind regards, 
Olivier 



original command line with the same error: 
$ /usr/local/bin/gs -dBATCH -dNOPAUSE -sDEVICE=jpeg -r72 -dFirstPage=1 -dLastPage=1 -dJPEGQ=80 -sOutputFile=t4.jpg 1_2021_test.pdf 
GPL Ghostscript 9.52 (2020-03-19)
Copyright (C) 2020 Artifex Software, Inc.  All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
Processing pages 1 through 1.
Page 1
   **** Error reading a content stream. The page may be incomplete.
               Output may be incorrect.

   **** Error: File has unbalanced q/Q operators (too many Q's)
               Output may be incorrect.
   **** Error: File did not complete the page properly and may be damaged.
               Output may be incorrect.
+ ./base/gdevp14.c:2277: pdf14_put_image(): PDF14 device push/pop out of sync
+ ./base/gdevp14.c:2277: pdf14_put_image(): PDF14 device push/pop out of sync
+ ./base/gdevp14.c:2277: pdf14_put_image(): PDF14 device push/pop out of sync
+ ./base/gdevp14.c:2277: pdf14_put_image(): PDF14 device push/pop out of sync