Class AutotagPDFJob

  • public class AutotagPDFJob
    extends PDFServicesJob
    A job that creates PDF documents with enhanced readability from existing PDF documents. An optional tagging report can also be generated which contains the information about the tags that the tagged output PDF document contains.

    Accessibility tags, used by assistive technology such as screen reader are required to make PDF files compliant. However, the generated PDF is not guaranteed to comply with accessibility standards such as WCAG and PDF/UA as there could be a need to perform further downstream remediation to meet those standards.

    Sample usage:

                 InputStream inputStream = new FileInputStream(new File("SOURCE_PATH"));
                 Credentials credentials = new ServicePrincipalCredentials(
                 PDFServices pdfServices = new PDFServices(credentials);
                 Asset asset = pdfServices.upload(inputStream, PDFServicesMediaType.PDF.getMediaType());
                 AutotagPDFJob autotagPDFJob = new AutotagPDFJob(asset);
                 String location = pdfServices.submit(autotagPDFJob);
                 PDFServicesResponse<AutotagPDFResult> pdfServicesResponse = pdfServices.getJobResult(location, AutotagPDFResult.class);
                 Asset assetTaggedPDF = pdfServicesResponse.getResult().getTaggedPDF();
                 StreamAsset streamAsset = pdfServices.getContent(assetTaggedPDF);
    • Constructor Detail

      • AutotagPDFJob

        public AutotagPDFJob​(Asset asset)
        Constructs a new AutotagPDFJob instance with input asset.
        asset - The input asset for the job; can not be null.
    • Method Detail

      • setOutput

        public AutotagPDFJob setOutput​(Asset asset)
        Sets the output asset for the job. @note External assets can be set as output only when input is external asset as well
        asset - Asset object representing the output asset; can not be null.
        AutotagPDFJob instance