Create Accessible PDF/UA compliant

Hello

I am currently on an old version of Aspose PDF for .NET (11.3) for a web application using XSLT files to generate the PDF from. I want to generate files meeting PDF/UA standards. Is it possible on this version of the software?

If not how will I achieve this standard on the latest version of Aspose?

Many Thanks
Richard

@Richard.M

The functionality to generate PDF/UA compliant PDFs have been introduced in newer versions of the API. You can achieve this requirement by using the latest version of the API. Please check following article(s) in API document for more information:

Many thanks. I will get the version of the API updated and look through the documentation.

@Richard.M

Sure and please let us know in case you face any issue. You can apply for a 30-days free temporary license as well in order to evaluate the functionality of the latest version of the API before upgrading your existing subscription.

Hi

I have upgraded to v20.10. I am trying to generate a PDF using an XSLT document.

From the documentation I can see that it is possible to tag individual elements generated in C# however I want to generate the wording and formatting within the XSLT and tag. As it stands the PDF\UA compliance fails after converting the memory stream to PDF_UA_1.

Problem Severity=“Error” Clause=“7.1” ObjectID="" Page=“1” Convertable=“False” Code=“7.1:1.1(14.8)” Text object not tagged

Also is it possible to set the document title within the XSLT? The code used to generate PDFs is shared to produce multiple PDF files.

Thanks

@Richard.M

We need to investigate against your above requirements.

We were unable to find any attachment with your post. Could you please share sample PDFs and code snippet with us so that we can try to replicate the issue at our side and address it accordingly.

Hi

PDF, very basic just for a proof of concept
Test.Pdf (3.3 KB)

Here is the xslt that I generated it from

<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">

    <Document xmlns="Aspose.Pdf" IsAutoHyphenated="false">
        <Page>
            <TextFragment>
                <TextSegment>
                    Hello World!
                </TextSegment>
            </TextFragment>
        </Page>
    </Document>
</xsl:template>
</xsl:stylesheet>

Code Snippet

    private MemoryStream CreatePdfUsingAsposePdf(Stream xmlDocumentStream, Stream xslDocumentStream)
    {
        var asposePdfXmlStream = CreateAsposePdfXmlStream(xmlDocumentStream, xslDocumentStream);

        var memoryStream = new MemoryStream();

        var pdf = new Document();

        var taggedContent = pdf.TaggedContent;

        taggedContent.SetLanguage("en-GB");

        pdf.DisplayDocTitle = true;

        pdf.BindXml(asposePdfXmlStream);
        pdf.Convert(memoryStream, PdfFormat.PDF_UA_1, ConvertErrorAction.Delete);
        pdf.Save(memoryStream);

        memoryStream.Flush();
        memoryStream.Position = 0;

        return memoryStream;
    }

My main concern is whether I can created a tagged/acessible document generated from an XSLT file.

Thanks

@Richard.M

Thanks for sharing further details.

We would like to share with you that it is yet to be investigated whether tagged/accessible PDF files can be generated from XSLT file or not. For the sake of investigation, an investigation ticket as PDFNET-49010 has been logged in our issue tracking system. We have associated it with your forum thread so that you will receive a notification once it is resolved. Please be patient and spare us some time.

We are sorry for the inconvenience.

Is there any update on this query?
We have a similar request from a client.
We make extensive use of the old XSL method to generate pdf from XML.

@chris_savage

We are afraid that the earlier logged ticket has not been yet resolved. However, could you please share your sample XSL and sample code snippet for our reference so that we can test the scenario and address the issue accordingly?

Attached is a test xsl and output pdf, if that is any help.
TestDocument.zip (47.6 KB)

@chris_savage

The earlier logged ticket is about generating Tagged PDF documents using XML/XSL. We have updated the ticket information with the details that you have provided and we will investigate it from this perspective as well. We will surely inform you as soon as we have some updates about ticket resolution. Please be patient and spare us some time.

We are sorry for the inconvenience.

Hi, Is there any update on this ticket?

@atyagi39

Regretfully, the earlier logged ticket could not get resolved due to other pending issues in the queue. Nevertheless, your concerns have already been recorded and we will inform you as soon as we have some updates in this regard. We apologize for your inconvenience.