Adobe Acrobat® 5.0 Introduction to the SDK

35
b c you look everywhere Adobe Acrobat ® 5.0 Introduction to the SDK ® Luther Johnson Project Lead Developer Technologies

Transcript of Adobe Acrobat® 5.0 Introduction to the SDK

Page 1: Adobe Acrobat® 5.0 Introduction to the SDK

bbcyou look™

everywhere

Adobe Acrobat® 5.0

Introduction to the SDK

®

Luther Johnson

Project LeadDeveloper Technologies

Page 2: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 2 -

Agenda

! Adobe® Acrobat® product components

! What is the SDK?

! Extending the product components

Page 3: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 3 -

Components of Acrobat Product

! Acrobat (Viewer)! Provide full functionality as PDF Viewer! IAC (Interapplication Communication)! Plug-In interface

! Distiller! PostScript ---> PDF

! Adobe PS! PostScript Printer Driver with Distiller PPD

! PDF Writer! PDF Driver

! Virtual Printer Driver

Page 4: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 4 -

Components of Acrobat Product

! Acrobat Approval! Fill-in and save PDF Forms

! Acrobat Capture! High-volume paper->PDF

! Converts scanned image files to searchable PDF

Page 5: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 5 -

Components of Acrobat ProductData flow making PDF

Adobe PS

bc

PDFWriter

AcrobatDistiller

Printer Driver

AcrobatViewer

PS withpdfmarkdistillerparams

Printer specific

ApplicationProgram

AcroTray

Images

Acrobat Capture

Direct to PDF

GDI, Quickdraw

Page 6: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 6 -

General Component Features

! Acrobat Viewer =

Acrobat Reader + Editing + Save + Full Extensibility (IAC, Plug-Ins)

! Acrobat Distiller =

PS interpreter + PDF processing(Compression, Font, Color, etc.)

! Acrobat Capture =

OCR engine + PDF processing

! Acrobat Approval=

Acrobat Reader + Save

Page 7: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 7 -

Development with Acrobat Reader

! Must sign the Reader Integration Key License Agreement

! Restrictions for Reader plug-in development

! Writing a plug-in that saves or modifies any file (including PDF)

! Opens encrypted documents without knowledge of password or violates access rights

! Displaying a PDF in a window other than that of Acrobat Reader

! Making use of the Forms HFT

! Technical details:

! #define READER_PLUGIN to 1 in your project (PIRequir.h needs it) and #include "PIRequir.h"

! The plug-in will attempt to acquire only those HFT’s made available within Reader.

Page 8: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 8 -

How to Obtain the SDK and Development Environment Required

! ASN Developer Program! http://partners.adobe.com/asn/developer/main.html

! SDK Locations

! http://partners.adobe.com/asn/developer/acrosdk/main.html

! CD-ROM for Acrobat 5 SDK

! Windows 98, ME, NT4.0, 2000! Microsoft Visual Studio 6.0

! Visual C++ 6.0

! Visual Basic 6.0

! Mac OS 8.6, 9.0.4, 9.1! Metrowerks Code Warrior 6.0 and 5.3 w/ Carbon SDK

Page 9: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 9 -

Contents of the SDK

! Documentation

! Sample code

! Basic Utilities such as the Plug-in Wizard and Reader plug-in enabling tools

! Public header files and type library files

Page 10: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 10 -

SDK Documentation

! Documentation Roadmap: Reference to navigate documentation

! SDK/Documentation/Getting_Started/DocumentationRoadmap.pdf

! Getting Started Using the Acrobat SDK

! SDK\Documentation\Getting_Started\GettingStarted.pdf

! Acrobat Plug-in Tutorial

! SDK\Documentation\Getting_Started\Plug-inTutorial.pdf

! Acrobat Development Overview

! SDK\Documentation\Getting_Started\DevelopmentOverview.pdf

Page 11: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 11 -

SDK Documentation: What’s new

! Acrobat 5 Plug-in Tutorial

! New and Improved

! PDF 1.4 Additions Guide (changes between 1.3 and 1.4)

! PDF 1.4 Specification due out in electronic form by Seybold

! Published form in the Oct/Nov time-frame

Page 12: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 12 -

Other Acrobat/PDF Technical Notes

! Technical Notes not in the SDK that you should know where to reference:! http://partners.adobe.com/asn/developer/technotes/acrobat

pdf.html

! Enterprise Deployment documents

! “Deploying Adobe Acrobat Installers using SMS” (Microsoft System Management Server®)

! “Deploying Adobe Acrobat Installer using WTS”(Microsoft Windows Terminal Service®)

! File Format Specifications

! Acrobat/PDF Font Tech Notes

Page 13: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 13 -

Product Component Extensibility

! Plug-in API! No limit to what you can do to PDF through the Plug-in

interface

! Can perform much of the functionality provided through the user-interface

! IAC API! Remote application control

! Viewing, printing, and limited editing of PDF documents

! Others! pdfmark/Distiller parameters

Page 14: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 14 -

Core API Model

Page 15: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 15 -

Plug-in Extensibility

! Much of the functionality in the final product is implemented through Plug-Ins! AcroForm, Annotations, Digital Signature,

Web Capture, Catalog, etc.

! Open「About Adobe Acrobat Plug-in」in the Menu bar

Page 16: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 16 -

Plug-in Extensibility

! Through HFT use data and functions within Acrobat

! Ability to import and use API that has been exported by Plug-in

! Form! Spelling! Weblink! DigitalSignature! PDFConsultant! Search! Catalog

Acrobat®

Plug-in Plug-in Plug-in

HFT(Host Function Table)

Page 17: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 17 -

Plug-in sample categories

! Annotations and Forms

! AVCommands

! External Applications

! Metadata

! Notifications and Extensions

! Accessing PDF

! PDF Creation and Editing

! Security and Digital Signatures

! Templates

! UI Features

Page 18: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 18 -

Plug-in API: New to 5.0

! Adobe Dialog Manager

! Cross-platform dialog manager

! Mac plug-ins must be carbonized

! Multiple samples use ADM

! Documentation! \Documentation\Extended_API_For_Plugins\ADMinAcrobat.pdf

! \Documentation\Extended_API_For_Plugins\ADMReferenceGuide.pdf

! AVCommand interface! Is a performable action

! Can be used in batch mode

! Sample! BatchCommand

! Demonstration of BatchCommand sample

Page 19: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 19 -

Plug-in API: New to 5.0

! AVConversion interface

! Facilitate Conversion to and from PDF

! Give a list of file types

! Appears in open or save dialogs

! Sample

! FileConversion

! PDF Consultant

! Framework for analyzing and repairing objects in a PDF file

! Sample

! DumpAllObjects

! Documentation

! \Documentation\Extended_API_For_Plugins\PDFConsultant.pdf

Page 20: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 20 -

Plug-in API: New to 5.0

! Opacity (I.e. transparency) methods

! Get and Set Opacity for fill and stroke

! Sample

! Watermark

! Demonstration of Watemark sample

! Metadata API

! Data that Describes the Document

! Usefulness lies in asset management/tagging page content

! Samples

! MetadataToDB (uses XMP schema and XMPTk.lib)

! Demonstration of MetadataToDB sample

Page 21: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 21 -

Plug-in API: New to 5.0

! Spelling API

! Spell Check Words or Text

! Silent or Interactive

! Can Add Dictionaries

! Can Add Words

! Documentation! \Documentation\Extended_API_For_Plugins\SpellingAPIReference.pdf

Page 22: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 22 -

Plug-in API: Demonstration

! BatchCommand sample! Demonstrates using the AVCommand interface

! Isolates Form data by removing page content

! MetadataToDB sample! Demonstrates use of XMP library with XML

! Extracts metadata and stores in a database

! Watermark sample! Demonstrates use of the new opacity methods

! Adds transparent text to the page content

Page 23: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 23 -

Plug-in Prefix Registration

! Plug-in developers should register their prefix names to prevent their plug-ins from conflicting with other plug-ins or accidentally overwriting data in PDF files.! Example elements that use the prefix: Menus, Menu-item

names, Tools, Security handlers, Private Data

! Example of a Menu using the 4-digit prefix:

! SuperCropMenu = AVMenuNew(SuperCrop, "ADBE:SuperCropMenu",gExtensionID);

! Register the second class prefix names at: http://partners.adobe.com/asn/developer/acrosdk/pdfprefix/register.jsp

Page 24: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 24 -

IAC Extensibility

! Conceptual Figure

Page 25: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 25 -

IAC Object

! AV(Acrobat Viewer) Layer

! PD(Portable Document) Layer

Page 26: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 26 -

IAC Extensibility

! Remote application (client) control through IAC! COM (Win)

! VB, VC++

! JavaScript (accessed through COM) support

! DDE(Win)-no longer being extended

! AppleEvent(Mac)

! AppleScript, C, C++

! Command line interface

! Custom plug-in controlled through COM by client application

Page 27: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 27 -

IAC: Usage

! View PDF within Acrobat or 3rd party user interface

! Printing (silently or interactively)

! Limited editing*

! Automate Forms creation from remote application

! Programmatically control Distiller or PDF Writer

*Editing operations include:

! Moving, deleting and inserting pages

! Comment authoring

! Text extraction

Page 28: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 28 -

IAC: New to 5.0

! New Interfaces

! COM (Supported only by Viewer and Approval)

! WinAppRegisterInterface() and GetInterface()

! COM interface by which plug-ins expose methods and properties so that other applications such as Visual Basic can use the plug-in’s features.

! Get/SetPreference

! Preferences enumerated in AVPrefsType declaration. Example of a preference: whether or not to open Acrobat in a browser.

! Apple Event Interface

! New objects and events (e.g. ‘conversion’ object and ‘do script’event)

! For detailed reference of IAC methods, see IACReference.pdf

Page 29: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 29 -

IAC: New to 5.0

! Use Visual Basic to access Acrobat’s Javascripting capability

! The JSObject acts as the interpretation layer between a COM client such as a Visual Basic application and the JavaScript DOMprovided by Acrobat.

! The end result is that programming JSObject from a Visual Basic environment is quite similar to programming in JavaScript using the Acrobat console.

! Sample

! \InterAppCommunicationSupport\Samples\Visual Basic\JSObjectAccess

! VB-JavaScript Interface Guide

! \Documentation\InterApplication_Communication\VBJavascript.pdf

Page 30: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 30 -

IAC: Demonstration

! ActiveView and AddDispinterface! ActiveView demonstrates viewing a PDF document as fully

interactive - functionally equivalent to viewing PDF in a browser

! AddDispinterface demonstrates how plug-ins can expose a dispatch interface to external applications through Acrobat’s automation interface

! The VisualBasic implementation of the ActiveViewexercises the functionality exposed by the AddDispinterfaceplug-in.

Page 31: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 31 -

Distiller Extensibility

! What can you do with pdfmark?! Generate PDF features: document info, bookmarks,

annotations, articles, tags, Form, etc.

! Distiller Parameters! currentdistillerparams: returns Distiller parameters

! setdistillerparams: set Distiller parameters

! Control image compression, font embedding

! Distiller API! Programmatically control the Distiller

Page 32: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 32 -

Acrobat Capture

! Conversion of popular image file formats to PDF with option to OCR

! Driven purely through pre-configured input (watched) and output folders

! Administrator creates a specific set of workflows

! Customize workflows using Capture SDK! http://partners.adobe.com/asn/developer/acrosdk/capture.h

tml

Page 33: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 33 -

Form/FDF Extensibility

! Automate Forms creation via the Forms plug-in

! FDF Toolkit! Library that processes FDF (Form Data Format)

! Not used when submitted in HTML format

! C: Win,UNIX(AIX, Solaris, i586-Linux)! Perl: Win,UNIX(AIX, Solaris, i586-Linux)! Java: Java VM 1.2, 1.3 and beta version of 1.4 support! ActiveX: Win! Samples: Catalog, EmployeeInfoDemo

! Location of FDF Toolkit! http://partners.adobe.com/asn/developer/acrosdk/forms.ht

ml

Page 34: Adobe Acrobat® 5.0 Introduction to the SDK

bbc- 34 -

Form/FDF Extensibility

! Figure of System Organization

Web BrowserIE

Netscape

AcrobatForm

Web Server

CGIby

FDF Toolkit Data Base

FDF orHTML

FDF

PDF

URL

Page 35: Adobe Acrobat® 5.0 Introduction to the SDK

bbcyou look™

everywhere

bbcyou look™

everywhere