On Sat, Jun 13, 2015 at 6:33 AM, Ralph Corderoy <ra...@inputplus.co.uk> wrote: > Hi Peng, > >> I use the following command to generate a pdf file from a manpage. >> But the pdf file has title "Untitled". > > How odd, it doesn't here. > >> I want to unset it via groff. >> But I don't see an option to set title to be null. Would you please >> let me know how to unset the title with groff? >> >> groff -Tps -mandoc -c < $(man -w ls) | ps2pdf - > /tmp/ls.pdf > > I did > > zcat /usr/share/man/man1/ls.1.gz | groff -mandoc | ps2pdf - >ls.pdf
I tried both Mac and Ubuntu. Both have the same problem. Did you check the file using Acrobat? On Mac, command-D brings up the document property window. The title on Descript tab is "Untitled". > and it worked fine. > > Have you tried the simpler > > man -t ls | ps2pdf - >ls.pdf This does not work. It actually calls groff. That is why I end up trying groff directly. > All times, the PDF starts > > LS(1) User Commands LS(1) > > NAME > ls − list directory contents > SYNOPSIS > ls [OPTION]... [FILE]... > DESCRIPTION > List information about the... > > Cheers, Ralph. -- Regards, Peng