groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use of sed in PDFPIC macro with OpenBSD


From: Ralph Corderoy
Subject: Re: Use of sed in PDFPIC macro with OpenBSD
Date: Tue, 07 Dec 2021 11:53:33 +0000

Hi Hans,

> I've noticed a suggestion in the "Problems with .PDFPIC caused by
> pdfinfo" thread to use awk instead of sed.

The original also uses grep(1) and sed(1) when sed could do the
grepping.

This shows how it can be done with awk(1).

    $ pdfinfo foo.pdf |
    > awk '/^Page size:/ {print ".nr pdf-wid (p;"$3")"; print ".nr pdf-ht  
(p;"$5")"}'
    .nr pdf-wid (p;595)
    .nr pdf-ht  (p;842)
    $

Hope that's some help.

-- 
Cheers, Ralph.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]