The answer to your question is 17" and this is measured from the base of the sump to the highest point on the engine (which is the cylinder head stud to which the upper fuel tank mounting bracket bolts to).
With minor modification you could reduce the overall height to 16.3/4", which then would make the top of the air filter housing the next highest item, if you then had a remote fuel tank and a remote air filter assembly this could further reduce the overall height to 16.1/2" and that would be the absolute limit of what you could expect to get away with.
Here is a link to an 'A range' workshop manual, which contains a lot of useful information:
http://winget.co.uk/document/PETTER%20A%20RANGE%20WORKSHOP%20MANUAL.pdfand here is another link that illustrates the overall height of the AC1 (series II direct injection) and AD1 engines:
http://www.maesco.com/products/lp/lp_a/lp_a.htmlAs can clearly be see there is a big difference in the overall height between the AC and AD engines, which is entirely attributable to the increased stroke of the AD engine
Back to your original inquiry:
My only concern for your scheme would be the AA1 engine may be a little underpowered for your intended application, hence you might like to consider using a Petter AB1 engine (same physical dimensions as the AA1 but 3" bore instead of 2.3/4"), hence it is slightly more powerful.
Another more interesting option would be to create a pseudo AC1 series I indirect injection engine, or AC1 series II direct injection engine) but built using either an AA1 or AB1 crankcase, this is possible because there is a high degree of parts interchangeability across the 'Petter A range' engines.
This would require an AC1 crankshaft, connecting rod, different fuel pump element (better still use a complete AC1 fuel pump assembly) and an AC1 or AB1 piston if you wanted to build a series I version, for series II it would still be possible but would be more expensive as this would additionally require a direct injection cylinder head, direct injection piston, cowling (bespoke to the series II engine), injector, injector clamp, high and pressure injector pipe, plus a few other minor parts.
How do I know this? Because in the past I built one of these engines for a friend of mine who just like you had an application that would only just fit an AA1 engine, but the engine was drastically underpowered for this application, so I built him an AC1 series II engine, using his AA1 engine as the starting point, which effectively put a stroker kit into his AA1 engine.
The only negative for this hybrid engine was it had no electric starting (as the AA1 crankcase has no provision for electric starting), and it was a bit lumpy on tick over due to the smaller diameter flywheel compared to what the AC1 engine would normally normally use.
Noting the other thread you started on this forum, PM me if you would like to discuss your requirements in more detail because as luck would have it, I have available a very tidy Petter AB1 fixed speed engine (4.5 BHP @ 3000RPM), and also all of the parts required to make it into a pseudo AC1 series I engine, finally FYI I am UK based.