PDFUtils

Content Type: Module
Categories: Utility

Overview

Handy Java actions when working with PDF files in Mendix!

When to use it?

  • When you want more control over the settings
  • The PDF files will stay in the Mendix environment
  • When the build-in components are not sufficient for your PDF's

What does it contain?

  • Adding page numbering at the footer of the document (text, fontsize and font is customizable)
  • Add a watermark to the pages (text, fontsize, font and text color are customizable)
  • Image compression with setting the quality and the scaling of the image
  • Auto fill acro form fields within a document
  • Merge a list of PDF's into one document (not limited to an amount of documents)
  • Create password protected files with other security settings for example allow printing or allow modification to the document
  • Retrieve the content from the file as a string with the correct charset
  • Modify the current metadata for example the author or the creation date
  • Remove the entire metadata from the document
  • Split a PDF document in seperated PDF documents, also if you only need a range of pages to be split
  • Create PNG images from the content of your PDF document
  • Add annotations to your PDF document
  • Add JavaScript action button's with custom styling to your PDF document
  • Convert a list of images to a PDF document
  • Get the amount of pages from a PDF document
  • Remove a range of pages from a PDF document
  • Remove the password protection from a PDF document
  • Retrieve the document's metadata such as author, title, creation date etc.
  • Rotate the pages of a PDF document

For who

  • Application managers (change the settings within the application if necessary)
  • Business Engineers

Pricing

It is free and it will stay free forever! :)

Support or suggestions

If you have any issues or suggestions, please reach out to me at c.denbreejen[at]rotterdam.nl

Documentation

Description

This module contains ten java actions with some handy features such as password protecting documents which are currently not (partialy) available in Mendix. These Java actions are build with a lot of configuration options in mind such as setting the text or fontsize of the text.

 

Typical usage scenario

Described in the overview tab.

 

Features and limitations

Described in the overview tab.

 

Dependencies

  • Commons Logging 1.3.6
  • Fontbox 3.0.7
  • PDFBox 3.0.7
  • PDFBox IO 3.0.7

 

Installation

  • Install the module from the Mendix marketplace
  • Review the release notes for new/updated depedencies
  • Remove the old dependencies when no longer necessary from the "Userlib" folder

 

Releases

Version: 1.9.1
Framework Version: 9.24.42
Release Notes:
  • Updated the dependencies. Please remove the following dependencies from your userlib:
    • pdfbox-3.0.6.jar
    • pdfbox-io-3.0.6.jar
    • fontbox-3.0.6.jar
    • commons-logging-1.3.5.jar
  • Updated the module to the latest Mendix 9 LTS.
  • Changed the constant ModuleVersion to a string to support SemVer versioning.
Version: 1.9.0
Framework Version: 9.24.41
Release Notes:
  • Added a Java action that allows you to pass a list of System.Image objects, which will be used to create a new PDF document.
  • Added a Java action that returns the number of pages in a PDF document.
  • Added a Java action that allows you to remove a range of pages from a PDF document.
  • Added a Java action that removes password protection from a PDF document.
  • Added a Java action that retrieves the document's metadata (author, creation date, title, etc.).
  • Added a Java action that allows you to rotate the pages of a PDF document.
  • Added two parameters to the PdfSplitter Java action that allow you to specify a range of pages to be split into separate PDF documents.
  • Added the possibility to use a custom font in the PdfAddPageNumbering and PdfAddWatermark Java actions.
Version: 1.8.0
Framework Version: 9.24.41
Release Notes:

Breaking changes! Read release notes carefully.

 

  • Updated the Java dependencies to PDFBox 3.0.6, which has breaking changes compared to PDFBox 2.x. Please check if you have other Java actions still using PDFBox 2.x.
  • The following JARs must be deleted from your userlib:
    • pdfbox-2.0.35.jar
    • fontbox-2.0.35.jar
  • Changed the Java version to Java 21. If your application uses an older version of Java, please check that the Java actions don’t break.
Version: 1.7.0
Framework Version: 9.24.40
Release Notes:

- One of the most requested features is now available: you can now select a PDFBox font yourself when using the page-numbering or watermark Java actions.

- You may choose not to exclude the first page when using the page-numbering action.

- The userlib dependencies have been updated. You may safely remove PDFBox 2.0.32, FontBox 2.0.32, and commons-logging 1.3.4.

- The module has been updated to the latest Mendix 9 LTS.

Version: 1.6.0
Framework Version: 9.24.31
Release Notes: - Add annotations to your document - Add JavaScript action button's to your document with custom styling - Updated PDFBox JAR's from 2.0.30 to 2.0.32 - Updated Commons Logging JAR from 1.3.0 to 1.3.4 - Placed Java parameters in categories where necessary - Optimized some Java actions with streaming instead of using the whole memory when loading the document(s) - Fixed some minor bugs - Updated the module to the latest Mendix 9 LTS
Version: 1.5.0
Framework Version: 9.24.29
Release Notes: - Updated the module to the latest LTS version - Added the possibility to create PNG images from the content of your PDF files
Version: 1.4.0
Framework Version: 9.24.26
Release Notes: - Every Java action now works with type parameters (also known as generics) instead of the System.FileDocument entity. This allows you to use or copy other members, such as when using the PDF splitter. The Java action itself will check if your provided parameter is a generalization of System.FileDocument; if not, the Java action will throw an exception.
Version: 1.3.0
Framework Version: 9.24.26
Release Notes: - Updated the Mendix version to 9.24.26 (LTS) - Added functionality to split a PDF document into multiple PDF documents
Version: 1.2.0
Framework Version: 9.24.22
Release Notes: - Added support for Mendix 10 - Fixed some Java bugs
Version: 1.1.0
Framework Version: 9.24.20
Release Notes: - Added more detailed documentation to the Java action input's - Update to Mendix version 9.24.20