You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
readMetadata returns empty metadata when the trailer has no /Info, ignoring XMP and /Lang #1694
readMetadata in packages/pdf-codec/src/read.ts returns {} as soon as the trailer has no /Info dictionary, before it looks at the catalog's /Lang or the XMP packet. A PDF with no /Info but with an XMP packet (the usual PDF/A shape) therefore reports empty metadata, even though the comment a few lines further down says the fields "live only in XMP" in such files, and the surfaces docs and README say metadata "still reads the XMP packet".
Repro: write a PDF whose trailer has no /Info, whose catalog has /Metadata pointing at an XMP stream carrying dc:title and dc:creator, and a /Lang entry. readPdf returns metadata: {} where the title, author and language are all present in the file.
Activity