* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download defurio_reveiwmarkup.pdf
Survey
Document related concepts
Entity–attribute–value model wikipedia , lookup
Oracle Database wikipedia , lookup
Microsoft Access wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Functional Database Model wikipedia , lookup
Relational model wikipedia , lookup
Team Foundation Server wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Microsoft SQL Server wikipedia , lookup
Clusterpoint wikipedia , lookup
Transcript
Setting up Acrobat 5.0 for Review & Markup Lori DeFurio Developer Evangelist everywhere Adobe Confidential you look™ bc Agenda ! Overview ! Configuration ! Identity/Security ! Comment Storage Conventions ! Online Commenting: How-To ! Offline Commenting: How-To ! Repositories ! Q&A Adobe Confidential bc Overview – Why Online Comments? ! The solution ! Source document and comments are maintained separately but viewed together in the browser ! Central repository for comments ! Real-time review ! Benefits of online comments ! Single source document distinct from comments ! Centralized location for review information, accessible in real-time ! Potential for fast, efficient workflow Adobe Confidential bc Overview – Why Online Comments? ! Old-fashioned methods ! Hand markup of paper documents ! 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 Adobe Confidential bc On-Line Comments in Acrobat 5.0 ! 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 Adobe Confidential bc Overview – Acrobat 5.0 Comments ! 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 Adobe Confidential bc Overview – Online Comments ! New browser tools ! Ability to make comments on any PDF directly in the browser ! Ability to save comments to a common server ! Usage ! Enables interactive workgroup document review over a local network or the web via standard browsers Adobe Confidential bc Overview – Online Comments ! Commenting does not alter the original document ! 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 Adobe Confidential bc Configuring Acrobat everywhere Adobe Confidential you look™ bc Configuration – Manual ! Online Comments Preferences must be set before a session begins Adobe Confidential bc Configuration – Manual Example (for one of the four repository types): ! 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 Adobe Confidential bc 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 Adobe Confidential bc Configuration – Automated (FDF) %FDF-1.2 %âãÏÓ 1 0 obj << /FDF << /F (http://nef/pdfs/updated.pdf) /JavaScript << /After 2 0 R >> >> >> endobj 2 0 obj << >> stream Collab.defaultStore = "FSFDF"; Collab.setStoreSettings("FSFDF", "/fileserver/shared/Collab/"); endstream endobj trailer << /Root 1 0 R >> %%EOF /F http://nef/pdfs/updated.pdf) Collab.defaultStore = "FSFDF"; Collab.setStoreSettings ("FSFDF", "/fileserver/shared/Collab/"); Adobe Confidential bc Configuration – Automated (JavaScript) ! 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/"); Adobe Confidential bc 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 Adobe Confidential bc 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 Adobe Confidential bc Comment Storage Conventions ! User opens PDF file in browser ! 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. Adobe Confidential bc Online Commenting: How-To ! 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 Adobe Confidential bc 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 Adobe Confidential bc Repository Types – General Overview ! Network folder ! ! Microsoft Web Discussions ! ! Stores comments on a Web Discussions server Database ! ! Stores comments in a designated area on a network drive Stores comments in Oracle or SQL server databases WebDAV ! Stores comments on a WebDAV server Adobe Confidential bc On-Line Comments Architecture Acrobat 5.0 Comments Office Server Extensions MS Web Discussions/ IIS Adobe Confidential MS OLEDB ADBC ODBC SQL Driver EFS http:// WebDAV Network Folder MS SQL Server/ Oracle bc Supported Servers ! WebDAV ! ! ! ODBC (Windows-only) ! ! ! SQL Server 7.0 on NT and Windows 2000 Oracle 8.0, 8i Microsoft Office Server Extensions (Windows-only) ! ! Apache IIS 5.0 on Windows 2000 IIS 4.0 and 5.0 on NT and Windows 2000 Network Folders ! Win & Mac Adobe Confidential bc 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 Adobe Confidential bc 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 Adobe Confidential bc Network Folder – Configuration ! 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"; Collab.setStoreSettings("FSFDF", "/fileserver/shared/Collab/"); Adobe Confidential bc Microsoft Web Discussions Repository ! Requires Microsoft Windows; not available for Macintosh users ! For companies already using Microsoft Web Discussions and have Microsoft Office 2000 on their desktops Adobe Confidential bc Microsoft Web Discussions Repository – Prerequisites ! 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 Adobe Confidential bc 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.) Adobe Confidential bc Database Repository ! Comments are stored into a standard database ! 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 Adobe Confidential bc 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 Adobe Confidential bc Database Repository – Configuration ! The store type for a Database repository is DB ! Configuration involves setting the store type and specifying the information required to access the database ! Example: Collab.defaultStore = "DB"; Collab.setStoreSettings("DB", "DRIVER={SQL Server};SERVER=qui; UID=co;PWD=co;DATABASE=acrocollab"); Adobe Confidential bc 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 Adobe Confidential bc 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 Adobe Confidential bc WebDAV Repository – Configuration ! 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"; Collab.setStoreSettings("DAVFDF", "http://www.adobe.com/collab/"); Adobe Confidential bc Summary ! Online comments represent a powerful technology for workgroup-based document review ! 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 Adobe Confidential bc Additional Resources ! Acrobat ! ! ADBC ! ! Attached IIS ! ! http://partners.adobe.com/asn/developer http://www.microsoft.com/windows2000/server/ evaluation/features/default.asp Apache ! http://www.apache.org ! http://www.webdav.org/mod_dav/ ! WebDAV ! http://www.webdav.org Adobe Confidential bc Sample WebDAV on PlanetPDF.com ! Set your system to: ! Server Type = WebDAV ! Server Settings = http://www.planetpdf.com/planetpdf/webdavdemo/ ! Try a file: http://www.planetpdf.com/planetpdf/webdavdemo/lori demo/demo.pdf ! Talk to Karl about adding your own files Adobe Confidential bc Q&A everywhere Adobe Confidential you look™ bc everywhere you look™ bc everywhere Adobe Confidential you look™ bc 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. ADBC: Getting Started 15 • 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 16 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 { // try to connect to the data source "my Data" connect = ADBC.newConnection("my Data"); if (connect == null) throw "Could not connect"; // get a statement object statement = connect.newStatement(); if (statement == null) throw "Could not execute newStatement"; } 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 = connect.newStatement(); ADBC: Getting Started 17 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 { connect = ADBC.newConnection("my Data"); if (connect == null) throw "Could not connect"; statement = connect.newStatement(); if (statement == null) throw "Could not execute 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(); var row = statement.getRow(); // get a row object this.getField("id").value = row.ID.value; this.getField("firstname").value = row.FirstName.value; this.getField("lastname").value = row.LastName.value; ...... more fill in statements .......... ADBC: Getting Started 18 this.getField("telephone").value = row.Telephone.value; this.getField("income").value = row.Income.value; } catch(e) { 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(); var row = statement.getRow(); // get a row object this.getField("id").value = row["ID"].value; this.getField("firstname").value = row["First Name"].value; this.getField("lastname").value = row["Last Name"].value; ...... more fill in statements .......... this.getField("telephone").value = row["Telephone"].value; this.getField("income").value = row["Income"].value; } catch(e) { 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 { // construct the update string---update all fields var updateStr = "UPDATE ClientData" +" SET FirstName='"+this.getField("firstname").value+"'," +" LastName='"+this.getField("lastname").value+"'," +" Telephone='"+this.getField("telephone").value+"'," +" Income="+this.getField("income").value +" WHERE ID="+this.getField("id").value; // for debug, see what we have just constructed // console.println(updateStr); // and execute the update statement.execute(updateStr); } catch(e) {} ADBC: Getting Started 19 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. ADBC: Getting Started 20