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/


Reply via email to