Hi Ingo,

> 
> > This is current/amd64. I just produced a pdf of bc(1) with
> > "man -Tpdf bc > bc.pdf".
> > 
> > Trying to view that pdf with mupdf(1) complains thusly:
> > (I can view and print the PDF fine though)
> > 
> >     warning: expected 'endobj' or 'stream' keyword (27 0 R)
> >     warning: expected 'endobj' or 'stream' keyword (9 0 R)
> >     warning: expected 'endobj' or 'stream' keyword (4 0 R)
> >     warning: expected 'endobj' or 'stream' keyword (3 0 R)
> >     warning: expected 'endobj' or 'stream' keyword (5 0 R)
> > 
> > Trying to view that pdf with gv(1) says
> > 
> > Error: /typecheck in --setfileposition--
> > Operand stack:
> [...]
> > and errors out.
> > 
> > Is seems to happen with any other manpage as well.
> > Is anyone seeing the same?
> 
> Apparently, bugs are immortal: they never die from old age.
> 
> This was a group of three bugs all more than seven years old.
> Quite an accomplishment to find bugs of that age in mandoc,
> given how often much of the code kept getting re-written and
> re-re-written while we slowly learnt how languages work.
> 
> But it looks like nobody ever bothered to check whether the PDF
> output generated by mandoc(1) was syntactically valid - which is
> amazing...
> 
> Thanks for the report, fixed by the commit below.

I can confirm that both mupdf and gv hapilly display any manpage
that I have bothered to try to process by mandoc -Tpdf, withou errors.

On Oct 25 23:01:05, schwa...@usta.de wrote:
> FYI:  There was another bug, visible with
> 
>   man -Tpdf anything > foo.pdf && gs foo.pdf
> 
> which displayed the file, but spewed
> 
>   **** Ignoring spurious ET operator.
> 
> at the end of each page.
> Fixed by the commit below.
> 
> It would be nice if you could do
> 
>   cd /usr/src/usr.bin/mandoc
>   cvs up -dPA
>   make obj
>   make cleandir
>   make
>   doas make install
> 
> (no matter whether on -current or 6.2-stable) and play around a bit
> looking whether anything still breaks for you in PDF output.

I am on -current; gs displays the PDF manpages
and does not complain about the ET.

        Thank you!

                Jan

Reply via email to