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 Gregory Buchenberger <gr...@eightfoldconsulting.com> on 2009/12/09 17:59:51 UTC

Rendering accessible PDF from Java

I am working on a Java desktop app that uses FOP trunk. Using the
command line I can run FOP with the -a option to render an accessible
(tagged) PDF. How do I set the option in Java? I've looked at the
methods of FopFactory and FOUserAgent, but can't find one. Any help
would be greatly appreciated.

Gregory Buchenberger

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


Re: Rendering accessible PDF from Java

Posted by Gregory Buchenberger <gr...@eightfoldconsulting.com>.
Thanks for your prompt reply. You guys rock!

Gregory Buchenberger




On Wed, Dec 9, 2009 at 10:40 AM, Jeremias Maerki <de...@jeremias-maerki.ch> wrote:
> We haven't deployed the updated documentation on the web, yet, but you
> can find it here in raw format:
> http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/accessibility.xml?view=markup
>
> Basically, you have to do:
>
> userAgent.setAccessibility(true);
>
> HTH
>
> On 09.12.2009 17:59:51 Gregory Buchenberger wrote:
>> I am working on a Java desktop app that uses FOP trunk. Using the
>> command line I can run FOP with the -a option to render an accessible
>> (tagged) PDF. How do I set the option in Java? I've looked at the
>> methods of FopFactory and FOUserAgent, but can't find one. Any help
>> would be greatly appreciated.
>>
>> Gregory Buchenberger
>
>
>
> 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: Rendering accessible PDF from Java

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
We haven't deployed the updated documentation on the web, yet, but you
can find it here in raw format:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/accessibility.xml?view=markup

Basically, you have to do:

userAgent.setAccessibility(true);

HTH

On 09.12.2009 17:59:51 Gregory Buchenberger wrote:
> I am working on a Java desktop app that uses FOP trunk. Using the
> command line I can run FOP with the -a option to render an accessible
> (tagged) PDF. How do I set the option in Java? I've looked at the
> methods of FopFactory and FOUserAgent, but can't find one. Any help
> would be greatly appreciated.
> 
> Gregory Buchenberger



Jeremias Maerki


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


Re: Rendering accessible PDF from Java

Posted by Simon Pepping <sp...@leverkruid.eu>.
You can look in org.apache.fop.cli.CommandLineOptions.parseOptions()
and its caller parse() to see what the command line does with the
option. The relevant lines here are probably:

this.renderingOptions.put(Accessibility.ACCESSIBILITY, Boolean.TRUE);
foUserAgent.getRendererOptions().putAll(renderingOptions);

which is something which you can do in your own code as well.

Simon

On Wed, Dec 09, 2009 at 09:59:51AM -0700, Gregory Buchenberger wrote:
> I am working on a Java desktop app that uses FOP trunk. Using the
> command line I can run FOP with the -a option to render an accessible
> (tagged) PDF. How do I set the option in Java? I've looked at the
> methods of FopFactory and FOUserAgent, but can't find one. Any help
> would be greatly appreciated.

-- 
Simon Pepping
home page: http://www.leverkruid.eu

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