[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] PDFPIC macro
From: |
Deri James |
Subject: |
Re: [Groff] PDFPIC macro |
Date: |
Sun, 21 Sep 2014 11:52:38 +0100 |
User-agent: |
KMail/4.11.4 (Linux/3.12.25-desktop-3.mga4; KDE/4.11.4; x86_64; ; ) |
On Sun 21 Sep 2014 06:38:42 Werner LEMBERG wrote:
> >> A good starting point may be to implement a C/C++ library function,
> >> to extract the MediaBox properties; that would open the gate to a
> >> possible pdfbb request, which gtroff.exe could process internally.
> >
> >
> > Alternatively, we could modify the existing implementation of .psbb,
> > such that it will discriminate on `%!PS-Adobe-´ or `%PDF-´ as
> > initial file content, then DTRT wrt parsing a `%%BoundingBox:´ or
> > `/MediaBox´ record accordingly.
>
>
> Good idea!
>
>
> Werner
Yes, it is. Someone on the list has contacted me, with a view to writing the
code, and I have provided the perl version.
It is a bit more complex than psbb, which is essentially a grep for
%BoundingBox in the first part of the postscript file. This is because
MediaBox can appear in multiple object types in a hierarchical fashion. Unlike
postscript, each page in a pdf document can be a different size. So to be sure
of the correct MediaBox to use it is necessary to parse the complete document,
find the page you are interested in (page 1 in the case of PDFPIC) and then
search for the MediaBox in the page object or any of its ancestors.
Cheers
Deri
- Re: [Groff] PDFPIC macro, (continued)
- Re: [Groff] PDFPIC macro, Peter Schaffter, 2014/09/17
- Re: [Groff] PDFPIC macro, Keith Marshall, 2014/09/17
- Re: [Groff] PDFPIC macro, Steffen Nurpmeso, 2014/09/18
- Re: [Groff] PDFPIC macro, Peter Schaffter, 2014/09/18
- Re: [Groff] PDFPIC macro, Deri James, 2014/09/18
- Re: [Groff] PDFPIC macro, Keith Marshall, 2014/09/18
- Re: [Groff] PDFPIC macro, Deri James, 2014/09/18
- Re: [Groff] PDFPIC macro, Keith Marshall, 2014/09/20
- Re: [Groff] PDFPIC macro, Keith Marshall, 2014/09/20
- Re: [Groff] PDFPIC macro, Werner LEMBERG, 2014/09/21
- Re: [Groff] PDFPIC macro,
Deri James <=
- Re: [Groff] PDFPIC macro, Ted Harding, 2014/09/21
- Re: [Groff] PDFPIC macro, Tadziu Hoffmann, 2014/09/22
- Re: [Groff] PDFPIC macro, Keith Marshall, 2014/09/21
- Re: [Groff] PDFPIC macro, Ulrich Lauther, 2014/09/21
- Re: [Groff] PDFPIC macro, Deri James, 2014/09/21
- Re: [Groff] PDFPIC macro, Keith Marshall, 2014/09/21
- Re: [Groff] PDFPIC macro, Keith Marshall, 2014/09/21
- Re: [Groff] PDFPIC macro, Deri James, 2014/09/21
- Re: [Groff] PDFPIC macro, Peter Schaffter, 2014/09/21
- Re: [Groff] PDFPIC macro, Keith Marshall, 2014/09/29