From 09899209e82e46ac87029b8859735bc54d9b81d6 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Thu, 27 Aug 2026 20:33:21 +0200 Subject: [PATCH] deps: the page that came out black, and the one that came out blank render v0.11.0 and reader v0.6.0 between them fix two things a person using this application would have seen, and one they would not have known to look for. the black page a four-component JPEG written by an Adobe tool stores its ink inverted, and Go's image/jpeg does not turn it back, so the page came out almost solid black. 35 of 8 300 corpus files carry one. Turning it over alone breaks eleven DVLA forms, which carry /Decode [1 0 1 0 1 0 1 0] and were drawn correctly only because that was ignored too; both halves are fixed together. the blank page reader v0.6.0 stopped a damaged stream coming back with a nil error, which made a strict decode return nothing where it used to return the fragment. render v0.11.0 reads every stream through the salvaging API, so plots/P12positive01.pdf goes 188 770 inked pixels -> 0 -> 188 770 across the three states. the noise 273 image masks in the real forms carry an encoded filter, and their compressed bytes were being painted as a stencil. 236 are faxes, now decoded; the 9 that remain are JBIG2 and are not drawn rather than drawn wrong. Against poppler, page by page and with both given the same box, this application's renderer now agrees on 1 633 of 1 633 real forms and 2 223 of 2 223 arXiv files, with a median of 0.19% and 0.08% of pixels differing. Co-Authored-By: Claude Opus 5 --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 549cbd0..d66dfb5 100644 --- a/go.mod +++ b/go.mod @@ -6,8 +6,8 @@ require ( github.com/go-gfx/gfx v0.10.0 github.com/go-pdfkit/forms v0.2.1 github.com/go-pdfkit/ops v0.7.0 - github.com/go-pdfkit/reader v0.5.0 - github.com/go-pdfkit/render v0.10.0 + github.com/go-pdfkit/reader v0.6.0 + github.com/go-pdfkit/render v0.11.0 github.com/go-widgets/painter v0.11.0 github.com/go-widgets/toolkit v0.250.0 github.com/go-widgets/webcanvas v0.1.0 diff --git a/go.sum b/go.sum index 7b0affe..ec01068 100644 --- a/go.sum +++ b/go.sum @@ -30,10 +30,10 @@ github.com/go-pdfkit/ops v0.7.0 h1:W8sK//0nfs/OACvjzvw/GK5ywtd90eDoYcdv74GxW8M= github.com/go-pdfkit/ops v0.7.0/go.mod h1:Is3FBR2NcCUEzNt4eowdsVa+P0SBtGtcxK8lDlOeyrk= github.com/go-pdfkit/pdffont v0.3.0 h1:G5DKcAmsZJ0e17QhSrcUaL7PKEXKjUx4P/iGMl7bAbI= github.com/go-pdfkit/pdffont v0.3.0/go.mod h1:bfmNLna1l1CljNX/Utg55YzFylovfmI7sJnvgA3bzKI= -github.com/go-pdfkit/reader v0.5.0 h1:DaJ5C6eKXPRG9Cdu+olA/0KLmsQgyHEC1coteQQuBxU= -github.com/go-pdfkit/reader v0.5.0/go.mod h1:fQFOVfCMUui1AdvD4qhimdyvvNr9KvvJ1S7IuKZjyV8= -github.com/go-pdfkit/render v0.10.0 h1:2NXlxhb7bDWFfgWpMe1bfZXbefhEkLSeH99xWI8B1uk= -github.com/go-pdfkit/render v0.10.0/go.mod h1:ZNuGzwPk1m3kmJIg9X0bepSGrAmmCb5nTMbDEbHuFFA= +github.com/go-pdfkit/reader v0.6.0 h1:KAabNOYUcTlZlNBTbG9bEhWP1NiZhjuhzUdavdTdfes= +github.com/go-pdfkit/reader v0.6.0/go.mod h1:fQFOVfCMUui1AdvD4qhimdyvvNr9KvvJ1S7IuKZjyV8= +github.com/go-pdfkit/render v0.11.0 h1:z05asCKb8Bn/1JMU0r5KwqP5DiFkk0jJR3bVKGH4qj8= +github.com/go-pdfkit/render v0.11.0/go.mod h1:9b1LBmvHdZJ8+ACXA8XNUXWSOtNM+lkiOAFSiWRADpQ= github.com/go-richdoc/richdoc v0.2.0 h1:z9cLox9MoInZL6fIlweMzgDT/VqgnB2ZucSIEaRFglY= github.com/go-richdoc/richdoc v0.2.0/go.mod h1:aCX8ulqg5CoKqSWgWeEWul1Oj0d2VxQeaQNI0+jsm7c= github.com/go-typeset/bidi v0.3.0 h1:4fjGjejvjE2LzLNzY4si8PkVO321NcsKIiANhWT3jF4=