  The ISO-SWS infrared spectroscopic observations of the nucleus of Seyfert
galaxy NGC4151, which are described in a companion paper, are used together
with a compilation of UV to IR narrow emission line data to determine the
spectral shape of the obscured extreme-UV continuum that photoionizes the
narrow line emitting gas in the active galactic nucleus. We present a new
method to determine the best fitting photoionizing continuum and emission line
cloud model from a heterogeneous set of emission line data.
  For NGC4151, we find a best-fit model that reproduces the observed line
fluxes to within a factor of 2 on average, and which is consistent with the
observed geometry of the optical Narrow Line Region (NLR). Our model consists
of a clumpy, optically thick (ionization bounded) gas distribution, with a
hydrogen gas density of ~1000 cm^-3 and a volume filling factor of 6.5*10^-4.
  Our best fitting spectral energy distribution (SED) falls sharply beyond the
Lyman limit and then rises sharply again towards 100 eV. In particular, it does
not display a `Big Blue Bump' signature of a hot accretion disk. We find that
this SED, which best reproduces the NLR line emission on the 100--500 pc scale,
does not have enough UV photons to produce the observed BLR recombination
emission from the inner 1 pc. This suggests that the BLR is photoionized by the
intrinsic continuum source, which does have a strong UV component (perhaps a
Big Blue Bump), but that this UV component is absorbed by material located
between the NLR and BLR. Our analysis suggests that the absorber consists of
\~5*10^19 cm^-2 of neutral hydrogen. Such an absorber was independently
detected by UV absorption lines (Kriss et al. 1992, 1995).
