Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.groff.bug > #1820

[bug #58206] [PATCH] fix PDFPIC issue with determining size of pdfs containing images

Path csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From anonymous <INVALID.NOREPLY@gnu.org>
Newsgroups gnu.groff.bug
Subject [bug #58206] [PATCH] fix PDFPIC issue with determining size of pdfs containing images
Date Sun, 19 Apr 2020 14:53:52 -0400 (EDT)
Lines 76
Approved bug-groff@gnu.org
Message-ID <mailman.706.1587322434.3066.bug-groff@gnu.org> (permalink)
References <20200419-185350.sv0.83464@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 1587322435 24954 209.51.188.17 (19 Apr 2020 18:53:55 GMT)
X-Complaints-To action@cs.stanford.edu
To 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
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" <bug-groff.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-groff>, <mailto:bug-groff-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-groff>
List-Post <mailto:bug-groff@gnu.org>
List-Help <mailto:bug-groff-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-groff>, <mailto:bug-groff-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <20200419-185350.sv0.83464@savannah.gnu.org>
Xref csiph.com gnu.groff.bug:1820

Show key headers only | View raw


URL:
  <https://savannah.gnu.org/bugs/?58206>

                 Summary: [PATCH] fix PDFPIC issue with determining size of
pdfs containing images
                 Project: GNU troff
            Submitted by: None
            Submitted on: Sun 19 Apr 2020 06:53:50 PM UTC
                Category: Device gropdf
                Severity: 3 - Normal
              Item Group: Incorrect behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

When .PDFPIC is used it calls to pdfinfo piped to grep to determine the
dimensions of the pdf. However when the pdf contains an image grep fails to
parse the date giving the following error.


Binary file (standard input) matches


Allowing grep to process Binary files seems to fix the issue. Below is the
patch.


diff --git a/tmac/pdfpic.tmac b/tmac/pdfpic.tmac
index 0400c1cf..4bc6f03b 100644
--- a/tmac/pdfpic.tmac
+++ b/tmac/pdfpic.tmac
@@ -84,7 +84,7 @@
 .\" get image dimensions
 .  ec @
 .  sy pdfinfo @$1 | \
-grep "Page *size" | \
+grep -a "Page *size" | \
 sed -e 's/Page *size: *\\([[:digit:].]*\\) *x *\\([[:digit:].]*\\).*$/\
 .nr pdf-wid (p;\\1)\\n\
 .nr pdf-ht  (p;\\2)/' \


Should be a relatively easy fix.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sun 19 Apr 2020 06:53:50 PM UTC  Name: pdfpic.diff  Size: 375B   By:
None

<http://savannah.gnu.org/bugs/download.php?file_id=48873>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58206>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/

Back to gnu.groff.bug | Previous | Next | Find similar


Thread

[bug #58206] [PATCH] fix PDFPIC issue with determining size of pdfs containing images anonymous <INVALID.NOREPLY@gnu.org> - 2020-04-19 14:53 -0400

csiph-web