Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: anonymous Newsgroups: gnu.groff.bug Subject: [bug #58206] [PATCH] fix PDFPIC issue with determining size of pdfs containing images Date: Mon, 20 Apr 2020 22:34:03 -0400 (EDT) Lines: 44 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> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain;charset=UTF-8 X-Trace: usenet.stanford.edu 1587436449 28488 209.51.188.17 (21 Apr 2020 02:34:09 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) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.14.2 Chrome/77.0.3865.129 Safari/537.36 X-Apparently-From: 68.144.66.214 In-Reply-To: <20200421-020704.sv0.66934@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-023403.sv0.52622@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> Xref: csiph.com gnu.groff.bug:1825 Follow-up Comment #4, bug #58206 (project groff): 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. Here is the diff diff --git a/tmac/pdfpic.tmac b/tmac/pdfpic.tmac index 0400c1cf..3dae30be 100644 --- a/tmac/pdfpic.tmac +++ b/tmac/pdfpic.tmac @@ -84,6 +84,7 @@ .\" get image dimensions . ec @ . sy pdfinfo @$1 | \ +tr -d '\000' | \ grep "Page *size" | \ sed -e 's/Page *size: *\\([[:digit:].]*\\) *x *\\([[:digit:].]*\\).*$/\ .nr pdf-wid (p;\\1)\\n\ (file #48890) _______________________________________________________ Additional Item Attachment: File name: trversion.diff Size:0 KB _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via Savannah https://savannah.gnu.org/