You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Li, Hao" <li...@peacetech.com> on 2008/01/15 18:31:05 UTC

language specification for PDF document

Hi All,

Our goal is: Create a PDF document via FOP with the language set to
English (en) at the document level.

Is there a way in Apache FOP to achieve this goal? Does the common
hyphenation property "language" applicable?


Your help is greatly appreciated,


Henry 


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: language specification for PDF document

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Jan 15, 2008, at 21:29, Li, Hao wrote:

Hi

> Is this document level "language identifier" part of XSL-FO  
> standard and
> its usage is "<fo:root language="en">" like Chris suggested? Or can it
> be xml:lang attribute?

The xml:lang 'attribute' in XSL-FO is classified as a shorthand  
(http://www.w3.org/TR/xsl11/#xml.lang), and as such, in theory it  
could be used to set the native XSL-FO 'language' property (but at  
the same time also 'country' and 'script', if applicable).

In practice, this shorthand is not-yet-implemented in FOP (http:// 
xmlgraphics.apache.org/fop/compliance.html#fo-property-xml:lang).
Even if it would be, it would still suffer the same limitations as  
the 'language' property.


Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: language specification for PDF document

Posted by "Li, Hao" <li...@peacetech.com>.
Hi Jeremias,

Is this document level "language identifier" part of XSL-FO standard and
its usage is "<fo:root language="en">" like Chris suggested? Or can it
be xml:lang attribute?

Thanks a lot.

Henry

-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch] 
Sent: Tuesday, January 15, 2008 2:54 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: language specification for PDF document

The "language identifier" (for the natural language of the document) is
part of the chapter about "Logical Structure" in the PDF specification.
That is something FOP doesn't support, yet.

On 15.01.2008 20:37:54 Li, Hao wrote:
> Thanks Chris.
> 
> I followed your instruction to generate the pdf. After I open it in
> acrobat, under file->document properties->advanced->reading options,
the
> language option is still blank. Am I missing something?
> 
> Please help. Thank you very much.
> 
> -----Original Message-----
> From: Chris Bowditch [mailto:bowditch_chris@hotmail.com] 
> Sent: Tuesday, January 15, 2008 12:58 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: language specification for PDF document
> 
> Li, Hao wrote:
> 
> > Hi All,
> > 
> > Our goal is: Create a PDF document via FOP with the language set to
> > English (en) at the document level.
> > 
> > Is there a way in Apache FOP to achieve this goal? Does the common
> > hyphenation property "language" applicable?
> 
> Yes you can specify language property on fo:root element, e.g.
> 
> <fo:root language="en">
> <fo:layout-master-set>
> ...
> <fo:page-sequence master-reference="a4">
> ...
> </fo:root>
> 
> Chris


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: language specification for PDF document

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
The "language identifier" (for the natural language of the document) is
part of the chapter about "Logical Structure" in the PDF specification.
That is something FOP doesn't support, yet.

On 15.01.2008 20:37:54 Li, Hao wrote:
> Thanks Chris.
> 
> I followed your instruction to generate the pdf. After I open it in
> acrobat, under file->document properties->advanced->reading options, the
> language option is still blank. Am I missing something?
> 
> Please help. Thank you very much.
> 
> -----Original Message-----
> From: Chris Bowditch [mailto:bowditch_chris@hotmail.com] 
> Sent: Tuesday, January 15, 2008 12:58 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: language specification for PDF document
> 
> Li, Hao wrote:
> 
> > Hi All,
> > 
> > Our goal is: Create a PDF document via FOP with the language set to
> > English (en) at the document level.
> > 
> > Is there a way in Apache FOP to achieve this goal? Does the common
> > hyphenation property "language" applicable?
> 
> Yes you can specify language property on fo:root element, e.g.
> 
> <fo:root language="en">
> <fo:layout-master-set>
> ...
> <fo:page-sequence master-reference="a4">
> ...
> </fo:root>
> 
> Chris


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: language specification for PDF document

Posted by Chris Bowditch <bo...@hotmail.com>.
Li, Hao wrote:

> Hi All,
> 
> Our goal is: Create a PDF document via FOP with the language set to
> English (en) at the document level.
> 
> Is there a way in Apache FOP to achieve this goal? Does the common
> hyphenation property "language" applicable?

Yes you can specify language property on fo:root element, e.g.

<fo:root language="en">
<fo:layout-master-set>
...
<fo:page-sequence master-reference="a4">
...
</fo:root>

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: language specification for PDF document

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
We had a short off-list exchange and it turned out that just supporting
the natural language in the PDF isn't enough as Henry needs the PDFs to
pass Acrobat's accessibility check which means that PDF's "Document
Structure" feature needs to be supported. And that would be a larger
change, potentially even impacting FOP's architecture at some points.

On 16.01.2008 20:43:08 Li, Hao wrote:
> Andreas and Jeremias,
> 
> RenderX supports this feature by specifying xml:lang in the <fo:root>
> tag:
> <fo:root xml:lang="en">
> 
> We are eager to know if it can be done in FOP in a short time. We are
> willing to pay a reasonable amount for the implementation.   
> 
> Thank you very much,
> 
> Henry
> 
> -----Original Message-----
> From: Andreas L Delmelle [mailto:a_l.delmelle@pandora.be] 
> Sent: Tuesday, January 15, 2008 5:47 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: language specification for PDF document
> 
> On Jan 15, 2008, at 23:36, Li, Hao wrote:
> 
> Hi Henry
> 
> > Does it mean that the implementation will be Apache FOP specific,
> > because there is no such XSL-FO standard property for document level
> > language of PDF?
> 
> Basically: yes. There is no connection/obligation of a FO processor  
> to any particular output format, like PDF or PostScript.
> Also, it is currently unimplemented at the moment, so should someone  
> decide to have a shot at implementing it, and he does not know what  
> AntennaHouse or RenderX do with the related properties (language/ 
> country/script), then it is very likely that an eventual  
> implementation will be specific to Apache FOP.
> 
> 
> Cheers
> 
> Andreas



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: language specification for PDF document

Posted by "Li, Hao" <li...@peacetech.com>.
Andreas and Jeremias,

RenderX supports this feature by specifying xml:lang in the <fo:root>
tag:
<fo:root xml:lang="en">

We are eager to know if it can be done in FOP in a short time. We are
willing to pay a reasonable amount for the implementation.   

Thank you very much,

Henry

-----Original Message-----
From: Andreas L Delmelle [mailto:a_l.delmelle@pandora.be] 
Sent: Tuesday, January 15, 2008 5:47 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: language specification for PDF document

On Jan 15, 2008, at 23:36, Li, Hao wrote:

Hi Henry

> Does it mean that the implementation will be Apache FOP specific,
> because there is no such XSL-FO standard property for document level
> language of PDF?

Basically: yes. There is no connection/obligation of a FO processor  
to any particular output format, like PDF or PostScript.
Also, it is currently unimplemented at the moment, so should someone  
decide to have a shot at implementing it, and he does not know what  
AntennaHouse or RenderX do with the related properties (language/ 
country/script), then it is very likely that an eventual  
implementation will be specific to Apache FOP.


Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: language specification for PDF document

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Jan 15, 2008, at 23:36, Li, Hao wrote:

Hi Henry

> Does it mean that the implementation will be Apache FOP specific,
> because there is no such XSL-FO standard property for document level
> language of PDF?

Basically: yes. There is no connection/obligation of a FO processor  
to any particular output format, like PDF or PostScript.
Also, it is currently unimplemented at the moment, so should someone  
decide to have a shot at implementing it, and he does not know what  
AntennaHouse or RenderX do with the related properties (language/ 
country/script), then it is very likely that an eventual  
implementation will be specific to Apache FOP.


Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: language specification for PDF document

Posted by "Li, Hao" <li...@peacetech.com>.
Thanks Andreas.

Does it mean that the implementation will be Apache FOP specific,
because there is no such XSL-FO standard property for document level
language of PDF?

Thank you very much,

Henry

-----Original Message-----
From: Andreas L Delmelle [mailto:a_l.delmelle@pandora.be] 
Sent: Tuesday, January 15, 2008 2:47 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: language specification for PDF document

On Jan 15, 2008, at 20:37, Li, Hao wrote:

Hi

> I followed your instruction to generate the pdf. After I open it in
> acrobat, under file->document properties->advanced->reading  
> options, the
> language option is still blank. Am I missing something?

As far as I know, the 'language' property is used by FOP *only* for  
determining the hyphenation pattern file to use (if hyphenation is  
enabled).
I don't think that the property is used for anything else (and so,  
will not yet be reflected in the document properties)

It's probably not too difficult to implement (given enough time and  
enough knowledge about the PDF Specification). Patches are always  
welcome.


Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: language specification for PDF document

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Jan 15, 2008, at 20:37, Li, Hao wrote:

Hi

> I followed your instruction to generate the pdf. After I open it in
> acrobat, under file->document properties->advanced->reading  
> options, the
> language option is still blank. Am I missing something?

As far as I know, the 'language' property is used by FOP *only* for  
determining the hyphenation pattern file to use (if hyphenation is  
enabled).
I don't think that the property is used for anything else (and so,  
will not yet be reflected in the document properties)

It's probably not too difficult to implement (given enough time and  
enough knowledge about the PDF Specification). Patches are always  
welcome.


Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: language specification for PDF document

Posted by "Li, Hao" <li...@peacetech.com>.
Thanks Chris.

I followed your instruction to generate the pdf. After I open it in
acrobat, under file->document properties->advanced->reading options, the
language option is still blank. Am I missing something?

Please help. Thank you very much.

-----Original Message-----
From: Chris Bowditch [mailto:bowditch_chris@hotmail.com] 
Sent: Tuesday, January 15, 2008 12:58 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: language specification for PDF document

Li, Hao wrote:

> Hi All,
> 
> Our goal is: Create a PDF document via FOP with the language set to
> English (en) at the document level.
> 
> Is there a way in Apache FOP to achieve this goal? Does the common
> hyphenation property "language" applicable?

Yes you can specify language property on fo:root element, e.g.

<fo:root language="en">
<fo:layout-master-set>
...
<fo:page-sequence master-reference="a4">
...
</fo:root>

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org