From de150e2cf11babe7c54350e466ae54e582029eb9 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Sun, 2 Dec 2018 10:57:41 +0200 Subject: [PATCH] Update notes for 2018-12-02 --- content/posts/2018-12.md | 14 ++++++++++++++ docs/2018-12/index.html | 20 +++++++++++++++++--- docs/sitemap.xml | 10 +++++----- 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/content/posts/2018-12.md b/content/posts/2018-12.md index 77947ad86..8d0dc9322 100644 --- a/content/posts/2018-12.md +++ b/content/posts/2018-12.md @@ -41,5 +41,19 @@ org.im4java.core.InfoException: org.im4java.core.CommandException: org.im4java.c - A comment on [StackOverflow question](https://stackoverflow.com/questions/53560755/ghostscript-9-26-update-breaks-imagick-readimage-for-multipage-pdf) from yesterday suggests it might be a bug with the `pngalpha` device in Ghostscript and [links to an upstream bug](https://bugs.ghostscript.com/show_bug.cgi?id=699815) - I think we need to wait for a fix from Ubuntu +- For what it's worth, I get the same error on my local Arch Linux environment with Ghostscript 9.26: + +``` +$ gs -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 -sDEVICE=pngalpha -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r72x72 -dFirstPage=1 -dLastPage=1 -sOutputFile=/tmp/out%d -f/home/aorth/Desktop/Food\ safety\ Kenya\ fruits.pdf +DEBUG: FC_WEIGHT didn't match +zsh: segmentation fault (core dumped) gs -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 +``` + +- When I replace the `pngalpha` device with `png16m` as suggested in the StackOverflow comments it works: + +``` +$ gs -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 -sDEVICE=png16m -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r72x72 -dFirstPage=1 -dLastPage=1 -sOutputFile=/tmp/out%d -f/home/aorth/Desktop/Food\ safety\ Kenya\ fruits.pdf +DEBUG: FC_WEIGHT didn't match +``` diff --git a/docs/2018-12/index.html b/docs/2018-12/index.html index b411e430a..0fc1bd8dc 100644 --- a/docs/2018-12/index.html +++ b/docs/2018-12/index.html @@ -21,7 +21,7 @@ I noticed that there is another issue with PDF thumbnails on CGSpace, and I see " /> - + @@ -48,9 +48,9 @@ I noticed that there is another issue with PDF thumbnails on CGSpace, and I see "@type": "BlogPosting", "headline": "December, 2018", "url": "https://alanorth.github.io/cgspace-notes/2018-12/", - "wordCount": "202", + "wordCount": "301", "datePublished": "2018-12-02T02:09:30+02:00", - "dateModified": "2018-12-02T02:09:30+02:00", + "dateModified": "2018-12-02T10:47:41+02:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -156,8 +156,22 @@ org.im4java.core.InfoException: org.im4java.core.CommandException: org.im4java.c +
$ gs -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 -sDEVICE=pngalpha -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r72x72 -dFirstPage=1 -dLastPage=1 -sOutputFile=/tmp/out%d -f/home/aorth/Desktop/Food\ safety\ Kenya\ fruits.pdf
+DEBUG: FC_WEIGHT didn't match
+zsh: segmentation fault (core dumped)  gs -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000
+
+ + + +
$ gs -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 -sDEVICE=png16m -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r72x72 -dFirstPage=1 -dLastPage=1 -sOutputFile=/tmp/out%d -f/home/aorth/Desktop/Food\ safety\ Kenya\ fruits.pdf
+DEBUG: FC_WEIGHT didn't match
+
+ diff --git a/docs/sitemap.xml b/docs/sitemap.xml index a9085d211..41cd0731e 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -4,7 +4,7 @@ https://alanorth.github.io/cgspace-notes/2018-12/ - 2018-12-02T02:09:30+02:00 + 2018-12-02T10:47:41+02:00 @@ -199,7 +199,7 @@ https://alanorth.github.io/cgspace-notes/ - 2018-12-02T02:09:30+02:00 + 2018-12-02T10:47:41+02:00 0 @@ -210,7 +210,7 @@ https://alanorth.github.io/cgspace-notes/tags/notes/ - 2018-12-02T02:09:30+02:00 + 2018-12-02T10:47:41+02:00 0 @@ -222,13 +222,13 @@ https://alanorth.github.io/cgspace-notes/posts/ - 2018-12-02T02:09:30+02:00 + 2018-12-02T10:47:41+02:00 0 https://alanorth.github.io/cgspace-notes/tags/ - 2018-12-02T02:09:30+02:00 + 2018-12-02T10:47:41+02:00 0