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


Groups > gnu.groff.bug > #1825

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

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 2020-04-20 22:34 -0400
Message-ID <mailman.862.1587436449.3066.bug-groff@gnu.org> (permalink)
References (1 earlier) <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>

Show all headers | View raw


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
    <https://savannah.gnu.org/file/trversion.diff?file_id=48890>



    _______________________________________________________

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-20 22:34 -0400

csiph-web