ColdFusion 8 PDF-Integration

ballscauliflowerΛογισμικό & κατασκευή λογ/κού

30 Ιουν 2012 (πριν από 5 χρόνια και 4 μήνες)

502 εμφανίσεις

®
ColdFusion 8

PDF-Integration
Sven Ramuschkat
SRamuschkat@herrlich-ramuschkat.de
München

& Zürich, März

2009
®
PDF Funktionalitäten
1.

Auslesen

und Befüllen

von PDF-Formularen
2.

Umwandlung

von HTML-Seiten

nach

PDF
3.

Assembling von PDF-Dokumenten
1.

Zusammen-mergen

von mehren

PDFs

zu

einem

PDF
2.

Erzeugen

von Thumbnails von PDF-Seiten
3.

Hinzufügen

von Waterwarks
4.

DDX Funktionalitäten
4.

Serverseitiges

Drucken

von PDFs
5.

ColdFusion ReportWriter
®
®
PDF Forms
®
CRM
CRM
ERP
ERP
Andere
Quellen

Andere
Quellen
Digitale
Signaturen

Digitale
Signaturen
Digitalisierung
Digitalisierung
PDF Forms
®
6
LiveCycle

PDF Forms (XFA Form)


Data Formats


Data can be filled only in XML format
<form1>
<subform1>
<name>Test Name</name>
<empcode>12345</empcode>
</subform1>
</form1>


Dynamic Forms appearance can change to adjust to the supplied data


Completely XML based (XDP)


Data DOM and Template DOM


Submission


HTTP Post


PDF Document


Can be created using Adobe LiveCycle

Designer
6
®
LiveCycle

ES Form Designer
®
8
CFPDF Form


What <CFPDFForm> can do?


Populate a static/dynamic XFAForm


Extract values from a filled up static/dynamic XFA Form


Can post data in HTTP format or entire PDF can be submitted to server


What <CFPDFForm> cannot do?


It cannot create a PDF Form
8
®
Auslesen

von PDF-Forumlaren
Befüllen eines PDFs
Demo 1 und 2
Datenstruktur Auslesen
®
Auslesen

von PDF-Forumlaren
Auslesen der Daten aus einem PDF
Demo 3
®
Umwandlung

von HTML nach

PDF
Demo 4
®
Zusammen-mergen

von PDF-Dateien
Demo 5
®
Erstellen

von Thumbails

von PDFs
Demo 6
®
Hinzufügen

von Watermarks
Demo 7
®
15
DDX


Document Description XML is a declarative markup language whose
elements represent building blocks of documents . It can be considered as a
template for the document(s) that you want the Assembler service to
produce.


XML based document definition format to manipulate PDF.


Part of Adobe®

LiveCycle™

Assembler DDX. Restricted set of features in CF.


DDX Document Structure

<?xml version="1.0" encoding="UTF-8"?>
<DDX xmlns="http://ns.adobe.com/DDX/1.0/“

xsi:schemaLocation

schema_location

/>
<!--

Other DDX elements -->
</DDX>
15
®
DDX


Why should you be interested!


One time coding


Gives complete control over pdf

assembly (attributes, features)


Supports a very rich feature set


Text Extraction


TOC Generation


Setting headers/ footers


Setting initial views


Attachments/bookmarks/Annotations/labels


The same can be used with Adobe®

LiveCycle™

Assembler


Easy to use


Its Adobe
®
17
CFPDF DDX processing
Supported using processddx

action
What can be done using ddx

in CF


Add a table of contents


Add Headers and Footers


Format headers and footers


Using style profiles


Group PDF documents


Set the initial view of a PDF document


Add text-string watermarks


Extract text from a PDF document
17
®
18
CFPDF DDX processing …


Sample DDX
<DDX xmlns="http://ns.adobe.com/DDX/1.0/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ns.adobe.com/DDX/1.0/coldfusion_ddx.xsd">
<PDF result=“Out1">
<TableOfContents maxBookmarkLevel="infinite" bookmarkTitle="Table
of Contents" includeInTOC="false">
<TableOfContentsEntryPattern>
<StyledTextfont="italic"><p>
<_BookmarkTitle/>
<leader leader-pattern="dotted" />
<_BookmarkPageCitation/></p>
</StyledText>
</TableOfContentsEntryPattern>
</TableOfContents>
<PDF source=“Doc1" />
<PDF source=“Doc2" />
</PDF>
18
®
19
CFPDF DDX processing ….continued
<PDF result="out2">
<Footer>
<Right>
<StyledText>
<p>Page <_PageNumber/> of <_LastPageNumber/></p>
</StyledText>
</Right>
</Footer>
<Watermark rotation="30" opacity="65%">
<StyledText><p font-size="50pt" font-weight="bold" color="lightgray"
font="Arial">Draft</p></StyledText>
</Watermark>
<PDF source=“Doc2" />
<PDF source=“Doc1" />
</PDF>
</DDX>


Sample Code for DDX processing
<cfsetinput={Doc1="C:/Source1.pdf“, Doc2="C:/Source2.pdf"}>
<cfsetoutput={Out1="C:/Output1.pdf“, Out2="C:/Output2.pdf"}>
<cfpdf action="processddx" ddxfile=“sample.ddx" inputfiles="#input#"
outputfiles="#output#" name="statusstruct">
19
®
20
CFPrint


<cfprint> tag for Server side printing


GetPrinterInfo(printerName) -

set of attributes that the named printer
supports


Only supported type is PDF


CF Adminisrator

lists all printers available and default printer in System
Information section
<cfprint
type=“pdf"
source=”test1.pdf”
password=”password1”
printerName=”path to printer”
>
20
®
Questions?