groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Missing text in PDF with Mom


From: Ted Harding
Subject: Re: [Groff] Missing text in PDF with Mom
Date: Sat, 06 Sep 2014 10:16:07 +0100 (BST)

On 06-Sep-2014 08:05:46 Ralph Corderoy wrote:
> Hi Mike,
> 
>> So it is my first ever attempt at using Groff.
> 
> Welcome!
> 
>> The generated pdf file doesn't have any paragraphs when viewed
>> by Adobe Reader XI Version 11.00.08 on Windows 8 64-bit.  It is
>> nothing but title text.
> 
> ...and the "- 1 -" page number at the bottom?
> 
>> But if I convert the resultant pdf to a PNG using pdftopng 3.04 on
>> Fedora, the title text and the paragraph text appears.
> 
> That's odd, because it doesn't appear for me;  I get the same as viewing
> the PDF.  And if I look at the PDF's contents, I don't think the text is
> there.  The qdf(1) program can make the PDF more readable.
> 
>     $ qpdf --qdf mike.pdf mike.qdf
>     $ grep BaseFont mike.qdf
>       /BaseFont /Times-Bold
>       /BaseFont /Times-Roman
>     $ 
>     $ grep -n '(.*)' mike.qdf
>     19:  /CreationDate (D:20140905225609-4'00')
>     20:  /Creator (groff version 1.22.2)
>     21:  /ModDate (D:20140905225609-4'00')
>     22:  /Producer (gropdf version 1.22.2)
>     104:  /Title (Using Groff/Mom like Markdown)
>     172:0.000 Tw [(Using Gr)] TJ
>     174:0.000 Tw [(off/Mom lik)] TJ
>     176:0.000 Tw [(e Markdo)] TJ
>     178:0 Tw (wn) Tj
>     196:0 Tw [(-) -83.36 ] TJ
>     199:0 Tw [(1) -83.36 ] TJ
>     202:0 Tw (-) Tj
>     493:<< /Registry (Adobe)
>     494:/Ordering (UCS)
>     $ 
> 
> The initial strings up to line 104 are PDF metadata, then the printable
> text follows to 202.
> 
>> I'm guessing that I was supposed to embed a font, maybe, in the PDF
>> file itself somehow.
> 
> No, it's not that, since the fonts used are boring and common and the
> missing text isn't in the PDF.  :-)
> 
> Cut PDF out of the equation to see if that's where the problem lies.  Go
> for PostScript instead and have a third party produce the PDF, e.g.
> 
>     groff -mom mike.tr | ps2pdf - mike.pdf
> 
> Cheers, Ralph.

After reading Mike's post, and prior to reading Ralph's, I converted
the PDF to PS (by printing to file out of Acrobat Reader, on Debian
Linux), and (just as Ralph did) I saw only the Title text:

190.528 90 mo
(Using Gr)
[11.5518 6.22388 4.448 8.896 8 4 12.448 0 ]xsh
252.912 90 mo
(off/Mom lik)
[7.99998 5.32788 5.32788 4.448 15.1038 8 13.3279 4 4.448 4.448 0 ]xsh
334.08 90 mo
(e Markdo)
[7.10376 4 15.1038 8 7.10376 8.896 8.896 0 ]xsh
401.024 90 mo
(wn)

and the footer page number:

(-)sh
302.875 752 mo
(1)sh
310.167 751.296 mo
(-)sh

in the resulting PostScript, with no trace whatever of any of the
text in the two paragraphs:

.PP
Paragraphs in Mom are just one or more lines of consecutive text
preceeded by the '\.PP' macro.
.PP
If you need to have text in your paragraph that happens to be a macro,
like '\.PP', you'll need to escape the period by preceding it with a
backslash, like so '\\\.PP'

So, like Ralph, I'm strongly tempted to conclude that this text simply
did not, for whatever reason, get into the PDF.

I'm not a Mommer, so cannot contribute any possible explanation!

With best wishes,
Ted.

-------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Date: 06-Sep-2014  Time: 10:15:43
This message was sent by XFMail
-------------------------------------------------


reply via email to

[Prev in Thread] Current Thread [Next in Thread]