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 raw list of bookmarks in the PDF.

Anonymous
  • Hi Richard
    Could you please help me out to convert pdf to csv? I am using pdf tools as well. Ho w can I get a pdf text?

  • Hi Chiara, 

    It tested SVG with the current version. I got the following errormessage from the plugin:

    "Error converting image to PDF"
    so it looks like SVG is not in the scope.

    Kind regards,
    Richard

  • If this a possibility I would certainly be interested. But to start with I was just trying to understand if the function could be supported. Thank you .

  • Hi Chiara, i will evaluate this, if you are interested :)

  • Hello, I am trying to use the "Convert Image to PDF" Smart Service.

    Trying to convert an .SVG file to PDF, an unspecified error occurs. Is this as intended? Are SVG images not supported?

  • Hi

    Previously working "Convert Image to PDF" smart service fails after plugin upgrade to v2.4.0 on 22.1 cloud environment.

    Using the "Convert Image to PDF" smart service to convert a tif to pdf.

    Delete plugin and re-added. Same error occurs.

    Process model fails with an error of "Convert Image to PDF   An error occurred in executing an Activity Class."

    The logs show the following:-

    2022-05-11 14:17:54,251 [ThreadPoolTaskExecutor-49682] ERROR com.appiancorp.process.workpoller.WorkItemListener - The following exception occurred while attempting to complete work item [[WorkId: 647, EngineId: execution02, Request: UnattendedJavaActivityRequest:536879925 as XXX by XXX, ProcessId: 2156450, ProcessModelId: 164, Response: null]] - Exception:
    javax.resource.spi.work.WorkCompletedException: java.lang.NoClassDefFoundError: javax/imageio/ImageReadParam
    at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:247)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
    Caused by: java.lang.NoClassDefFoundError: javax/imageio/ImageReadParam
    at com.github.jaiimageio.impl.plugins.tiff.TIFFImageReaderSpi.createReaderInstance(TIFFImageReaderSpi.java:118)
    at javax.imageio.spi.ImageReaderSpi.createReaderInstance(ImageReaderSpi.java:320)
    at javax.imageio.ImageIO$ImageReaderIterator.next(ImageIO.java:529)
    at javax.imageio.ImageIO$ImageReaderIterator.next(ImageIO.java:513)
    at com.appiancorp.ps.pdftools.ConvertImageToPDF.run(ConvertImageToPDF.java:79)
    at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:136)
    at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:52)
    at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:136)
    at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:130)
    at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:27)
    at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:130)
    at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:88)
    at com.appiancorp.process.engine.UnattendedJavaActivityRequestResponseCreator.getJavaActivityResultResponse(UnattendedJavaActivityRequestResponseCreator.java:21)
    at com.appiancorp.process.engine.UnattendedJavaActivityRequest.getJavaActivityResultResponse(UnattendedJavaActivityRequest.java:67)
    at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55)
    at com.appiancorp.common.persistence.data.AppianDataUserContextProvider.executeWithConsistentDataReads(AppianDataUserContextProvider.java:135)
    at com.appiancorp.process.engine.ProcessContinuationRequest.executeOuter(ProcessContinuationRequest.java:68)
    at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:124)
    at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:36)
    at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:103)
    at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239)
    ... 3 more
    Caused by: java.lang.ClassNotFoundException: Unable to load class 'javax.imageio.ImageReadParam' because the bundle wiring for pdftools is no longer valid.
    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1610)
    at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2064)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    ... 24 more
    Exception in thread "ThreadPoolTaskExecutor-49682" java.lang.NoClassDefFoundError: javax/imageio/ImageReadParam
    at com.github.jaiimageio.impl.plugins.tiff.TIFFImageReaderSpi.createReaderInstance(TIFFImageReaderSpi.java:118)
    at javax.imageio.spi.ImageReaderSpi.createReaderInstance(ImageReaderSpi.java:320)
    at javax.imageio.ImageIO$ImageReaderIterator.next(ImageIO.java:529)
    at javax.imageio.ImageIO$ImageReaderIterator.next(ImageIO.java:513)
    at com.appiancorp.ps.pdftools.ConvertImageToPDF.run(ConvertImageToPDF.java:79)
    at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:136)
    at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:52)
    at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:136)
    at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:130)
    at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:27)
    at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:130)
    at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:88)
    at com.appiancorp.process.engine.UnattendedJavaActivityRequestResponseCreator.getJavaActivityResultResponse(UnattendedJavaActivityRequestResponseCreator.java:21)
    at com.appiancorp.process.engine.UnattendedJavaActivityRequest.getJavaActivityResultResponse(UnattendedJavaActivityRequest.java:67)
    at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55)
    at com.appiancorp.common.persistence.data.AppianDataUserContextProvider.executeWithConsistentDataReads(AppianDataUserContextProvider.java:135)
    at com.appiancorp.process.engine.ProcessContinuationRequest.executeOuter(ProcessContinuationRequest.java:68)
    at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:124)
    at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:36)
    at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:103)
    at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
    Caused by: java.lang.ClassNotFoundException: Unable to load class 'javax.imageio.ImageReadParam' because the bundle wiring for pdftools is no longer valid.
    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1610)
    at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2064)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    ... 24 more

  • Unfortunately not. Still unresolved

  • Having the same issue, had any luck with this in the last couple of days?

  • Hello,

    I am trying to convert a PDF document to image through the relative node "Convert PDF to Image", but there is an error during Activity Class execution. The details report the following:

    bundleName for SmartServiceException, builder.smartServiceClass=class com.appiancorp.ps.pdftools.AbstractPDFDocumentGeneration 

    I have populated the fields for inputs and outputs as follows:

    Inputs:

    • Document: pv!document (type Document)
    • Save In Folder: pointer constant (type Folder)
    • Image Format: JPG (type Text)
    • DPI Resolution: left blank (not mandatory field)

    Outputs:

    • Images Created: docAsImage (Type Document, Multiple)

    Any help appreciated.

    Best regards.

  • Release Notes - v2.4.0
    • Added ability to configure resolution of files outputted from Image to PDF smart service