Language tag

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
User avatar
Jensen Head
User
Posts: 412
Joined: Mon Sep 13, 2021 8:12 am

Language tag

Post by Jensen Head »

PDF-XChange writes the language of the document to the following tag:

Code: Select all

Language = (...)
Tag 'Lang', direct object
Whereas XMP-dc family 1 of the Dublin Core Metadata Element Set (one of the XMP standards) specifies that the language tag should be stored here:

Code: Select all

Language = (...)
Tag 'x:xmpmeta/rdf:RDF/rdf:Description/dc:language/rdf:Bag/rdf:li 10'
By the way, in Adobe Acrobat Pro DC 2022.001.20117 x64 this tag is written in the same way, which, however, does not mean that it is not a mistake there either. The tag written in PDF according to the rules is not seen in both applications.

Can you explain this strange behavior of the editor?
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8436
Joined: Wed Jan 03, 2018 6:52 pm

Re: Language tag

Post by TrackerSupp-Daniel »

Hello, Jensen Head

It should be noted that while PDF uses XMP as a structure, it is its own format, with its own distinct specification which can alter these "rules" from the usual XMP handling. I am verifying this with the Dev team leader, who has access to the official ISO PDF specification, but I suspect, the reason that both we and adobe place this language flag here, is related to the PDF specification defining as such.
I will let you know as soon as I have confirmation.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
User avatar
Jensen Head
User
Posts: 412
Joined: Mon Sep 13, 2021 8:12 am

Re: Language tag

Post by Jensen Head »

I think it would be appropriate to refer to RFC 3066 in this thread — https://www.ietf.org/rfc/rfc3066.txt
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17823
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Language tag

Post by Tracker Supp-Stefan »

Hello Jensen Head,

The PDF specification states that it is using RFC 5646 instead:
image.png
You can find the full document here:
https://www.ietf.org/rfc/rfc5646.txt

Kind regards,
Stefan
User avatar
Jensen Head
User
Posts: 412
Joined: Mon Sep 13, 2021 8:12 am

Re: Language tag

Post by Jensen Head »

Jensen Head wrote: Mon May 23, 2022 12:29 pmPDF-XChange writes the language of the document to the following tag:

Code: Select all

Language = (...)
Tag 'Lang', direct object
Tracker Supp-Stefan wrote: Thu May 26, 2022 10:17 amThe PDF specification states that it is using RFC 5646 instead:
You're right:
This document replaces [RFC4646] (which obsoleted [RFC3066] which, in turn, replaced [RFC1766]).
However, the specification you provided does not specify the tag you are using, only

Code: Select all

'Language'
(dc:language)
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Language tag

Post by Ivan - Tracker Software »

Hi Jensen,

I'm not sure how XMP is connected with the /Root/Lang property of the PDF document?

When the Editor sets the document's language, it stores it in the document's catalog dictionary (/Root) under the key 'Lang', as described in the PDF Specification.

And the document's Metadata (XMP) has no relation to that.

As I see, Adobe Acrobat does the same.

Do I miss something?
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
Post Reply