Photoproduction of electron-positron pairs in compact x-ray sources