Generalized local duality, canonical modules, and prescribed bound on projective dimension