COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### set language in document properties

• Follow

hi,
Is there a way to set the PDF document properties for the language
setting? In Adobe Acrobat you can set it from the Advanced tab in the
document properties dialog, but I'm looking for a way to do it from
the command line or something I can automate with a script.

FWIW, I'm using pdflatex to generate the files and I can use either
Linux or Windows to modify the pdfs after they're created.

thanks,
--Tim Arnold
 0

On Tue, 08 Feb 2011 11:07:39 -0500, Tim <jtim.arnold@gmail.com> wrote:

> hi,
> Is there a way to set the PDF document properties for the language
> setting? In Adobe Acrobat you can set it from the Advanced tab in the
> document properties dialog, but I'm looking for a way to do it from
> the command line or something I can automate with a script.
>
> FWIW, I'm using pdflatex to generate the files and I can use either
> Linux or Windows to modify the pdfs after they're created.
>
> thanks,
> --Tim Arnold

Try this: find yourself a document whose language setting is as out of the box.
After using Acrobat to set it to what you want, save it under a different name.
Then do a DOS fc /b (or a Unix DIFF) on the two files to see how they differ,
and you'll probably *see* how to find "a way to do it from the command line
or something I can automate with a script." :-)

HTH. And cheers, -- tlvp
--
Avant de repondre, jeter la poubelle, SVP
 0

"tlvp" <tPlOvUpBErLeLsEs@hotmail.com> wrote in message
news:op.vqly1jrzitl47o@acer250.gateway.2wire.net...
> On Tue, 08 Feb 2011 11:07:39 -0500, Tim <jtim.arnold@gmail.com> wrote:
>
>> hi,
>> Is there a way to set the PDF document properties for the language
>> setting? In Adobe Acrobat you can set it from the Advanced tab in the
>> document properties dialog, but I'm looking for a way to do it from
>> the command line or something I can automate with a script.
>>
>> FWIW, I'm using pdflatex to generate the files and I can use either
>> Linux or Windows to modify the pdfs after they're created.
>>
>> thanks,
>> --Tim Arnold
>
> Try this: find yourself a document whose language setting is as out of the
> box.
> After using Acrobat to set it to what you want, save it under a different
> name.
> Then do a DOS fc /b (or a Unix DIFF) on the two files to see how they
> differ,
> and you'll probably *see* how to find "a way to do it from the command
> line
> or something I can automate with a script." :-)
>
> HTH. And cheers, -- tlvp
> --
> Avant de repondre, jeter la poubelle, SVP

diff treats the files as binary and the only response is 'binary files
differ'
--T

 0

On 08/02/11 16:07, Tim wrote:
> hi,
> Is there a way to set the PDF document properties for the language
> setting? In Adobe Acrobat you can set it from the Advanced tab in the
> document properties dialog, but I'm looking for a way to do it from
> the command line or something I can automate with a script.
>
> FWIW, I'm using pdflatex to generate the files and I can use either
> Linux or Windows to modify the pdfs after they're created.

\usepackage[pdflang=en]{hyperref}

This is supposed to set the PDF language tag, but I just tried it with
the following MNWE and Acrobat Reader still shows the Language blank, so
I am crossposting this to c.t.t in the hope someone can show me what I
have misunderstood.

\documentclass{article}
\usepackage[pdflang=en]{hyperref}
\begin{document}
\title{Testing the PDFlang tag in pdflatex}
\author{Peter Flynn}
\date{9 Feb 2011}
\maketitle
Stuff
\end{document}

///Peter

----------------------------------8<----------------------------------
$pdflatex test This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian) entering extended mode (./test.tex LaTeX2e <2009/09/24> Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, nohyphenation, farsi, arabic, croatian, bulgarian, ukrainian, russian, czech, slovak, danish, dutch, finnish, french, basque, ngerman, german, german-x-2009-06-19, ngerman-x-2009-06-19, ibycus, monogreek, greek, ancientgreek, hungarian, sanskrit, italian, latin, latvian, lithuanian, mongolian2a, mongolian, bokmal, nynorsk, romanian, irish, coptic, serbian, turkish, welsh, esperanto, uppersorbian, estonian, indonesian, interlingua, icelandic, kurmanji, slovenian, polish, portuguese, spanish, galician, catalan, swedish, ukenglish, pinyin, loaded. (/usr/share/texmf-texlive/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/usr/share/texmf-texlive/tex/latex/base/size10.clo)) (/usr/share/texmf-texlive/tex/latex/hyperref/hyperref.sty (/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty) (/usr/share/texmf-texlive/tex/generic/oberdiek/ifpdf.sty) (/usr/share/texmf-texlive/tex/generic/oberdiek/ifvtex.sty) (/usr/share/texmf-texlive/tex/generic/ifxetex/ifxetex.sty) (/usr/share/texmf-texlive/tex/latex/oberdiek/hycolor.sty (/usr/share/texmf-texlive/tex/latex/oberdiek/xcolor-patch.sty)) (/usr/share/texmf-texlive/tex/latex/hyperref/pd1enc.def) (/usr/share/texmf-texlive/tex/generic/oberdiek/etexcmds.sty (/usr/share/texmf-texlive/tex/generic/oberdiek/infwarerr.sty)) (/etc/texmf/tex/latex/config/hyperref.cfg) (/usr/share/texmf-texlive/tex/latex/oberdiek/kvoptions.sty (/usr/share/texmf-texlive/tex/generic/oberdiek/kvsetkeys.sty)) Implicit mode ON; LaTeX internals redefined (/usr/share/texmf-texlive/tex/latex/ltxmisc/url.sty) (/usr/share/texmf-texlive/tex/generic/oberdiek/bitset.sty (/usr/share/texmf-texlive/tex/generic/oberdiek/intcalc.sty) (/usr/share/texmf-texlive/tex/generic/oberdiek/bigintcalc.sty (/usr/share/texmf-texlive/tex/generic/oberdiek/pdftexcmds.sty (/usr/share/texmf-texlive/tex/generic/oberdiek/ifluatex.sty) (/usr/share/texmf-texlive/tex/generic/oberdiek/ltxcmds.sty)))) (/usr/share/texmf-texlive/tex/generic/oberdiek/atbegshi.sty)) *hyperref using default driver hpdftex* (/usr/share/texmf-texlive/tex/latex/hyperref/hpdftex.def) (./test.aux) (/usr/share/texmf-texlive/tex/latex/hyperref/nameref.sty (/usr/share/texmf-texlive/tex/latex/oberdiek/refcount.sty)) (./test.out) (./test.out) [1{/home/peter/.texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./test.aux) )</usr/share/texmf-texlive/fonts/type1/public/amsfonts /cm/cmr10.pfb></usr/share/texmf-texlive/fonts/type1/public/amsfonts /cm/cmr12.pfb></usr/share/texmf-texlive/fonts/type1/public/amsfonts /cm/cmr17.pfb> Output written on test.pdf (1 page, 33553 bytes). Transcript written on test.log.$
 0

Peter Flynn <peter@silmaril.ie> wrote:

> On 08/02/11 16:07, Tim wrote:

> > Is there a way to set the PDF document properties for the language
> > setting? In Adobe Acrobat you can set it from the Advanced tab in the
> > document properties dialog, but I'm looking for a way to do it from
> > the command line or something I can automate with a script.
> >
> > FWIW, I'm using pdflatex to generate the files and I can use either
> > Linux or Windows to modify the pdfs after they're created.
>
> \usepackage[pdflang=en]{hyperref}
>
> This is supposed to set the PDF language tag, but I just tried it with
> the following MNWE and Acrobat Reader still shows the Language blank, so
> I am crossposting this to c.t.t in the hope someone can show me what I
> have misunderstood.

the entry /Lang in the /Catalog:

> \documentclass{article}
> \usepackage[pdflang=en]{hyperref}
> \begin{document}
> \title{Testing the PDFlang tag in pdflatex}
> \author{Peter Flynn}
> \date{9 Feb 2011}
> \maketitle
> Stuff
> \end{document}

Add \pdfobjcompresslevel=0, to avoid compressing of the catalog.
Then you can inspect the PDF file with a text browser/editor and
can find
.... 0 obj
/Type /Catalog ... /Lang(en)
....
endobj

But AcrobatReader doesn't show it in
Tested with AR7/Linux, AR8/Linux, AR9/Windows.

Can someone send me a small PDF file, please, generated by
Adobe Acrobat with the Language field set, in order to learn what
AR shows in/requires for its language field?

--
Heiko Oberdiek
 0

On 02/09/2011 03:31 PM, Peter Flynn wrote:
> \usepackage[pdflang=en]{hyperref}
>
> This is supposed to set the PDF language tag, but I just tried it
> with the following MNWE and Acrobat Reader still shows the Language
> blank, so I am crossposting this to c.t.t in the hope someone can
> show me what I have misunderstood.

I don't believe you've misunderstood anything.  I just did a test of
my own, and it looks like Acrobat Reader always shows the Language
field blank while Acrobat Pro correctly displays it.  (Setup: Acrobat
Reader 9 on Linux vs. Acrobat 9 Pro on WinXP.)

-- Scott
 0

On Wed, 09 Feb 2011 12:45:35 -0500, Tim Arnold <tim.arnold@sas.com> wrote:

> "tlvp" <tPlOvUpBErLeLsEs@hotmail.com> wrote in message
> news:op.vqly1jrzitl47o@acer250.gateway.2wire.net...
>> On Tue, 08 Feb 2011 11:07:39 -0500, Tim <jtim.arnold@gmail.com> wrote:
>>
>>> hi,
>>> Is there a way to set the PDF document properties for the language
>>> setting? In Adobe Acrobat you can set it from the Advanced tab in the
>>> document properties dialog, but I'm looking for a way to do it from
>>> the command line or something I can automate with a script.
>>>
>>> FWIW, I'm using pdflatex to generate the files and I can use either
>>> Linux or Windows to modify the pdfs after they're created.
>>>
>>> thanks,
>>> --Tim Arnold
>>
>> Try this: find yourself a document whose language setting is as out of the
>> box.
>> After using Acrobat to set it to what you want, save it under a different
>> name.
>> Then do a DOS fc /b (or a Unix DIFF) on the two files to see how they
>> differ,
>> and you'll probably *see* how to find "a way to do it from the command
>> line
>> or something I can automate with a script." :-)
>>
>> HTH. And cheers, -- tlvp
>> --
>> Avant de repondre, jeter la poubelle, SVP
>
> diff treats the files as binary and the only response is 'binary files
> differ'
> --T

A pity. Not what I was led to expect. Sorry. Good luck. And cheers, -- tlvp
--
Avant de repondre, jeter la poubelle, SVP
 0

I can confirm this. Even Acrobat Reader X (win) is not able
to display this, although Acrobat Pro (win) does.

On Feb 10, 4:30=A0am, Scott Pakin <scott+...@pakin.org> wrote:
> On 02/09/2011 03:31 PM, Peter Flynn wrote:
>
> > \usepackage[pdflang=3Den]{hyperref}
>
>
> I don't believe you've misunderstood anything. =A0I just did a test of
> my own, and it looks like Acrobat Reader always shows the Language
> field blank while Acrobat Pro correctly displays it. =A0(Setup: Acrobat
> Reader 9 on Linux vs. Acrobat 9 Pro on WinXP.)

 0

On 10/02/11 03:30, Scott Pakin wrote:
> On 02/09/2011 03:31 PM, Peter Flynn wrote:
>> \usepackage[pdflang=en]{hyperref}
>>
>> This is supposed to set the PDF language tag, but I just tried it
>> with the following MNWE and Acrobat Reader still shows the Language
>> blank, so I am crossposting this to c.t.t in the hope someone can
>> show me what I have misunderstood.
>
> I don't believe you've misunderstood anything.  I just did a test of
> my own, and it looks like Acrobat Reader always shows the Language
> field blank while Acrobat Pro correctly displays it.  (Setup: Acrobat
> Reader 9 on Linux vs. Acrobat 9 Pro on WinXP.)

That would explain it. See the composite screen shot at
http://latex.silmaril.ie/images/test-lang-pdf.png

Heiko, see http://latex.silmaril.ie/test/test.pdf

pdfinfo doesn't seem to see it either.

///Peter
 0

8 Replies
361 Views

Similiar Articles:

7/22/2012 3:20:30 PM