<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>io.forgebox</groupId>
  <artifactId>ortus-pdf-tools-extension</artifactId>
  <version>2.1.0.snapshot</version>
  <packaging>lex</packaging>
  <name>Ortus PDF Tools</name>
  <description># Ortus PDF Extension

The Ortus PDF Lucee Extension adds to any Lucee engine the missing PDF capabilities you were longing for and enhancing some PDF capabilities as well. The extension contains several new CFML built-in tags and functions (coming soon) that will help you manipulate and work with PDF documents. You can read more about this extension here: [https://www.ortussolutions.com/products/ortuspdf](https://www.ortussolutions.com/products/ortuspdf)

## Requirements

* Lucee 5.x

## Implemented Tags

The following are the implemented tags that bring compatibility from Adobe ColdFusion to Lucee. You can see much more detailed information about these tags here: https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-p-q/cfpdfform.html

* `cfpdfform` - https://cfdocs.org/cfpdfform
* `cfpdfformparam` - https://cfdocs.org/cfpdfformparam

## Capabilities

* &lt;code&gt;cfpdfform&lt;/code&gt; tag implementation compliant with Adobe ColdFusion
* &lt;code&gt;cfpdfformparam&lt;/code&gt; tag implementation compliant with Adobe ColdFusion
* Ability to export PDF form data into:
 * Native CFML Structures
 * XML String
 * XML File
 * FDF File
 * JSON
* Ability to pre-fill PDF form data from:
 * Native CFML Structures
 * XML String
 * XML File
 * XML Objects
 * JSON objects
* Allows the ability to flatten PDFs after populating them with data
* Manipulates existing forms created in Adobe® Acrobat® and Adobe® LiveCycle® Designer
* Ability to stream generated PDFs to browser
* Ability to read subforms or embedded forms (since version 2.1.0)
* Much More!!

## Quick Usage

### Populate Using Native CFML Structs

```
data = {
 &quot;full_name&quot; = &quot;Ortus Rocks&quot;,
 &quot;exam_date&quot; = &quot;#dateFormat( now(), &quot;mmmm dd, yyyy&quot;)# #timeFormat( now(), &quot;medium&quot;)#&quot;,
 &quot;strategy_overview&quot; = &quot;Drink a lot of water!&quot;,
 &quot;strategy_tips&quot;	= &quot;Eat a lot of cheese!&quot;
};
pdfform 
 action=&quot;populate&quot; 
 source=&quot;#datapath#/report.pdf&quot; 
 overwrite=&quot;true&quot;
 overwriteData=&quot;true&quot;
 structData=data
 flatten=&quot;true&quot;;
```

### Populate Using JSON

```
jsonData = &apos;{
 &quot;full_name&quot;	: &quot;Ortus Rocks&quot;,
 &quot;exam_date&quot;	: &quot;#dateFormat( now(), &quot;mmmm dd, yyyy&quot;)# #timeFormat( now(), &quot;medium&quot;)#&quot;,
 &quot;strategy_overview&quot; : &quot;Drink a lot of water!&quot;,
 &quot;strategy_tips&quot; : &quot;Eat a lot of cheese!&quot;
}&apos;;
pdfform 
 action=&quot;populate&quot; 
 source=&quot;#datapath#/report.pdf&quot; 
 overwrite=&quot;true&quot;
 overwriteData=&quot;true&quot;
 jsonData=&quot;#jsonData#&quot;
 flatten=&quot;true&quot;;
```

### Reading a PDF Form

```
pdfform 
 action=&quot;read&quot;
 source=&quot;#dataPath#/report.pdf&quot;
 result=&quot;formData&quot;
 jsonData=&quot;jsonData&quot;;
// Native Struct
writeDump( formData );
// JSON Data
writeDump( jsonData );
```</description>
</project>