Skip to content

pdfkit: add Options.Subject and Keywords for the info dictionary - #25

Merged
tannevaled merged 1 commit into
mainfrom
add-subject-keywords
Sep 3, 2026
Merged

pdfkit: add Options.Subject and Keywords for the info dictionary#25
tannevaled merged 1 commit into
mainfrom
add-subject-keywords

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

The document information dictionary held only Title and Author. Subject (a one-line description) and Keywords (search terms, conventionally comma-separated) are the other two standard text fields a viewer's document properties and reference managers read. Both are written as PDF text strings, so a non-ASCII value is encoded UTF-16BE like Title/Author.

Verification

Subject/Keywords appear in the (uncompressed) info dictionary; an accented value is UTF-16BE (<FEFF…>), not raw UTF-8. 100% coverage; go vet and gofmt clean.

Unblocks go-tex/engine wiring hyperref's \hypersetup{pdfsubject=…,pdfkeywords=…} to these fields.

🤖 Generated with Claude Code

The document information dictionary held only Title and Author. Subject (a one-line
description) and Keywords (search terms) are the other two standard text fields a
viewer's document properties and reference managers read. Both are written as PDF
text strings, so a non-ASCII value is encoded UTF-16BE like Title/Author.

Verified: Subject/Keywords appear in the info dictionary; an accented value is
UTF-16BE (<FEFF…>), not raw UTF-8. 100% coverage; go vet and gofmt clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 1b2197a into main Sep 3, 2026
1 check passed
@tannevaled
tannevaled deleted the add-subject-keywords branch September 3, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant