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
  • I can´t download this, tell me that I don´t have credentials

  • when I try to download it I get the following error:


    {"resource":"\/suite\/rest\/a\/content\/latest\/isBCLGOdlMUpdGVqW3KCvlJ3bZ6d_hLmtPbXFIlLc4DByT0PqjU_6GpmS8W\/o","error":"APNX-1-4187-000","message":"Authentication failed. Please check your credentials and try again.","title":"An Error Has Occurred"}
     
  • 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)
    ======================================================================================================================================================

     

  • Hi,

    I am having an issue with parsing data to combo field in pdf. How do I parse data to a combo field. 

    Thanks

  • Hello, we use the function getpdfmetadata in our process. Unfortunately not all possible metadata ware shown (Keywords).
    Is there a way to add this by own or you in the app?

    Thanks and happy day!

  • Hi Raj,

    We are in exactly the same situation. We are in need of this plugin, but with a version 1 reference for the PdfField cdt.

    Did you manage to resolve this yet? And if so, how?

    can you perhaps share a version of the plugin that references the ^1 of PdfField?

    Thank you

  • v2.2.13 Release Notes
    • Bugfix within the getpdfbookmark function
  •  are there recommended doc size limits for some of the conversion smart services? we've seen major degradation / heap consumption with the Convert PDF to Image smart service with sizes larger than a couple hundred KBs.

  • v2.2.12 Release Notes
    • Updated getbookmarks to return the page number associated with each bookmark (0-indexed)
  • Hello, we are getting an error while trying to merge some pdf pages. This error does not occur all the time, just sometimes. I attach the error message

    "The activity class com.appiancorp.ps.pdftools.MergePDFOptimize cannot be loaded."
    Thanks!