We construct the new one-dimensional Dirac Hamiltonians that are spectrally isomorphic (not isospectral) with the known exactly solvable models. Explicit formulas for their spectra and eigenstates are provided. The operators are utilized for description of Dirac fermions in graphene in presence of an inhomogeneous electromagnetic field. We discuss explicit, physically relevant, examples of spectrally isomorphic systems with both non-periodic and periodic electromagnetic barriers. In the latter case, spectrally isomorphic two-and three-gap systems associated with the Ablowitz-Kaup-Newell-Segur hierarchy are considered.