How do I use a style file to force a4paper without calling the geometry package?

I'm writing a style file for my colleagues to typeset their exam papers. The paper size needs to be A4, but some of my colleagues always forget to invoke the a4paper option in the documentclass. Can I force A4 size via the style file, without doing \RequirePackage[a4paper]{geometry} (as I can't assume my colleagues have the geometry package)?

I suppose the answer is to emulate what the geometry package does, but I wonder whether there's a simpler way.

• why not make your file a class rather than a package, then the problem goes away as you can simply remove the option of changing paper size. – David Carlisle Mar 4 '16 at 10:42
• I'm all for finding the most widely-applicable solution, but also for reducing the amount of code you have to maintain. What are the odds in 2016 that a colleague won't have geometry? If so, what are the odds that they'll also have a very limited TeX install that will cause other problems later? – Mike Renfro Mar 4 '16 at 12:46
• why not use KOMA-class? a4paper is invoked by default. – naphaneal Apr 3 '16 at 17:04

``````\setlength\paperheight {297mm}