podman run --rm --volume "$(pwd):/data" --userns keep-id --user $(id -u):$(id -g) pandoc/latex readme.md -o outfile.pdf
--volume "$(pwd):/data"
maps the current directory $(pwd)
to the /data volume in the running container.
--userns keep-id --user $(id -u):$(id -g)
is a rootless Podman specific user namespace mapping fix, so the output file can be written to the primary filesystem.
pandoc/latex
is the dockerhub image of pandoc with the pdf2latex toolset installed.