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.
  • Split PDF Pages In Half - Supports spitting individual pdf pages horizontally or vertically with an overlap.

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
  • aaah sorry to read but nice input. instantly checked for the auther and its even appian themselves. Hoping they fixing it.

  • As of version 2.5.2 (and found on the older editions we try, such as 2.2.5 and 2.2.9), the PDF to Image smart service results in Filled Checkboxes (from a user-fillable form) rendering not as checked boxes, but as boxes with a smaller box inside them (as if, instead of a "check mark", each checkbox is being given a "broken image placeholder").  This is a big problem for us as this functionality was the one way we'd come up with to overcome a major blocker otherwise, but will be useless to us with this bug in-place as it's incomprehensible to end users.

  • Hi,

    Any update please as this is causing production issues requiring manual intervention on many image conversions each day.

    Thanks

  • Hi,

    Just updated to 2.5.2 on Appian 24.2 using smart service convert Image to pdf.

    Following update errors are recurring. The errors from the system log are shown below. Any advice to resolve pls?

    Thanks

    2024-08-08 06:12:52,871 [ThreadPoolTaskExecutor-7808] ERROR com.appiancorp.process.workpoller.WorkItemListener - The following exception occurred while attempting to complete work item [[WorkId: 459, EngineId: execution00, Request: UnattendedJavaActivityRequest:102683 as deployment.admin by deployment.admin, ProcessId: 77271812, ProcessModelId: 213, Response: null]] - Exception: 
    javax.resource.spi.work.WorkCompletedException: java.lang.NoClassDefFoundError: javax/imageio/stream/ImageInputStream
    	at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:244)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    	at java.base/java.lang.Thread.run(Thread.java:840)
    Caused by: java.lang.NoClassDefFoundError: javax/imageio/stream/ImageInputStream
    	at com.github.jaiimageio.impl.plugins.tiff.TIFFImageReaderSpi.canDecodeInput(TIFFImageReaderSpi.java:101)
    	at java.desktop/javax.imageio.ImageIO$CanDecodeInputFilter.filter(ImageIO.java:573)
    	at java.desktop/javax.imageio.spi.FilterIterator.advance(ServiceRegistry.java:873)
    	at java.desktop/javax.imageio.spi.FilterIterator.<init>(ServiceRegistry.java:867)
    	at java.desktop/javax.imageio.spi.ServiceRegistry.getServiceProviders(ServiceRegistry.java:516)
    	at java.desktop/javax.imageio.ImageIO.getImageReaders(ImageIO.java:654)
    	at com.appiancorp.ps.pdftools.ConvertImageToPDF.run(ConvertImageToPDF.java:72)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:136)
    	at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:54)
    	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:28)
    	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:22)
    	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:143)
    	at com.appiancorp.process.engine.ProcessContinuationRequest.executeOuter(ProcessContinuationRequest.java:68)
    	at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:136)
    	at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:36)
    	at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:110)
    	at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:241)
    	... 3 more
    Caused by: java.lang.ClassNotFoundException: Unable to load class 'javax.imageio.stream.ImageInputStream' because the bundle wiring for pdftools is no longer valid.
    	... 26 more
    

  • Hi,

    Just updated to 2.5.2 on Appian 24.2.

    Using smart service to Convert mage to PDF and the following error occurs. Any ideas?

    2024-08-08 06:12:52,871 [ThreadPoolTaskExecutor-7808] ERROR com.appiancorp.process.workpoller.WorkItemListener - The following exception occurred while attempting to complete work item [[WorkId: 459, EngineId: execution00, Request: UnattendedJavaActivityRequest:102683 as deployment.admin by deployment.admin, ProcessId: 77271812, ProcessModelId: 213, Response: null]] - Exception: 
    javax.resource.spi.work.WorkCompletedException: java.lang.NoClassDefFoundError: javax/imageio/stream/ImageInputStream
    	at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:244)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    	at java.base/java.lang.Thread.run(Thread.java:840)
    Caused by: java.lang.NoClassDefFoundError: javax/imageio/stream/ImageInputStream
    	at com.github.jaiimageio.impl.plugins.tiff.TIFFImageReaderSpi.canDecodeInput(TIFFImageReaderSpi.java:101)
    	at java.desktop/javax.imageio.ImageIO$CanDecodeInputFilter.filter(ImageIO.java:573)
    	at java.desktop/javax.imageio.spi.FilterIterator.advance(ServiceRegistry.java:873)
    	at java.desktop/javax.imageio.spi.FilterIterator.<init>(ServiceRegistry.java:867)
    	at java.desktop/javax.imageio.spi.ServiceRegistry.getServiceProviders(ServiceRegistry.java:516)
    	at java.desktop/javax.imageio.ImageIO.getImageReaders(ImageIO.java:654)
    	at com.appiancorp.ps.pdftools.ConvertImageToPDF.run(ConvertImageToPDF.java:72)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:136)
    	at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:54)
    	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:28)
    	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:22)
    	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:143)
    	at com.appiancorp.process.engine.ProcessContinuationRequest.executeOuter(ProcessContinuationRequest.java:68)
    	at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:136)
    	at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:36)
    	at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:110)
    	at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:241)
    	... 3 more
    Caused by: java.lang.ClassNotFoundException: Unable to load class 'javax.imageio.stream.ImageInputStream' because the bundle wiring for pdftools is no longer valid.
    	... 26 more

     Thanks

  • Hello,

    We attempted to use the Convert Image to PDF smart service, but received the error below. After further investigation, it appears that ImageIO does not support the conversion of CMYK-encoded images. Is there a plan to enable this functionality? If not, are there ways that we can restrict Appian file uploads to exclude CMYK images?

    ERROR com.appiancorp.ps.pdftools.ConvertImageToPDF - Error converting image to PDF
    java.io.IOException: Image file format not supported by ImageIO


  • Hello team! Is there any chance that we could somehow partially flatten some PDF fields?

  • v2.5.2 Release Notes
    • Upgraded bcprov-jdk15to18 library
  • v2.5.1 Release Notes
    • We fixed a bug with 'fill pdf' smart service which caused issues in dealing with image files other than jpeg.

  • Out of curiosity, is there any plan to fix this particularly problematic error in the PDF Tools official documentation?  I just downloaded a fresh copy to see if the error was still there compared to the copy I last downloaded ~4 years ago, but it's still the same.