What would you do if you stumbled upon an abandoned printing press amid the hell of the First World War? The answer, according to Ian Hislop and Nick Newman's entertaining The Wipers Times, is bring out a satirical newspaper taking swipes at everyone from the top brass to the "Boche".

If that sounds a little like something dreamed up by Edmund Blackadder, then The Wipers Times with its one-liners and music hall sketches, was not far off the mark, except that far from being a fantasy from Private Eye editor Hislop, this was a true story. The 12th battalion Sherwood Foresters, led by the charismatic Captain Fred Roberts, really did discover said press and, buoyed by the discovery that their sergeant had experience as a printer in his pre-war life, set about producing a newspaper.

And what a paper it was. Named for the British soldiers pronunciation of Ypres, The Wipers Times was an inventive mixture of fake articles, jokes, songs and even the odd poem (one of the drama's best running jokes was the flood of poetry submissions received). It set out to find humour in the hell of war and despite the best attempts of higher-ups to close it down, it continued to print until the Armistice of 1918.

Download the new Independent Premium app Sharing the full story, not just the headlines

That it did so seems to have been largely down to the bond between Roberts, who became the paper's editor, and his lieutenant and sub-editor Jack Pearson. The Wipers Times presented them as two men with a shared and anarchic sense of humour and Ben Chaplin and Julian Rhind-Tutt (both excellent) had a great time trading quips and drinks while keeping their lips appropriately stiff. Even Michael Palin got in on the act with a brief turn as an amiable colonel and supporter of the paper, gently telling a disgruntled subordinate: "I rather think the authors are aware [that war isn't funny] – I think that may be the point."

Along the way there were some lovely digs at grandiose newspaper columnists and hard-drinking, war-avoiding foreign correspondents and at those who cheered for war without actually having to take part. By the time Pearson decided to open a pub on the front line for wounded men, getting the support of the chaplain to do so (another true event), it was clear that the editing duo were an unstoppable force trapped in the immovable object of war.

It wasn't all barbed comments beside the barbed wire, however, and some of the strongest moments came when masks were dropped and the real horror of the situation shone briefly through. A well-judged scene between Roberts and his wife showed how this most charming of men lost his sang-froid entirely when away from the field, talking too fast and draining glass after glass of wine, keeping up a good front before returning to the trenches.

And behind the good-humoured jabs and the presenting of the jolliest of good shows was a real and righteous strain of anger: at the waste of a generation, at the cavalier way these men were treated after they returned to civilian life (the interview between Roberts and a features editor that book-ended the story was a small masterpiece of two worlds colliding in incomprehension) and at the futility and stupidity of war.

Yet something good did come out of all that horror: a paper that used gallows humour to make a wider point and gave men without a voice an outlet in time of great need. Hislop and Newman clearly wanted to prove The Wipers Times was not a curiosity but an influential publication in its own right, one whose satire echoes through the ages and can be seen today in the likes of Private Eye, The Daily Mash and The Onion. They succeeded in style.