You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Roger Pilkey (Jira)" <ji...@apache.org> on 2020/11/12 13:51:00 UTC
[jira] [Commented] (FOP-2984) Accessibility - Adobe Pro DC tool
reports PDF not tagged for accessibility
[ https://issues.apache.org/jira/browse/FOP-2984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17230637#comment-17230637 ]
Roger Pilkey commented on FOP-2984:
-----------------------------------
I found that the tags
{code:java}
<accessibility>true</accessibility>{code}
and
{code:java}
<pdf-ua-mode>PDF/A-1a</pdf-ua-mode>{code}
in a .conf file were not doing anything when using the library in a .jsp. I think I tried it using fop on the commandline too, but I don't remember. Maybe something was overriding it somewhere, I don't know.
So my solution was to set the property in the userAgent object in the jsp:
{code:java}
userAgent.setAccessibility(true);{code}
and
{code:java}
userAgent.getRendererOptions().put("pdf-ua-mode", "PDF/UA-1");{code}
or
{code:java}
userAgent.getRendererOptions().put("pdf-ua-mode", "PDF/A-1a");{code}
I'm just fumbling along here myself, but I hope that helps.
Roger
> Accessibility - Adobe Pro DC tool reports PDF not tagged for accessibility
> ---------------------------------------------------------------------------
>
> Key: FOP-2984
> URL: https://issues.apache.org/jira/browse/FOP-2984
> Project: FOP
> Issue Type: Bug
> Components: renderer/pdf
> Affects Versions: 2.3
> Reporter: A Alubala
> Priority: Major
>
>
> Attached below is the fop config file in use. After generating the PDF file, the Adobe Pro Accessibility tool reports the PDF as not being tagged.
>
> <?xml version="1.0"?>
> <fop version="2.3">
> <accessibility>true</accessibility>
> <base>./</base>
> <font-base>./</font-base>
> <strict-configuration>true</strict-configuration>
> <strict-validation>false</strict-validation>
> <!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels in SVG and bitmap images, default: 72dpi -->
> <source-resolution>72</source-resolution>
> <!-- Target resolution in dpi (dots/pixels per inch) for specifying the target resolution for generated bitmaps, default: 72dpi -->
> <target-resolution>72</target-resolution>
> <!-- Default page-height and page-width, in case
> value is specified as auto -->
> <default-page-settings height="11in" width="8in"/>
> <!-- Information for specific renderers -->
> <!-- Uses renderer mime type for renderers -->
> <renderers>
> <renderer mime="application/pdf">
> <pdf-ua-mode>PDF/UA-1</pdf-ua-mode>
> <version>1.4</version>
> <filterList>
> <!-- provides compression using zlib flate (default is on) -->
> <value>flate</value>
> </filterList>
> <fonts>
> <font embed-url="fonts/arialuni.ttf" kerning="yes">
> <font-triplet name="ArialUnicodeMS" style="normal" weight="normal"/>
> <font-triplet name="ArialUnicodeMS" style="normal" weight="bold"/>
> <font-triplet name="ArialUnicodeMS" style="italic" weight="bold"/>
> <font-triplet name="ArialUnicodeMS" style="italic" weight="normal"/>
> </font>
> </fonts>
> </renderer>
> <renderer mime="application/postscript">
> <!-- This option forces the PS renderer to rotate landscape pages -->
> <!--auto-rotate-landscape>true</auto-rotate-landscape-->
> </renderer>
> <renderer mime="application/vnd.hp-PCL">
> </renderer>
> <renderer mime="image/svg+xml">
> <format type="paginated"/>
> <link value="true"/>
> <strokeText value="false"/>
> </renderer>
> <renderer mime="application/awt">
> </renderer>
> <renderer mime="image/png">
> <!--transparent-page-background>true</transparent-page-background-->
> </renderer>
> <renderer mime="image/tiff">
> <!--transparent-page-background>true</transparent-page-background-->
> <!--compression>CCITT T.6</compression-->
> </renderer>
> <renderer mime="text/xml">
> </renderer>
> <renderer mime="text/plain">
> <pageSize columns="80"/>
> </renderer>
> </renderers>
> </fop>
>
>
>
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:import href="./templates/DefaultFonts.xsl"/> <xsl:import href="./templates/FOCommon.xsl"/> <xsl:import href="./templates/SectionA.xsl"/> <xsl:import href="./templates/SectionB.xsl"/> <xsl:template match="Document"><fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions"> <fo:layout-master-set> <xsl:call-template name="SimplePageMaster-HeaderBodyFooter"/> </fo:layout-master-set> <fo:declarations> <x:xmpmeta xmlns:x="adobe:ns:meta/"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:title>PDF Ttile</dc:title> <dc:creator>Auto Generated</dc:creator> <dc:description>PDF Description</dc:description> </rdf:Description> </rdf:RDF> </x:xmpmeta> </fo:declarations> <fo:page-sequence master-reference="HeaderBodyFooter"> <fo:static-content flow-name="xsl-region-before"> <xsl:element name="fo:wrapper" use-attribute-sets="DefaultFontFamily"> <xsl:apply-templates select="./SectionA"/> </xsl:element> </fo:static-content> <fo:static-content flow-name="xsl-region-after"> <xsl:element name="fo:wrapper" use-attribute-sets="DefaultFontFamily"> <fo:block text-align="center">Page: <fo:page-number/></fo:block> </xsl:element> </fo:static-content> <fo:flow flow-name="xsl-region-body"> <xsl:element name="fo:wrapper" use-attribute-sets="DefaultFontFamily"> <xsl:apply-templates select="./SectionB"/> </xsl:element> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> </xsl:stylesheet>
>
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)