PowerPoint PresentationLori DeFurio Developer Evangelist
separately but viewed together in the browser
! Central repository for comments
! Benefits of online comments ! Single source document distinct
from comments
! Centralized location for review information, accessible in
real-time
! Potential for fast, efficient workflow
bbcAdobe Confidential
! E-mail exchange of document review
! E-mail exchange of documents themselves
! Sharing multiple versions of documents on file servers
! Problems with old methods ! Multiple versions of source
documents
! No centralized location for review information
! Potential bottlenecks in review workflow
bbcAdobe Confidential
! Provides framework that enables on-line commenting and review in
Web-based environments
! Users will be able to view and annotate PDF files within the
browser (not available in Acrobat Reader)
! Acrobat 5.0 client pushes annotations to a server where they are
stored
! Off-line annotations can be synchronized with the server
bbcAdobe Confidential
! Comments can be placed anywhere in the document frame
! Users can tailor the style and format of the comment to suit the
document and type of comment
bbcAdobe Confidential
Overview – Online Comments
! New browser tools ! Ability to make comments on any PDF directly
in the
browser
bbcAdobe Confidential
! Comments are saved in a repository separate from the
document
! Comments don’t have to be on the same server as the original
document
! Once uploaded, anyone with access to the comments server can view
your comments
! The repository can be one of four types:
! Network Folder ! Microsoft Web Discussions ! Database !
WebDAV
bbcyou look™
! Online Comments Preferences must be set before a session
begins
bbcAdobe Confidential
Configuration – Manual
! Select Edit->Preference->General->Online Comments
! Change Server Type to Network Folder
! Under Server Settings browse to the directory where the comments
are to be held
bbcAdobe Confidential
Configuration – Automated ! Two ways to automate configuration
of
repository type and server settings: ! Network Administrator can
create an FDF file ! Document-level JavaScript methods can also be
used
! FDF vs. JavaScript ! FDF provides automated configuration that
can be created in
advance by a server application or network administrator !
JavaScript allows configuration within the document so that
only the document itself is needed
! Automated specification of repository type means: ! Configuration
is behind the scenes to end users ! Comments are automatically
routed to the right place
bbcAdobe Confidential
/F http://nef/pdfs/updated.pdf)
! Document level JavaScript can be entered via Tools->
JavaScript -> Document JavaScripts
! Example code for Network Folder:
Collab.defaultStore = "FSFDF";
Collab.setStoreSettings ("FSFDF","/F/Adobe/collab/annots/");
Identity
! User names are important to identify the user making a
comment
! The user name is automatically populated by Adobe Acrobat: !
Microsoft Windows systems use the Windows login name
! Apple Macintosh systems use either the file sharing owner name or
the login name
bbcAdobe Confidential
Security
! Comments are uploaded only as your login name and only if the
login name has permission to create files on that server
! If there were multiple users with the same login name the
comments of each user would be saved to the same file
! Documents that have the security setting "No Adding or Changing
Comments or Form Fields" cannot be commented upon
! If the user does not have permission or the directory does not
exist Acrobat displays an error message
bbcAdobe Confidential
! Acrobat reads the URL from network layer
! Acrobat uses DNS to translate URL to IP Address
! Acrobat takes the converted URL and makes an MD5 hash to uniquely
identify the document
! For example: ! http://www.adobe.com/docs/foo.pdf is converted
to
http://152.30.132.12/docs/foo.pdf which would hash to
UAtOJErFgHsL2xbLvPPJgC
! It is important to use different file names for multiple versions
of a document
! In cases where the same URL may map to different IP addresses,
use IP address in the request. For example, ftp.irs.gov is one such
site that translates to multiple IP addresses.
! Make sure your online comment repository is enabled
! Open web browser and navigate to the URL where review document is
located
! In addition to the complete set of Acrobat 5.0 commenting tools,
several online commenting tools are now available: ! Show
Comment/Hide Comments ! Download Comments ! Upload Comments !
Upload and Download Comments
! Multiple users can comment on a document simultaneously,
periodically uploading their comments and downloading comments of
others
! Make sure all your comments are visible before doing an upload
operation
! When done commenting click on either Upload Comments or the
Upload and Download Comments button to save your comments to the
repository
bbcAdobe Confidential
Offline Commenting: How-To
! Offline comments are useful when a user is away from the network
or Internet
! Working Offline: ! Open the document in a web browser, and save a
copy of the
document to your local hard drive ! When offline, open the document
from the hard drive and begin
working
! Uploading comments to the server: ! Make sure you’re uploading
from the same machine where the local
save was performed ! Open the local copy of the document in Acrobat
! Click on File->Upload Comments ! If the file has been modified
it will be saved and then the offline copy
will be closed. Acrobat will open the original PDF in the default
web browser and show comments
! You still must click on either Upload Comments or the Upload and
Download Comments button to upload
bbcAdobe Confidential
Repository Types – General Overview
! Network folder ! Stores comments in a designated area on a
network drive
! Microsoft Web Discussions ! Stores comments on a Web Discussions
server
! Database ! Stores comments in Oracle or SQL server
databases
! WebDAV ! Stores comments on a WebDAV server
bbcAdobe Confidential
Comments
! ODBC (Windows-only)
! SQL Server 7.0 on NT and Windows 2000 ! Oracle 8.0, 8i
! Microsoft Office Server Extensions (Windows-only)
! IIS 4.0 and 5.0 on NT and Windows 2000 ! Network Folders
! Win & Mac
bbcAdobe Confidential
Network Folder Repository
! It is the easiest to set up because it does not require a web
server or database
! Online comments are saved to a network drive or a local hard
drive
! Each user's comments are saved in the hashed sub-folder as an
individual FDF file
bbcAdobe Confidential
Network Folder – Prerequisites
! All users must have either Apple Mac OS 9.x or Microsoft Windows
95, Windows 98, Windows NT 4.0, Windows ME, or Windows 2000
! Users must be connected directly to the company network or
attached through some virtual connection such as a VPN
! A network folder must be chosen to store the comments
! Participants in the review process must have write access to the
network folder serving as the repository
bbcAdobe Confidential
! The store type for a Network Folder repository is FSFDF
! Configuration involves setting the store type and specifying the
location of the network folder where the comments will be
stored
! Example: Collab.defaultStore = "FSFDF";
! Requires Microsoft Windows; not available for Macintosh
users
! For companies already using Microsoft Web Discussions and have
Microsoft Office 2000 on their desktops
bbcAdobe Confidential
! Server Requirements ! Microsoft Office Server Extensions must be
installed on
the server ! Either the Microsoft Management Console (MMC) or
the
Personal Web Manager (PWM) must be installed
! Client Requirements ! Users must have Microsoft Office 2000 and
Microsoft
Windows 95, Windows 98, Windows NT 4.0, Windows Millennium Edition,
or Windows 2000
! All commenting users must have access to the discussion
server
bbcAdobe Confidential
Microsoft Web Discussions Repository – Configuration
! The store type for a Microsoft Web Discussions repository is
WD
! Configuration involves setting the store type and specifying (in
the browser) the location of the discussion server where the
comments will be stored
! Example: Collab.defaultStore = "WD";
(In the browser, click the Discuss button on the toolbar and select
your discussions server.)
bbcAdobe Confidential
Database Repository
! This repository type uses Acrobat Database Connectivity (ADBC)
which allows JavaScript access to a SQL database ! More information
on ADBC is attached.
! Currently not available for Macintosh
! Currently supports Microsoft SQL Server, Oracle 7, and Oracle 8
and 8i
bbcAdobe Confidential
Database Repository – Prerequisites
! Users must have Microsoft Office 2000 and Microsoft Windows 95
OSR 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, or
Windows 2000
! If using Microsoft SQL Server, a SQL driver must be present on
the client machine
! If using Oracle the Oracle client software must be installed on
the client and TNSNAMES.ORA file must be in
%ORACLE_HOME\network\admin
bbcAdobe Confidential
! Configuration involves setting the store type and specifying the
information required to access the database
! Example:
bbcAdobe Confidential
WebDAV Repository
! WebDAV, or “Web-based Distributed Authoring and Versioning”, is
an industry standard for collaboration over the web
! Using WebDAV enables users outside of the corporate firewall –
including business partners, suppliers and customers – to be
involved in document reviews
! Cross-platform, works with Windows and Mac clients
! Each user's comments are saved in the hashed sub-folder as an
individual FDF file
bbcAdobe Confidential
WebDAV Repository – Prerequisites
! Server Requirements ! Microsoft IIS 5.0 or Apache 1.3.14 with
mod_dav 1.0
! A site must be set up to store the comments, accessible to all
reviewers over HTTP
! IS department involvement is needed to ensure the collaboration
environment is set up correctly
! Client Requirements ! Users must have Apple Mac OS 9.x or Windows
95 OSR
2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, or
Windows 2000
bbcAdobe Confidential
! The store type for a WebDAV repository is DAVFDF
! Configuration involves setting the store type and specifying the
location of the WebDAV server where the comments will be
stored
! Example: Collab.defaultStore = "DAVFDF";
! Online comments extend existing comment tools in Acrobat,
allowing real-time online collaboration
! Four types of repositories are available, providing network and
Internet solutions for a range of platforms and
infrastructures
bbcAdobe Confidential
Additional Resources
! Acrobat ! http://partners.adobe.com/asn/developer
! ADBC ! Attached
! IIS ! http://www.microsoft.com/windows2000/server/
! Server Settings =
http://www.planetpdf.com/planetpdf/webdavdemo/
! Talk to Karl about adding your own files
Getting Started
Introduction The Acrobat Database Connectivity (ADBC) plug-in
provides some basic JavaScript properties and methods for
connecting to a database. These can be used to obtain information
about the databases available on the system, the tables contained
within each database and the data types used within any given
table. More importantly, JavaScript can be used to execute SQL
commands and retrieve data, which can, in turn, be used to populate
a PDF file. Conversely, through JavaScript and SQL, field values of
a PDF form can be saved to a database, data can be added or updated
as needed.
All of this is possible without the use of a web server or CGI
script. These queries and manipulations can take place on a desktop
PC/workstation. When combined with the powerful batch processing
capability of Acrobat 5.0, large scale database tasks involving PDF
files can be performed in a automated manner.
Currently, ADBC is a Windows only feature and requires Open
Database Connectivity (ODBC) provided by Microsoft.
The purpose of this article is to describe the basic steps for
getting started; this article is not a tutorial in SQL. A good
online reference to SQL is the article Introduction to Structured
Query Language by James Hoffman.
Fundamentally, this paper covers the following topics.
• The ADBC Demo Files: A brief discussion of the ADBC demo files in
this folder. • Registering an ODBC Data Source • Connect and
Execute SQL
• Connect to the Data Source • Executing a SQL statement •
Retrieving Data and Populating a Form • Updating the Database
The ADBC Demo Files Also contained in this folder are two PDF files
ADBCdemo.pdf and FormsBatch.pdf, and one small Microsoft Access
database ADBCdemo.mdb.
First Name:
Last Name:
DB: ADBCdemo
Instructions: Register the demo database with the ODBC Data Source
Administrator.
Copy the Microsoft Access database file ADBCdemo.mdb to your hard
drive.
Click on Start > Settings > Control Panel and choose ODBC
Data Sources (32-bit).
Choose either the ‘User DSN’ (or ‘System DSN’), then click on
‘Add...’. Now select Microsoft Access Database and click on
‘Finish’.
You are now at the ODBC Microsoft Access Setup. Enter the Data
Source Name: ADBCdemo Description: ADBCdemo file
Next click on ‘Select’ and browse for the demo file ADBCdemo.mdb.
Click on ‘OK’ and back out of these dialogues.
Instruction: How to use this demo.
Click on ‘Find Database’.
Select Database: In the list box that appears, choose ADBCdemo.
Click in an area outside the box to ‘commit’ the data.
Choose a Table: In the list box that appears, choose ClientData.
Commit the selection.
Column Information: In the list box that appears, choose one or
more entries (Use Ctrl- or Shift-Click in make multiple
selections.) Commit the selection(s).
Query & List Finally click on the ‘Query & List’ button to
get a listing of the selected rows.
Note: In the text field, the SQL commands can be modified as
desired, or enter your own SQL commands: (SELECT, UPDATE, ALTER,
INSERT, DELETE. Click on ‘Query & List’ to execute the
commands.
ADBC DEMO: Acrobat 5.0
Populate Form Data and Update Data
The lower half of this demo document is meant to illustrate how to
populate form data from a database, and to update the information
in the database.
Click on ‘Connect’. Assuming you have registered the ADBCdemo with
the ODBC Data Source Administrator, you will be connected to the
ADBCdemo database and the first row will be returned and populate
the fields provided.
Click on ‘Get Next’, and the next row from the database will be
returned and populate the fields.
You can modify the data. Clicking on ‘Update’ will commit the
changes to ADBCdemo.
ADBCdemo.pdf
ADBC: Getting Started 16
• ADBCdemo.mdb: Both PDF demo files use this database. Before using
the demos, you must transfer ADBCdemo.mdb to your hard drive, then
register it with the ODBC Data Source Administrator. Instructions
for registering the database are contained in the ADBCdemo.pdf file
or in the section Registering an ODBC Data Source, below.
• ADBCdemo.pdf: This is a two page file. On the first page, it is
demonstrated how to extract information from ODBC and list rows of
data from your databases. This page also illustrates some of the
new forms features, the dynamic creation (and removal) of form
fields through JavaScript, for example. Complete instructions are
contained on the page. The second page illustrates how to connect
directly to a particular database (ADBCdemo.mdb). On this page, you
can connect, page through the database, and even update the
entries.
• FormsBatch.pdf: This demo illustrates how to populate a form
(FormsBatch.pdf) and save the populated form to the hard drive all
in batch mode. The batch sequence used is called “Populate and
Save”, located in the Batch folder of the Acrobat CD. Additional
information on “Populate and Save” can be found in the file
BatchSequences.pdf; you should read the discussion on “Populate and
Save” before trying to use the FormsBatch.pdf demo file.
Registering an ODBC Data Source Your database must be registered
with ODBC as a data source in order to be accessible by ADBC. The
following steps describes how to register a Microsoft Access file
as a database. The steps may be slightly different for other
databases.
• In the Windows control panel, click on the ODBC icon to gain
access to the “ODBC Data Source Administrator”.
• Click on either the “User DSN” or the “System DSN” tab. • A “User
DSN” is only visible and available to the user currently logged on
to the
current computer. • A “System DSN” is available to any user logged
on to the workstation.
• At this point you are in the “Create New Data Source” dialog box.
Double click on the ODBC driver for the data source (database) you
want to access. For example, you might click on “Microsoft Access
Driver (*.mdb)”.
• ODBC driver Setup Dialog • In the “Data Source Name” box, type in
a name for the data source. This string does
not have to be the actual name of your database or table. • In the
“Description” box, enter some description of the data source. • In
the “Database” box, click on the “Select...” button, and browse to
find the
database (or data source). • After finding your data source, click
on “OK”, and back out of the “ODBC Data Source
Administrator”.
Having finished the above steps, the database can now be accessed
through the ADBC interface.
ADBC: Getting Started 17
Connect and Execute SQL The premise of this section is that you
have a data source registered with ODBC by the name of "my Data"
and contained within this data source is a table called "my
Table".
Refer to the Acrobat JavaScript Object Specification manual for
details of the ADBC objects, properties and methods discussed
below.
Connect to the Data Source First, connect to your data source to
obtain a Connect Object, which, in turn can be used to obtain a
Statement Object:
try {
connect = ADBC.newConnection("my Data");
// get a statement object
} catch(e) {
app.alert(e);
}
This code assumes a fixed data source, "my Data". Alternatively,
the script can get the data source’s name from a text field of the
PDF form you are trying to process; see, for example the file
ADBCdemo.pdf on the Acrobat 5.0 CD.
Data sources, such as a Microsoft Access file, that have been
password protected can be accessed by either providing the password
at connect time, through a popup dialog that appears on the screen,
or, by providing the password programmatically
connect = ADBC.newConnection("my Data", "Admin", "dps017");
Alternatively, back in the “ODBC Data Source Administrator”, you
can configure your Access file so that the password is supplied
automatically. In the “ODBC Microsoft Access Setup” dialog, click
on the “Advanced” button, then fill in the “Login name” and
“Password” in the “Default Authorization” box.
Executing a SQL statement An SQL command is executed through ADBC
by using the execute method of the statement object just
acquired:
connect = ADBC.newConnection("my Data");
statement.execute(SQL) // where SQL is some valid SQL
statement
To retrieve data from the database, you must execute the SQL
statement SELECT/FROM.
SELECT <list of columns> FROM <table>
For example,
SELECT "FirstName", "LastName" FROM "my Table"
To select all the columns from a table, you the following:
SELECT * FROM <table>
Note, the above syntax is not presented in the most general
form.
try {
statement = connect.newStatement();
// statement.execute returns true if successful
// Note the use of the single quotes and double quotes here,
// double quotes are needed if the name has white space in
it.
if(statement.execute( 'Select * from "my Table"' ))
throw "Could not execute the requested SQL";
} catch(e) {
app.alert(e);
Retrieving Data and Populating a Form
Assuming now we are connected to our target data source and have
executed a SELECT/FROM command to choose the data we wish to
examine, we now want to retrieve a row of the data meeting the
selection criteria and populate a PDF form.
The following script might be the mouse up action of a button
(visible, but doesn’t print) on the form.
try {
statement.nextRow();
this.getField("id").value = row.ID.value;
this.getField("firstname").value = row.FirstName.value;
this.getField("lastname").value = row.LastName.value;
app.alert("No more data.");
If the column names contain white space, using the syntax
row.FirstName.value will not work, instead use a bracket
notation:
try {
statement.nextRow();
this.getField("id").value = row["ID"].value;
app.alert("No more data.");
See the Statement Object in the Acrobat JavaScript Object
Specification for more details.
Updating the Database Given there is data in a PDF form, perhaps an
FDF that has arrived by way of e-mail, the data can be stored in a
database through an INSERT, for adding a new row of data, or by an
UPDATE, for updating an existing row.
Example: The following script was taken from the "Update" button on
the second page of the ADBCdemo.pdf file on the Acrobat CD
try {
var updateStr = "UPDATE ClientData"
// console.println(updateStr);
ADBC: Getting Started 20
Final Comments This short article just touches only on the major
steps needed for connecting to a database and for retrieving
information. Study the demo files in the database folder of the
Acrobat CD for additional examples, techniques and ideas.
Acrobat and ADBC now provides powerful tools for solving local
database problems and it is hoped that developers will take these
new tools and produce for the business community some useful and
worthwhile applications.
Setting up Acrobat 5.0 for Review & Markup
Agenda
Overview – Acrobat 5.0 Comments
Database Repository
Connect and Execute SQL
Executing a SQL statement
Updating the Database