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
Parents
  • We are having serious Memory leak / Heap memory Overshoot issues which are causing server crash incidents. We have used PDF to image and image to PDF plugins to cater for one of the client requirements. 

    The same is happening when the plugin is being executed for more than 10 concurrent iterations. Below are the comments from the Appian support team who have identified the problem with the plugin. Could you please check below and resolve ASAP and let me know if you need anything from logs standpoint.

    ------------------------------------------------------------------

    Hi Team,
     
    The application server restarted on. I have investigated the leak suspects. The application server restarted due to the pdf tools plugin. Here is the thread that is responsible for the app server restart.
     
    ======================================================================================================================================================
    Thread 0x7350efca8
      at java.util.zip.Deflater.deflateBytes(J[BIII)I (Native Method)
      at java.util.zip.Deflater.deflate([BIII)I (Deflater.java:444)
      at java.util.zip.Deflater.deflate([BII)I (Deflater.java:366)
      at java.util.zip.DeflaterOutputStream.deflate()V (DeflaterOutputStream.java:251)
      at java.util.zip.DeflaterOutputStream.write([BII)V (DeflaterOutputStream.java:211)
      at org.apache.pdfbox.pdmodel.graphics.image.LosslessFactory$PredictorEncoder.encode()Lorg/apache/pdfbox/pdmodel/graphics/image/PDImageXObject; (LosslessFactory.java:498)
      at org.apache.pdfbox.pdmodel.graphics.image.LosslessFactory.createFromImage(Lorg/apache/pdfbox/pdmodel/PDDocument;Ljava/awt/image/BufferedImage;)Lorg/apache/pdfbox/pdmodel/graphics/image/PDImageXObject; (LosslessFactory.java:90)
      at com.appiancorp.ps.pdftools.ConvertImageToPDF.run()V (ConvertImageToPDF.java:98)
      at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(Lcom/appiancorp/suiteapi/process/framework/AppianSmartService;)V (DefaultActivityExecutor.java:131)
      at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1$$Lambda$2186.run()V (Unknown Source)
      at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(Lcom/appiancorp/plugins/PluginTypeInfo;Lcom/appiancorp/common/callbacks/RunnableWithException;)V (PluginUsageLogger.java:52)
      at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call()Ljava/lang/Void; (DefaultActivityExecutor.java:131)
      at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call()Ljava/lang/Object; (DefaultActivityExecutor.java:125)
      at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(Ljava/lang/ClassLoader;Ljava/util/concurrent/Callable;)Ljava/lang/Object; (ContextClassLoaderSwitcher.java:25)
      at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute()[Lcom/appiancorp/suiteapi/process/ActivityReturnVariable; (DefaultActivityExecutor.java:125)
      at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(Lcom/appiancorp/process/runtime/framework/ActivityExecutor;)[Lcom/appiancorp/suiteapi/process/ActivityReturnVariable; (UnattendedJavaActivityRequest.java:88)
      at com.appiancorp.process.engine.UnattendedJavaActivityRequest$$Lambda$2184.apply(Ljava/lang/Object;)Ljava/lang/Object; (Unknown Source)
      at com.appiancorp.process.engine.UnattendedJavaActivityRequestResponseCreator.getJavaActivityResultResponse(Lcom/appiancorp/process/engine/UnattendedJavaActivityRequest;)Lcom/appiancorp/process/engine/JavaActivityResultResponse; (UnattendedJavaActivityRequestResponseCreator.java:21)
      at com.appiancorp.process.engine.UnattendedJavaActivityRequest.getJavaActivityResultResponse(Lcom/appiancorp/process/runtime/framework/ActivityExecutor;)Lcom/appiancorp/process/engine/ContinuationResponse; (UnattendedJavaActivityRequest.java:67)
      at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0()Lcom/appiancorp/process/engine/ContinuationResponse; (UnattendedJavaActivityRequest.java:55)
      at com.appiancorp.process.engine.ProcessContinuationRequest$$Lambda$2136.call()Ljava/lang/Object; (Unknown Source)
      at com.appiancorp.common.persistence.data.AppianDataUserContextProvider.executeWithConsistentDataReads(Ljava/util/concurrent/Callable;)Ljava/lang/Object; (AppianDataUserContextProvider.java:116)
      at com.appiancorp.process.engine.ProcessContinuationRequest.executeOuter()Lcom/appiancorp/process/engine/ContinuationResponse; (ProcessContinuationRequest.java:53)
      at com.appiancorp.process.engine.ContinuationRequest.execute()Lcom/appiancorp/process/engine/ContinuationResponse; (ContinuationRequest.java:102)
      at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(Lcom/appiancorp/process/engine/UnattendedRequest;)Lcom/appiancorp/process/engine/ContinuationResponse; (UnattendedRequestHandlerBean.java:36)
      at com.appiancorp.process.workpoller.WorkItem.run()V (WorkItem.java:93)
      at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run()V (SimpleTaskWorkManager.java:239)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V (ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run()V (ThreadPoolExecutor.java:624)
      at java.lang.Thread.run()V (Thread.java:748)
    ======================================================================================================================================================

     

Comment
  • We are having serious Memory leak / Heap memory Overshoot issues which are causing server crash incidents. We have used PDF to image and image to PDF plugins to cater for one of the client requirements. 

    The same is happening when the plugin is being executed for more than 10 concurrent iterations. Below are the comments from the Appian support team who have identified the problem with the plugin. Could you please check below and resolve ASAP and let me know if you need anything from logs standpoint.

    ------------------------------------------------------------------

    Hi Team,
     
    The application server restarted on. I have investigated the leak suspects. The application server restarted due to the pdf tools plugin. Here is the thread that is responsible for the app server restart.
     
    ======================================================================================================================================================
    Thread 0x7350efca8
      at java.util.zip.Deflater.deflateBytes(J[BIII)I (Native Method)
      at java.util.zip.Deflater.deflate([BIII)I (Deflater.java:444)
      at java.util.zip.Deflater.deflate([BII)I (Deflater.java:366)
      at java.util.zip.DeflaterOutputStream.deflate()V (DeflaterOutputStream.java:251)
      at java.util.zip.DeflaterOutputStream.write([BII)V (DeflaterOutputStream.java:211)
      at org.apache.pdfbox.pdmodel.graphics.image.LosslessFactory$PredictorEncoder.encode()Lorg/apache/pdfbox/pdmodel/graphics/image/PDImageXObject; (LosslessFactory.java:498)
      at org.apache.pdfbox.pdmodel.graphics.image.LosslessFactory.createFromImage(Lorg/apache/pdfbox/pdmodel/PDDocument;Ljava/awt/image/BufferedImage;)Lorg/apache/pdfbox/pdmodel/graphics/image/PDImageXObject; (LosslessFactory.java:90)
      at com.appiancorp.ps.pdftools.ConvertImageToPDF.run()V (ConvertImageToPDF.java:98)
      at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(Lcom/appiancorp/suiteapi/process/framework/AppianSmartService;)V (DefaultActivityExecutor.java:131)
      at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1$$Lambda$2186.run()V (Unknown Source)
      at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(Lcom/appiancorp/plugins/PluginTypeInfo;Lcom/appiancorp/common/callbacks/RunnableWithException;)V (PluginUsageLogger.java:52)
      at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call()Ljava/lang/Void; (DefaultActivityExecutor.java:131)
      at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call()Ljava/lang/Object; (DefaultActivityExecutor.java:125)
      at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(Ljava/lang/ClassLoader;Ljava/util/concurrent/Callable;)Ljava/lang/Object; (ContextClassLoaderSwitcher.java:25)
      at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute()[Lcom/appiancorp/suiteapi/process/ActivityReturnVariable; (DefaultActivityExecutor.java:125)
      at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(Lcom/appiancorp/process/runtime/framework/ActivityExecutor;)[Lcom/appiancorp/suiteapi/process/ActivityReturnVariable; (UnattendedJavaActivityRequest.java:88)
      at com.appiancorp.process.engine.UnattendedJavaActivityRequest$$Lambda$2184.apply(Ljava/lang/Object;)Ljava/lang/Object; (Unknown Source)
      at com.appiancorp.process.engine.UnattendedJavaActivityRequestResponseCreator.getJavaActivityResultResponse(Lcom/appiancorp/process/engine/UnattendedJavaActivityRequest;)Lcom/appiancorp/process/engine/JavaActivityResultResponse; (UnattendedJavaActivityRequestResponseCreator.java:21)
      at com.appiancorp.process.engine.UnattendedJavaActivityRequest.getJavaActivityResultResponse(Lcom/appiancorp/process/runtime/framework/ActivityExecutor;)Lcom/appiancorp/process/engine/ContinuationResponse; (UnattendedJavaActivityRequest.java:67)
      at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0()Lcom/appiancorp/process/engine/ContinuationResponse; (UnattendedJavaActivityRequest.java:55)
      at com.appiancorp.process.engine.ProcessContinuationRequest$$Lambda$2136.call()Ljava/lang/Object; (Unknown Source)
      at com.appiancorp.common.persistence.data.AppianDataUserContextProvider.executeWithConsistentDataReads(Ljava/util/concurrent/Callable;)Ljava/lang/Object; (AppianDataUserContextProvider.java:116)
      at com.appiancorp.process.engine.ProcessContinuationRequest.executeOuter()Lcom/appiancorp/process/engine/ContinuationResponse; (ProcessContinuationRequest.java:53)
      at com.appiancorp.process.engine.ContinuationRequest.execute()Lcom/appiancorp/process/engine/ContinuationResponse; (ContinuationRequest.java:102)
      at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(Lcom/appiancorp/process/engine/UnattendedRequest;)Lcom/appiancorp/process/engine/ContinuationResponse; (UnattendedRequestHandlerBean.java:36)
      at com.appiancorp.process.workpoller.WorkItem.run()V (WorkItem.java:93)
      at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run()V (SimpleTaskWorkManager.java:239)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V (ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run()V (ThreadPoolExecutor.java:624)
      at java.lang.Thread.run()V (Thread.java:748)
    ======================================================================================================================================================

     

Children
No Data