[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] groff_lilypond v0.2
From: |
Deri James |
Subject: |
Re: [Groff] groff_lilypond v0.2 |
Date: |
Mon, 11 Feb 2013 17:30:29 +0000 |
User-agent: |
KMail/4.8.5 (Linux/3.4.24-desktop-3.mga2; KDE/4.8.5; x86_64; ; ) |
On Monday 11 Feb 2013 16:32:46 Werner LEMBERG wrote:
> > Unfortunately the .PSPIC works only in groff pdf and dvi mode, not
> > in ps. Tty, X and html mode have errors and display only a
> > rectangle with the file name.
>
> What's the problem? For me, using .PSPIC directly to embed a lilypond
> EPS file works just fine.
>
>
> Werner
It may be a mis-type (ps <-> pdf). .PSPIC is definitely not supported by
gropdf, but is by grops. The reason is because although eps files can be
embedded in a pdf but they are not displayed by any pdf viewers and are only
used when the pdf is printed. The only image type supported by gropdf is
another pdf file. There are many tools which will convert different formats to
a pdf. I do want to develop a similar .PDFPIC macro but the problem is to
reliably extract the size of the graphic in the pdf to be embedded. Unlike eps
files which have a handy bounding box for the graphic which can be queried
from within a groff file with the .psbb request, the actual size of a pdf
image is harder to ascertain.
It is not even sufficient to rely on ghostscript's bbox device, since this
does not give the media size but rather the size of the stroked image, so does
not include any transparent border around the outside of the stroked image.
The actual size of the pdf image is in fact a product of MediaBox ArtBox
TrimBox BleedBox CropBox settings within the pdf, which happen to be "current"
at the point the image is stroked.
Without knowing the actual size of the image it is not possible to write a
high level equivalent of .PSPIC, and you must use the lower level \X’pdf:
pdfpic file alignment width height line-length’.
Deri