On Fri, Sep 08, 2017, Ralph Corderoy wrote: > Hi Peter, > > > You'll notice that the top of the pdf file has a line of text spit out > > by grep(1) that obviously shouldn't be there. > > I couldn't come up with the groff 1.22.3-7 command line required to > build the PDF correctly, nor get grep's unwanted output. Deri suggested > pdfmom's grep might be the culprit, but its stderr should end up on > pdfmom's stderr?
Problem solved. The superfluous line at the top of the file ["Binary file (standard input) matches"] isn't stderr, it's stdout, so it becomes part of the pipeline. The grep in pdfmom is returning a binary file hit when it encounters the diacritic in .ds pdf:look(pdf:bm1) L'étranger Since the binary file hit doesn't begin with .ds, it prints literally at the top of the file. The solution is to pass the -a flag to grep. Deri: do you want me to fix this in pdfmom and push the change, or would you prefer to do it yourself? Question: why does grep treat the presence of the diacritic as cause for saying "Binary file (standard input) matches"? -- Peter Schaffter http://www.schaffter.ca