Go Home

Easily Importing Images in Groff with PDFRoff and PSPic

I am using pdfroff for this guide. My compiler command is pdfroff -ms.

The first step is to either get a .eps image or convert one to the .eps format. My tool of choice is imagemagick but there are many options you can use. To convert an image, I use the command 'convert image.jpg image.eps'. The conversion is done.

The next step is to modify your .ms file to tell it to add the image. To do this I added '.PSPIC -R /path/to/image.eps 4i' to the file. The -R means that I want the image to be right-aligned, and this principle also applies to Left and Center aligning (-L, -C). The 4i means that I want the image size to equate to 4 inches tall. If I wanted it to be 3 inches tall I would type '3i', and so on and so forth.

The last step is to compile your PDF. I use PDFRoff which is quite slow but I'm used to it so I haven't moved away. I compiled it by typing 'pdfroff -ms file.ms > file.pdf'