Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: "G. Branden Robinson" Newsgroups: gnu.groff.bug Subject: [bug #58206] [PATCH] fix PDFPIC issue with determining size of pdfs containing images Date: Tue, 21 Apr 2020 09:01:34 -0400 (EDT) Lines: 54 Approved: bug-groff@gnu.org Message-ID: References: <20200419-185350.sv0.83464@savannah.gnu.org> <20200419-225125.sv108747.81050@savannah.gnu.org> <20200420-031854.sv97361.49164@savannah.gnu.org> <20200421-020320.sv0.49728@savannah.gnu.org> <20200421-020704.sv0.66934@savannah.gnu.org> <20200421-023403.sv0.52622@savannah.gnu.org> <20200421-130133.sv108747.33242@savannah.gnu.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain;charset=UTF-8 X-Trace: usenet.stanford.edu 1587474100 18812 209.51.188.17 (21 Apr 2020 13:01:40 GMT) X-Complaints-To: action@cs.stanford.edu To: "G. Branden Robinson" , Ingo Schwarze , bug-groff@gnu.org Envelope-to: bug-groff@gnu.org X-PHP-Originating-Script: 1001:sendmail.php X-Savane-Server: savannah.gnu.org:443 [209.51.188.72] X-Savane-Project: groff X-Savane-Tracker: bugs X-Savane-Item-ID: 58206 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 X-Apparently-From: 1.129.109.34 (Savane authenticated user gbranden) In-Reply-To: <20200421-023403.sv0.52622@savannah.gnu.org> X-Received-From: 209.51.188.72 X-BeenThere: bug-groff@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Bug reports for the GNU version of nroff, troff et al" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <20200421-130133.sv108747.33242@savannah.gnu.org> X-Mailman-Original-References: <20200419-185350.sv0.83464@savannah.gnu.org> <20200419-225125.sv108747.81050@savannah.gnu.org> <20200420-031854.sv97361.49164@savannah.gnu.org> <20200421-020320.sv0.49728@savannah.gnu.org> <20200421-020704.sv0.66934@savannah.gnu.org> <20200421-023403.sv0.52622@savannah.gnu.org> Xref: csiph.com gnu.groff.bug:1826 Update of bug #58206 (project groff): Status: Need Info => In Progress Assigned to: None => gbranden _______________________________________________________ Follow-up Comment #5: [comment #4 comment #4:] > Ok so a work around I used was to use tr's -d flag to remove the NULL sections from the output from pdfinfo. As far as I know this should be available to all systems. Another option is to use cat -v but I don't think that is POSIX complaint. Indeed it is not. POSIX cat admits only -u, and even that is too much for some old-timers. tr -d does indeed seem fine. Would someone like to report a bug to poppler upstream? In my opinion is not Unixy for a "document information extractor" to spew a binary stream to standard output unless this is explicitly requested. Note that the poppler-utils package in Debian stable is 0.71, and the latest upstream release is 0.87 (made at the end of March), so it might be polite to trawl the bug tracker to see if the issue has already been resolved. https://gitlab.freedesktop.org/poppler/poppler/issues I share Ingo's discomfort at all this `.sy`ing, but at least someone has to turn the safety off of the gun with -U first before the macro will work. I'm inclined to apply the patch (and add a comment justifying the perhaps-surprising use of tr -d '\000', while the provenance and continued value of .PDFPIC can be determined. Our contributor Deri James knows vastly more about PDF integration than I do. I'll put the bug state into "In Progress". I need to reproduce it--with luck this is easy with in-groff-source-tree materials, and that will tell me how it easy it is to write a regression test for it. _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via Savannah https://savannah.gnu.org/