Creating PDF Documents Using ColdFusion - PowerPoint PPT Presentation

About This Presentation
Title:

Creating PDF Documents Using ColdFusion

Description:

Creating PDF Documents Using ColdFusion & activePDF Matteo Foschetti Technical Evangelist activePDF Inc. Introduction Technical Evangelist Software Engineer Corporate ... – PowerPoint PPT presentation

Number of Views:269
Avg rating:3.0/5.0
Slides: 35
Provided by: cfconfOr
Category:

less

Transcript and Presenter's Notes

Title: Creating PDF Documents Using ColdFusion


1
Creating PDF Documents Using ColdFusion
activePDF
  • Matteo Foschetti
  • Technical Evangelist
  • activePDF Inc.

2
Introduction
  • Technical Evangelist
  • Software Engineer
  • Corporate Trainer
  • Conference Speaker
  • Web Programming Instructor

3
Agenda
  • Learn About activePDF Inc.
  • Discuss PDF COM Technology
  • Review ColdFusion MX
  • Introduce activePDF Toolkit WebGrabber
  • Demonstrate activePDF Examples

4
Survey
  • PDF
  • COM
  • ColdFusion/ColdFusion MX
  • ltCFOBJECTgt Tag
  • activePDF

5
About activePDF Inc.
  • Provider of server-side PDF conversion and
    development tools
  • PDF tools free the developer from the dilemmas
    associated with dynamic PDF creation
  • Unique in PDF industry by offering a server-based
    suite of products

6
About activePDF Inc.
  • No additional per user or per document licensing
    fees
  • COM object level access within all the activePDF
    products
  • Complete control over the PDF generation and
    manipulation process

7
What is PDF?
  • Portable Document Format
  • Widespread standard among users for file sharing
    and exchanges
  • Platform-independent for viewing on any machine
  • PDF is well integrated in almost every industry

8
What is COM?
  • Component Object Model
  • A specification and set of services to enable
    component portability, reusability, and
    versioning
  • Promotes component-based development

9
What is COM?
  • Referred to as objects, controls or components
  • Contain properties (attributes) and methods
    (operations)
  • Callable from any environment that supports COM,
    such as ColdFusion, Visual Basic, ASP, etc.

10
The Typical PDF Conversion Process
  1. A PostScript file is generated by printing from a
    native application to a PostScript enabled device
    by a user
  2. A PDF generator application is opened

11
The Typical PDF Conversion Process
  1. PostScript File is located
  2. File parameters and output options are selected
  3. PostScript-To-PDF conversion takes place
  4. User repeats steps 1-5 for each unique document

12
What is Server-Side PDF Conversion?
  • activePDF software resides on a network server
  • Allows automatic file conversion without user
    intervention
  • Alleviates the guesswork
  • Allows full control over security and display
    settings of documents

13
ColdFusion MX Overview
  • Latest ColdFusion Application Server
  • Parses (reads and compiles) supplied instructions
  • Processes supplied instructions
  • Instructions passed to ColdFusion using templates

14
ColdFusion MX Templates
  • ColdFusion pages that use ColdFusion Markup
    Language (CFML)
  • Extend HTML by adding tags with a variety of
    capabilities ltCF.gt
  • Variables and functions are surrounded by pound
    signs .

15
CFML ColdFusion Features
  • Files use the file extension .cfm or .cfml
  • Capable of Linking to External Data Applications
  • Integration with C/C, Java, COM, CORBA, and Web
    Services

16
Getting Started with COM and ColdFusion
  • Component objects can be invoked in ColdFusion
    using tags
  • ltCFOBJECTgt creates an instance of an object
  • ltCFSETgt invokes properties and methods of the
    object
  • ltCFOUTPUTgt displays text

17
Using Properties
  • To set a property
  • ltcfset obj.property somevaluegt
  • To get a property
  • ltcfset value obj.propertygt

18
Calling Methods
  • Methods with no arguments
  • ltcfset retVal obj.Method1()gt
  • Methods with one or more arguments
  • ltcfset x 23gt
  • ltcfset retVal obj.Method1(x, a string
    literal)gt

19
Calling Methods
  • Methods with reference arguments
  • ltcfset x 23gt
  • ltcfset retVal obj.Method2(x, a string
    literal)gt
  • Calling nested objects
  • ltcfset objX myObj.Xgt
  • ltcfset prop objX.Propertygt

20
Registering COM Objects
  • In order for ColdFusion to find the COM object,
    you must register it
  • With Windows, you use the regsvr32 command with
    the object file (.dll, .ocx), such as
  • regsvr32 c\path\servername.dll

21
Creating Using COM Objects in ColdFusion
  • Note You must create the component in ColdFusion
    before your application pages can invoke any
    methods or assign any properties in the
    component!

22
Creating Using COM Objects Example
  • lt!--- First, create the object ---gt
  • ltcfobject typeCOM
  • actionCreate
  • nameMailer
  • classCDONTS.NewMailgt
  • ltcfset Mailer.To Form.togt
  • ltcfset Mailer.Body Form.bodygt
  • lt!--- Last, use the Send() method to send the msg
    ---gt
  • ltcfset Mailer.Send()gt

23
What is activePDF Toolkit?
  • Programmable COM object that enables users to
    create and manipulate PDF documents
  • With a robust API, ToolKit is used to append,
    stamp, stitch, merge, paint, form-fill, etc.

24
Toolkit Features
  • Simple to add watermarks, set form fields,
    incorporate headers and footers, extracting
    ,concatenating pages, etc.
  • ToolKit supports latest encryption standards and
    other unique PDF technologies

25
Toolkit Basic Steps for Form-Filling a PDF
  1. Open an output destination file (OpenOutputFile
    Method)
  2. Open an input PDF form (OpenInputFile Method)
  3. Set the form field values (SetFormFieldData
    Method)
  4. Copy the input form into the destination file
    (CopyForm Method)
  5. Close output destination file (CloseOutputFile)

26
Toolkit Examples
  • PDF Form-Filling
  • Dynamic PDF Report Generation

27
What is activePDF WebGrabber?
  • Programmable COM object that dynamically
    converts any URL, HTML stream, or HTML file to
    PDF
  • Designed for use with activePDF Server as a
    Multi-Threaded application

28
WebGrabber Features
  • Capable of using either the default HTML 3.2
    rendering engine or the Microsoft Internet
    Explorer engine which supports CSS, SSL, Flash,
    Java, etc.
  • Supports latest Encryption standards and
    Linearization

29
WebGrabber Basic Steps
  • Spooling Stage activePDF WebGrabber is
    responsible for rendering the HTML
  • Conversion Stage activePDF Server is then
    responsible for producing the PDF document
  • (Multi-threaded)

30
WebGrabber Examples
  • On-the-fly HTML to PDF
  • Web Reporting to PDF

31
Conclusion
  • activePDF provides server-side PDF conversion and
    development tools
  • PDF is a widespread standard among users for file
    sharing and exchanges

32
Conclusion
  • activePDF COM objects allow full control over
    security and display settings of documents
  • Component objects can be invoked in ColdFusion
    using tags, such as ltCFOBJECTgt

33
Conclusion
  • activePDF Toolkit enables users to create and
    manipulate PDF documents
  • activePDF WebGrabber dynamically converts any
    URL, HTML stream, or HTML file to PDF

34
References
  • Forta, B., Weiss, N., (2003). Macromedia
    ColdFusion MX Web Application Construction Kit.
    (5th ed.). Berkeley, CA Macromedia Press.
  • Macromedia. (2001). Macromedia ColdFusion5
    Developing ColdFusion Applications. Macromedia
    Incorporated.
  • Balena, F. (1999). Programming Microsoft Visual
    Basic 6.0. Redmond, WA Microsoft Press.
  • activePDF Inc. (2003). activePDF Press Kit.
    Retrieved May 12, 2003, from http//www.activepdf.
    com/en/Corporate/PressKit.asp
Write a Comment
User Comments (0)
About PowerShow.com