Aren't you describing Lulu but for the very niche case of arxiv publications that are small books but not published as books? I think you could do it in a weekend with their API.
This worked four years ago when the API was still launched, but there might have been changes since, so no guarantees.
Most ArXiv PDFs are probably lulu-printable out of the box, but to make a general solution, one would probably need to do some pre-processing with ghostscript (gs), e.g. embed all fonts and flatten images (no transparency).
also, they require that you have both the interior contents as a pdf and a pdf of the cover, so it will need to either auto-generate or offer the option to have a custom cover art.