Jump to content
  • JasperReport 4 generated tagged pdf file doesn't have SECTION 508 COMPLIANCE


    baijingyu
    Assigned User teodord
    CategoryBug report
    PriorityHigh
    ReproducibilityAlways
    ResolutionFixed
    SeverityMajor
    StatusResolved

    I tried all JasperReport 4 versions and used sample demo provided by downloaded JasperReport project but found it can NOT generate an accessible tagged PDF file. I used TabularReport.jrxml without any change and it did generate a tagged pdf "TabularReport.pdf" but when I try to use JAWS (a screen reader software) to read the pdf file, JAWS can only read image part and skip whole table section even PDF reader verified the file as a tagged file. The "JasperReports Ultimate Guide third edition" clearly said it can generates section 508 compliance tagged pdf file but obviously it didn't do that for me. Can someone from JasperReport clarify this please? Thanks.

     


    Attachments: TabularReport.pdf

    User Feedback

    Recommended Comments

    I found the way how to fix that issue - I had to recompile jasper reports in order to do that.

     

    in JRPdfExporterTagHelper you should update startText to be like the following:

     

    protected void startText(String text)

    {

    if (isTagged)

    {

    // PdfStructureElement parentTag = tableCellTag == null ? (tableHeaderTag == null ? allTag : tableHeaderTag): tableCellTag;

    // PdfStructureElement textTag = new PdfStructureElement(parentTag, PdfName.TEXT);

    PdfStructureElement textTag = new PdfStructureElement((PdfStructureElement)tagStack.peek(), PdfName.TEXT);

    textTag.put(PdfName.ALT, new PdfString(text));

    pdfContentByte.beginMarkedContentSequence(textTag);

    }

    }

     

     

    Main trick here is to add

     

    textTag.put(PdfName.ALT, new PdfString(text));

     

    Also change JRPdfExporter to change caller from

    tagHelper.startText();

    to

    tagHelper.startText(styledText.getText());

    Link to comment
    Share on other sites

    I tested rukus' fix and it does work using JAWS13 screen reader. May I request this fix to be verified and put into the next JasperReports release? Thanks.

     

     

    Link to comment
    Share on other sites

    Changed Resolution from Open to Fixed

    Changed Status from Assigned to Resolved


    Hi,The PDF 508C support was revisited in the latest JR 6.2.0 release and is now hopefully fixed.Thanks,Teodor
    Link to comment
    Share on other sites


×
×
  • Create New...