groff
[Top][All Lists]
Advanced

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

Re: Resources for *roff internals and PDF generation


From: Deri
Subject: Re: Resources for *roff internals and PDF generation
Date: Thu, 24 Feb 2022 16:09:13 +0000

On Thursday, 24 February 2022 14:54:51 GMT Olle Lögdahl wrote:
> Hello,
> 
> I understand this mail is a little outside the scope of this
> mailinglist; i just had nowhere else to ask. Does somebody know any good
> resources for understanding the internals of groff/roff? Mostly curious
> about the PDF-generation part. Any resources may be helpful (online,
> books). I already have the PDF-1.7 specification, but something more
> specific on document generation and easier to digest.
> 
> Thanks in advance,
> 
> Olle Lögdahl

Hi Olle,

I found the PDF 1.4 specification more helpful, it has a proper clickable 
index, which the 1.7 version lacks. (https://www.adobe.com/content/dam/acom/
en/devnet/pdf/pdfs/pdf_reference_archives/PDFReference.pdf).

As regards how groff produces pdfs it is worth looking at the following:-

The groff_out man page.

This describes the groff intermediate format which is what the groff output 
devices read to produce the final output. The intermediate format is concerned 
with the business of specifying fonts, size, colour and position of text on 
the page and includes drawing commands for non-tex objects as well.

Keith Marshall's pdfmark.pdf which is probably already installed.

The intermediate format described above does not cover aspects which are 
useful for pdfs in particular, i.e. creating a document overview and embedding 
links within the pdf, specifying meta-data for the pdf, etc.. This document 
covers those areas. All these "extensions" are facilitated using the \X escape 
for example, which allows you to send information directly to the output 
driver.

The gropdf man page.

This describes some more \X extensions which are understood solely by the 
gropdf device driver.

Cheers 

Deri






reply via email to

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