[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] PDFPIC macro
Re: [Groff] PDFPIC macro
Wed, 11 Oct 2017 14:17:24 +0100
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0
I have what appears to be a working build, now; (see below).
On 11/10/17 10:09, Keith Marshall wrote:
> On 09/10/17 23:44, Deri James wrote:
>> The attached archive holds some samples of two types of pdfs, either
>> produced by gropdf or produced by cairo software. Inside the two
>> subdirectories there are three types of files:-
>> *-structure.pdf (these illustrate the structure of the pdf with
>> similar name)
>> *.pdf (these are the pdfs to run against psbb)
>> *.mm (a program called "freemind" can open these files, they also
>> illustrate the structure, but you can interactively click to
>> open/close object nodes).
>> In the gropdf directory the gropdf.pdf file is the one having
>> problems, and the gs.pdf is the same file after running through
>> ghostscript, which psbb handles perfectly. Both files load fine in
>> acroread, which can be quite picky when it comes to syntax, although
>> the probability is that gropdf is not quite standard enough.
> [...snip... fix identified for gropdf.pdf issue ...snip...]
>> The cairo directory contains two examples created by inkscape, psbb
>> has a big problem with these.
> I have an idea how to fix this too ...
>> I hope these are helpful to you, sorry for being a nuisance.
>> Integrating pdf bounding boxes into groff would be a big benefit.
>> These are the MediaBoxes which would be expected.
> Thanks. These are helpful to me, (but obviously not to others, unless
> you're willing to distribute them). Regardless, I'll leave the analysis
> here, for reference.
>> address@hidden Samples]$ pdfbb Cairo/*.pdf gropdf/*.pdf
>> Processing 'Cairo/gropdf-pdf-structure.pdf'
>> Cairo/gropdf-pdf-structure.pdf: MediaBox: 0,0,842,595
>> Processing 'Cairo/gs-pdf-structure.pdf'
>> Cairo/gs-pdf-structure.pdf: MediaBox: 0,0,842,595
>> Processing 'Cairo/SJP.pdf'
>> Cairo/SJP.pdf: MediaBox: 0,0,114.146561,115.235786
>> Processing 'Cairo/SJP-structure.pdf'
>> Cairo/SJP-structure.pdf: MediaBox: 0,0,842,595
>> Processing 'Cairo/SJP-Whole.pdf'
>> Cairo/SJP-Whole.pdf: MediaBox: 0,0,210.231384,138.239899
>> Processing 'Cairo/SJP-Whole-structure.pdf'
>> Cairo/SJP-Whole-structure.pdf: MediaBox: 0,0,842,595
>> Processing 'gropdf/gropdf.pdf'
>> gropdf/gropdf.pdf: MediaBox: 0,0,612,792
>> Processing 'gropdf/gropdf-pdf-structure.pdf'
>> gropdf/gropdf-pdf-structure.pdf: MediaBox: 0,0,842,595
>> Processing 'gropdf/gs.pdf'
>> gropdf/gs.pdf: MediaBox: 0,0,612,792
>> Processing 'gropdf/gs-pdf-structure.pdf'
>> gropdf/gs-pdf-structure.pdf: MediaBox: 0,0,842,595
With my fixes applied, and built with DEBUGGING off, I see:
$ ./psbb Samples/*/*.pdf
.../Cairo/gropdf-pdf-structure.pdf: bounding box = (0,0)..(842,595)
.../Cairo/gs-pdf-structure.pdf: bounding box = (0,0)..(842,595)
.../Cairo/SJP.pdf: bounding box = (0,0)..(114,115)
.../Cairo/SJP-structure.pdf: bounding box = (0,0)..(842,595)
.../Cairo/SJP-Whole.pdf: bounding box = (0,0)..(210,138)
.../Cairo/SJP-Whole-structure.pdf: bounding box = (0,0)..(842,595)
.../gropdf/gropdf.pdf: bounding box = (0,0)..(612,792)
.../gropdf/gropdf-pdf-structure.pdf: bounding box = (0,0)..(842,595)
.../gropdf/gs.pdf: bounding box = (0,0)..(612,792)
.../gropdf/gs-pdf-structure.pdf: bounding box = (0,0)..(842,595)
which, allowing for rounding to integers -- as required by the internal
representation of gtroff's .psbb registers -- seems to be in agreement
with your expected results.