Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF metadata #77

Closed
SimonSapin opened this issue Apr 26, 2013 · 3 comments
Closed

PDF metadata #77

SimonSapin opened this issue Apr 26, 2013 · 3 comments
Labels
feature New feature that should be supported

Comments

@SimonSapin
Copy link
Member

Suggested mapping of HTML metadata to PDF metadata:

<title> → Title
<meta name=author> → Author
Maybe? <meta name=description> → Subject
<meta name=keywords> → Keywords
<meta name=generator> → Creator
"WeasyPrint vX.Y" → Producer
<meta name=dcterms.created> → CreationDate
<meta name=dcterms.modified> → ModDate

Relevant specs:
http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-title-element
http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#standard-metadata-names
http://wiki.whatwg.org/wiki/MetaExtensions

@SimonSapin
Copy link
Member Author

Is it useful to override these from CSS or Python?

@SimonSapin
Copy link
Member Author

One suggestion was to add the date of PDF generation in the metadata (ie. when WeasyPrint rendered this document) but:

  • That does not really match the definition of either CreationDate or ModeDate, the only two date fields in PDF
  • I don’t find this date really significant or useful: if you re-render a PDF file from HTML at a later date, it’s still the same document.

My current plan is to expose this metadata (read/write) on Document objects. (In Python, not in CSS.) This will allow people who really want the generation date to add in with Python.

SimonSapin added a commit that referenced this issue Jul 21, 2013
<title> → /Title
<meta name=author> → /Author
<meta name=description> → /Subject
<meta name=keywords> → /Keywords
<meta name=generator> → /Creator
<meta name=dcterms.created> → /CreationDate
<meta name=dcterms.modified> → /ModDate
"WeasyPrint vX.Y" → /Producer
liZe added a commit that referenced this issue Jul 22, 2013
Add PDF metadata parsed from HTML. Fix #77.
@liZe
Copy link
Member

liZe commented Sep 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature that should be supported
Projects
None yet
Development

No branches or pull requests

2 participants