Tag Archives: postscript

html2ps: You thought it wasn’t possible

I made a big deal the other day about converting csv files to Excel files, and from there possibly even generating HTML files as a result. Here’s one that will reverse directions on you again, converting an HTML page into PostScript. And of course, it’s called html2ps.


Nothing much to show, of course, but the end result is undeniable. And of course it’s only one step from there to …


Acrobat Reader?! 😯 Yuck! 😡

Sorry, I do that just because I know I’ll get an e-mail from a certain reader, reminding me that ‘Reader is evil, and there are dozens of free alternatives. It amuses me.

The point of this little soliloquy is to mention that you can dump HTML pages into PostScript files, and maintain most of the information, if not all the style. html2ps does it fairly effortlessly, and fairly quietly. Meaning your csv files can now be converted to Excel, then to HTML, and from there to PostScript.

And of course, from PostScript it’s just a quick hop to PDF format, or whatever your heart desires. Why do that? Well … because you can! :mrgreen:

As a console application, html2ps doesn’t rank very high, since it has little offer in a way of interaction except through option flags and error messages. I don’t hold any ill-will for that, but I will repeat my preference for applications that use space and color and some sort of interface.

I guess programs are like people. Some don’t care to say too much, while others will take up as much as you’ll give them. 😉

groff: Typesetting, in any direction

It seems to me, groff is another one of those programs — like lilypond from so long ago, or even like mencoder or some other conversion tools — that are sitting on the fence in terms of console programs.

groff doesn’t really display anything, that I can find. It converts between specific markups, changing, for example, text-formatted pages to man format. If all goes right, groff doesn’t show you a darned thing. But the output files are quite lovely.

Here’s an example. First, a raw man page converted to ASCII, then formatted to be readable.

2014-08-06-6m47421-groff-01 2014-08-06-6m47421-groff-02

Whenever possible, I try to avoid the Wall of Text effect. O_o

groff can do some other fun things too. Here’s a man page converted to a PDF document.


I know: Acrobat Reader. Ick. 😛

You can convert straight to PDF with groff and its included tools, without the need for ghostscript. groff translates between other formats too — including some I had never heard of. Here’s a memorandum macro letter, which was completely new to me until this morning.


Nice and clean output, even if it is in Acrobat Reader. Blech.

There is plenty of help online that will get you started with groff. My favorite discussion, as you will be able to tell as soon as you start into it, was here.

Like I said at the start, as a conversion tool, groff doesn’t seem to show much. In fact, in all those examples, groff never said a word unless there were errors.

So the question remains: Is a taciturn and laconic conversion tool still a console application? Should I have omitted this and all those others? Have I been wasting my time all these years? 😮 :\

ps*: The splat meaning, “Whatever you want”

I probably should have just dumped ps2ascii and ps2pdf in with all the other ps-entitled tools that I have in my list, like I did with pdf-entitled tools.

Truth be told though, it seems the vast majority of Postscript-related tools have already been lumped into one megakit — the aptly named psutils. To include …

  • psbook: Rearranges pages.
  • psmerge: Merges multiple PS files.
  • psnup: Puts several PS pages on a sheet of paper.
  • psresize: Changes document size
  • psselect: Splits out pages from PS files, if I remember right.
  • pstops: More page rearrangement.

As well as a healthy rasher of scripts to further manhandle your PS file collection.

It looks like the bulk of the applications in the psutils package are around 20 years old. That’s either a turnoff for you if you think old software sucks, or a moot point if you think Postscript files haven’t evolved much even in that amount of time. 🙄

There’s more than just what’s in psutils though. Here’s …

  • pslib: a C library for creating PostScript files.
  • pspresent: A fullscreen Postscript presentation tool, more intended for X than just the console.
  • psrip: Yanks images from PS files.
  • pstoedit: Translates PostScript and PDF graphics into vector formats.
  • ps2eps: For making the short leap from PS to EPS.
  • pstotext: Extracts text from PS files.

And as always, my list is not comprehensive. I am sure there are dozens more hiding out there. 😉

ps2ascii and ps2pdf: In two directions

I don’t run across pure Postscript files too often any more. All the same, things like ps2ascii and ps2pdf are useful.

Both are part of the ghostscript package, which you might already have installed as a dependency to something else. It seems to get around.

2014-03-15-lv-r1fz6-ps2ascii 2014-03-15-lv-r1fz6-ps2pdf

I don’t know if there’s much I can add that isn’t better shown in the images. On the one hand you can convert to straight text, and the other, make the leap to PDFs … and from there, there’s lots of places to go.

I will say ps2ascii‘s product seems to be a bit cluttered, so it might need a little touching up here and there. I hold no grudge over that though.

And I should also note that ps2pdf has a few variations, and on my Arch system they show up as ps2pdf12, ps2pdf13, ps2pdf14 and ps2pdfwr. If you need a certain degree of compatibility — or lack thereof, if you use ps2pfdwr alone — you have the options.

Conversion tools, conversion tools, so many more conversion tools. … 😐

pcal: Nifty calendars, at a moment’s notice

It doesn’t take long for pcal to get the job done. Given the right options, pcal should have a calendar made for you in a matter of seconds.


Of course, with something as complex as pcal, getting the right options might be the tricky part.

The man page is really a man novel, and the help flags will take you a while to page through them.

On top of that, pcal offers a lot of custom configuration for things like national holidays, events and so forth. A lot of that is included in the original tarball, if it’s not bundled in your distro.

And if this looks familiar, it’s probably because there’s a similarity between this and ccal, from almost a year ago.

pcal is another one of those applications that’s pushing the envelope in terms of “console” or “text-based.”

Yes, you have to feed it the options you want, but with no interface and no interactive output, it’s just a fire-and-forget tool.

And of course, if you don’t like what you get from it, you tweak it and try again. So yes, it’s text-based. Just not very talkative, I guess. 😕