Hi there,
In go-pdfium, I use the response of FPDF_GetMetaText to detect whether something went wrong or not, mainly because FPDF_GetMetaText return 2 (string), whether the tag exists or not. However, when opening a PDF without any /Info reference in the trailer always returns 0, which doesn't really match the behavior of other PDF's in my opinion that do have /Info but do not have that specific Tag.
My proposal would be to also return 2 (empty string) when the /Info reference doesn't exist.
I attched a demo PDF, created with the commands:
exiftool -all:all= foo.pdf
qpdf --linearize foo.pdf bar.pdf
It would also be great to have some method to list the available tags in a document.
Kind regards,
Jeroen Bobbeldijk