PDF Tools

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

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.
  • Extract PDF Attachments - Extracts a range of attachments from an existing PDF and persists them in a designated folder.
  • 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.

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
  • v2.3.1 Release Notes
    Fixed a Null Pointer Exception that caused an expression evaluation error in the Get PDF Signature Fields function when a PDF did not contain any digital signatures.

  • v2.3.0 Release Notes
    Added a new smart service to extract attachments embedded in the PDF file. Community contribution from Rob Turverey - thanks Rob!

  • v2.2.15 Release Notes
    • Added null handling to prevent nullpointerexception when calling getpdfbookmarks on certain PDFs
  • v2.2.14 Release Notes
    • Added Get PDF Signature Fields function to retrieve the populated signature fields of an unflattened PDF.

  • Convert PDF to Image has a bug where it fails to convert pdfs to jpegs. 

  • Hello,

    download not possible: (Chrome inkognito browser)

    {"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"}
  • 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