PDF Tools

Overview

Contains multiple Smart Services and Functions for interacting with PDF Documents.

Key Features & Functionality

Smart Services:

  • Merge PDF - Merges multiple PDF documents into a single document.
  • Extract PDF Pages - Extracts a range of pages from an existing PDF into a new PDF.
  • Fill PDF - Populates the fields of a PDF Form and optionally flattens it disallow further changes.
  • Create PDF Content - Allows text to be added to a PDF with control over the style, position, and angle. An existing PDF can be updated or a new one created from scratch.
  • Convert PDF to Image - Creates an array of images or a multi-page tiff from a PDF.
  • Compress PDF - Compresses the images in the PDF to make it smaller.
  • Un-protect and Copy PDF - Using the document password, create an un-protected copy of a protected PDF.
  • Convert Image to PDF - Creates a PDF starting from one or many images. It also supports multi-page tiff images.
  • Encrypt PDF - Encrypts an existing PDF with a password.

Functions:

  • Get PDF Metadata - Retrieves metadata on the PDF: page count, title, author, security, encryption, etc.
  • Get PDF Text - Retrieves the text content from a PDF.
  • Get PDF Form Fields - Retrieves the populated form field values of an unflattened PDF.
  • Get PDF Signature Fields - Retrieves the populated signature field values of an unflattened PDF.
  • Get PDF Bookmarks - Retrieves the list of bookmarks and associated page number in the PDF

Anonymous
  • Hi,

    We resolved this by adding the required library into the plugin jar and since our environment was on the cloud, we raised an Appian Support ticket to deploy the updated jar to our environments.

  • This is the feedback I got from Appian support for the issue with deploying the plug-in code. 

    To resolve this issue, you will need to change the plugin code to explicitly reference PdfField?list^1 so that it matches the internally mapped version of the CDT, then recompile the plugin and attach the new .jar to this case. To do this, please identify each @Input and @Output of type "PdfFields" in the plugin code, the update its annotation following the Action section of KB-1097. For example, the error references the smart service "FillPDFPauseOnError," so you will need to make the following update in the file FillPDFPauseOnError.java:

    Old:
    @Input(required = Required.ALWAYS)
    @Name("PdfFields")
    public void setPdfFields(PdfField[] val) {
    this.pdfFields = val;
    }

    New:
    @Input(required = Required.ALWAYS)
    @Name("PdfFields")
    @Type(namespace = "">types.appiancorp.com/ps", name = "PdfField?list^1")
    public void setPdfFields(PdfField[] val) {
    this.pdfFields = val;
    }

      Any plans to update a new version with these changes?  If not, I will plan on making these changes myself on my end.  Thanks!

  • {
    'type!{urn:appian:ps:pdftools}PdfContent'(
    page: 1,
    xPercent: 10,
    yPercent: 10,
    angle: 0,
    sections: {
    'type!{urn:appian:ps:pdftools}PdfSection'(
    style: null,
    components: {
    'type!{urn:appian:ps:pdftools}PdfText'(
    value: "Example"
    ),
    'type!{urn:appian:ps:pdftools}PdfText'(
    value: "Content"
    )
    }
    )
    }
    )
    }

  • Hi,

    We had been using the Create PDF and it is on our cloud Production Environment as well. Ever since the plugin was updated to the latest version (2.2.10), the node throws an error and on the logs, we see the following error.

    2021-02-22 04:24:29,665 [ThreadPoolTaskExecutor-24675] ERROR com.appiancorp.process.workpoller.WorkItemListener - The following exception occurred while attempting to complete work item [(WorkId: 687, WorkType: {Process Id:268475360,Point Id:268438308} Activity Metadata:{Id:268438308,ACPs:{ActivityClassParameter[name=CreateNewDocument,it=26,v=1],ActivityClassParameter[name=NewDocumentName,it=3,v=PDF Image_2021023419_18],ActivityClassParameter[name=NewDocumentDesc,it=3,v=],
    ActivityClassParameter[name=SaveInFolder,it=12,v=1659],ActivityClassParameter[name=ExistingDocument,it=13,v=<null>],ActivityClassParameter[name=Document,it=13,v=<null>],ActivityClassParameter[name=PauseOnError,it=26,v=0],ActivityClassParameter[name=Contents,it=197,v={TypedValue[it=4080,v={<null>,<null>,<null>,<null>,{{<null>,{TypedValue[it=4074,v={<null>, Trailer Tempreture Proof }]}},{<null>,{TypedValue[it=4074,v={<null>, Trailer Tempreture Set Point: 32,32,72}]}},{<null>,{TypedValue[it=4074,v={<null>, Trailer Box Tempreture: 32,32,22}]}},{<null>,
    {TypedValue[it=4076,v={39662,<null>,0.2}]}}}}]}]},ARVs:{ActivityReturnVariable[name=ErrorOccurred,it=26,v=<null>],ActivityReturnVariable[name=ErrorText,it=3,v=],ActivityReturnVariable[name=NewDocumentCreated,it=13,v=<null>]}}, Response: null, ServerName: execution01)] - Exception: javax.resource.spi.work.WorkCompletedException: java.lang.NoClassDefFoundError: org/apache/commons/beanutils/BeanUtils

    Please help us to understand the error and any solutions to this will be much appreciated. Thanks in advance.

  • I am getting the following error when trying to import PDF Tools in our environment: 

    HTTP Code: 500
    APNX-1-4198-019

    An Error Has Occurred
    Expression evaluation error [evaluation ID = BO9U41F6] : An error occurred while executing a save: java.util.UnknownFormatConversionException: Conversion = 'D'

    When we look into the stdout.log file, the following additional information is available:

    2021-02-22 03:41:31,222 [ajp-nio-0.0.0.0-8009-exec-1130] ERROR com.appiancorp.plugins.LoggingPluginEventListener - Failed to enable Plug-in 'PDF Tools' (pdftools) version 2.2.10: 'The Function Module com.appiancorp.ps.pdftools.PDFToolsFunctions could not be installed due to invalid type: Invalid Type: Unsupported type com.appiancorp.ps.pdftools.types.PdfMetadata. Use the @Type annotation to indicate the type of a function parameter. The deprecated ’type’ attribute for the @Parameter annotation has been removed. (APNX-1-4104-008)'

    Any idea what this issue is referring to?  Thanks.

  • Hi.

    I am trying to use Create PDF Smart service and need help with filling PDFContent data, 

    Is there an example that I can follow?

    Thank you.

  • Hi, i'm using the following code while using this service but it's giving me this error in the process model node Create PDF

    ERROR DETAILS: An error occurred in executing an Activity Class.

    please note that the expression is working fine in the expression rules

    {
      'type!{urn:appian:ps:pdftools}PdfContent'(
        page: 1,
        xPercent: 10,
        yPercent: 10,
        angle: 0,
        sections: {
          'type!{urn:appian:ps:pdftools}PdfSection'(
            style: null,
            components: {
              'type!{urn:appian:ps:pdftools}PdfText'(
                value: "Some"
              ),
              'type!{urn:appian:ps:pdftools}PdfText'(
                value: "text"
              )
            }
          )
        }
      )
    }

  • Hi Joe,

    Having the same issue on 20.4, no previous versions of the plugin were installed before.

    Thanks for the help!

    Failed to enable Plug-in 'PDF Tools' (pdftools) version 2.2.10: 'There was a problem loading the module descriptor: Fill PDF.<br/>com.appiancorp.suiteapi.common.exceptions.AppianRuntimeException: com.appiancorp.process.admin.IncompatibleSmartServiceRegistrationException: The Smart Service Module was invalid: Illegal attempt to change the data type for smart service pdftools.FillPDFPauseOnError, input or output named PdfFields (APNX-1-4104-005)'

  • We are using the Smart Service "PDF from HTML" and facing issue in one of the environment stating:

    bundleName for SmartServiceException, builder.smartServiceClass=class com.appiancorp.ps.xmlfo.ss.AbstractDocumentGeneration

    It is not happening in lower environment (Dev). Need help

  • Hey Arun,

    The v2.2.10 development was for an unrelated manner, but I'll take a look at this and see if we can publish a new version with a fix for your issue.