AD07 A Tool to Automate TFL Bundling

Similar documents
Introduction to Adobe Acrobat X. Ken Dickinson Bay Area Computer Training

The Professional Services Of Dojo Technology. Spreadsheet Files

How to Create a PDF. Using Acrobat Distiller. Acrobat Distiller settings. Adobe Acrobat Professional 8.0 Guide

Overview 14 Table Definitions and Style Definitions 16 Output Objects and Output Destinations 18 ODS References and Resources 20

What you will learn 2. Converting to PDF Format 15 Converting to PS Format 16 Converting to HTML format 17 Saving and Updating documents 19

USER S GUIDE Software/Hardware Module: ADOBE ACROBAT 7

Design your source document with accessibility in mind. Do NOT use character formatting for headings, use the program s styles.

How to create a PDF document for Duplicating to print for you.

Center for Faculty Development and Support Making Documents Accessible

Reviewing Changes. 5. Click Search. A list of changes that include the specified word or words is displayed in the lower text area.

COMPUTER APPLICATIONS TECHNOLOGY

HOW TO DOWNLOAD, INSTALL, and USE HTMLDOC v FOR WINDOWS

SAS (Statistical Analysis Software/System)

SAS (Statistical Analysis Software/System)

Word processing software

Business Intelligence and Reporting Tools

Portable Document Format (PDF) Options for the Mac User. Bob van Lier

ABOUT WEB TECHNOLOGY COURSE SCOPE:

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application.

Getting started with Minitab 14 for Windows

Workbooks (File) and Worksheet Handling

Google Apps for Education: The Basics

THE AMERICAN LAW INSTITUTE Continuing Legal Education. Adobe Acrobat for Lawyers October 4, 2017 Video Webcast Studio Recorded August 3, 2017

Adobe Acrobat Basics

ithenticate User Guide Getting Started Folders Managing your Documents The Similarity Report Settings Account Information

Line Spacing and Double Spacing...24 Finding and Replacing Text...24 Inserting or Linking Graphics...25 Wrapping Text Around Graphics...

QDA Miner. Addendum v2.0

Chapter 10 Linking Calc Data

PEERNET File Conversion Center

Criterion C: Product Development

ICH M8 Expert Working Group. Specification for Submission Formats for ectd v1.1

Report Commander 2 User Guide

Creating an Accessible PDF

MS Excel VBA Class Goals

PrimoPDF Enterprise User Guide, Version 5.0

Mastering phpmyadmiri 3.4 for

[AVWSQ-ADWCS6]: WSQ ICDL Adobe Dreamweaver CS6

MERGE EXCEL WORKBOOKS 2010

CST272 Getting Started Page 1

TLFs: Replaying Rather than Appending William Coar, Axio Research, Seattle, WA

The clean-up functionality takes care of the following problems that have been happening:

Unit 4 The Web. Computer Concepts Unit Contents. 4 Web Overview. 4 Section A: Web Basics. 4 Evolution

Figure 1 Properties panel, HTML mode

Excel Vba Manual Calculation One Sheet Only

Using PDF Files in CONTENTdm

WPS Workbench. user guide. "To help guide you through using the WPS user interface (Workbench) to create, edit and run programs"

Operator's Manual. Pro Logger II Downloader. TRIO Smartcal Pty Ltd

Document/Presentation Accessibility Best Practices. Table of Contents. Microsoft Word 2013, PowerPoint 2013, Excel 2013 and Adobe PDF

User s Guide to Creating PDFs for the Sony Reader

Style Report Enterprise Edition

Macros enable you to automate almost any task that you can undertake

Creating Accessible Microsoft Word 2003 Documents Table of Contents

USER GUIDE MADCAP FLARE Topics

C exam. Number: C Passing Score: 800 Time Limit: 120 min File Version: 1.0.

Lab 7 Macros, Modules, Data Access Pages and Internet Summary Macros: How to Create and Run Modules vs. Macros 1. Jumping to Internet

Calc Guide. Chapter 6 Printing, Exporting and ing

Making the Most of Microsoft Word: Hands-on Activities for Creating Word Documents for Conversion to HTML or PDF.

BASIC EXCEL SYLLABUS Section 1: Getting Started Section 2: Working with Worksheet Section 3: Administration Section 4: Data Handling & Manipulation

SAS (Statistical Analysis Software/System)

Macros enable you to automate almost any task that you can undertake

Microsoft Excel 2007 Macros and VBA

Datasheet Version V7R1M0

PEERNET PDF Creator Plus 6.0 Thank you for choosing PDF Creator Plus! Getting Started QUICK START GUIDE

MICROSOFT EXCEL 2013 DATA ANALYSIS WITH TABLES QUICK REFERENCE GUIDE CHEAT SHEET OF INSTRUCTIONS TIPS SHORTCUTS LAMINATED CARD

Web Site Development with HTML/JavaScrip

Microsoft Visual Basic for Applications

Superlock II. Manual for Printing / Exporting Excel Reports for

Table of Contents. Word. Using the mouse wheel 39 Moving the insertion point using the keyboard 40 Resume reading 41

MICROSOFT EXCEL KEYBOARD SHORCUTS

Tutorial 8 Sharing, Integrating and Analyzing Data

Ms Excel Vba Continue Loop Through Worksheets By Name

Your Total Training Resource. Microsoft Visio. To Schedule / Need Additional Information

BusinessObjects Frequently Asked Questions

Online Interactive IT Training Programmes for Staff Course Outline

Generating a Custom Bill of Materials

Understanding Acrobat Form Tools

HTMLDOC On Line Help

CST272 Getting Started Page 1

BIM II IC3 & MOS Certification Pacing Guide

Creating PDF documents for User Manual

Creating Accessible, Section 508 Compliant PDFs with Adobe Acrobat Pro DC

National Training and Education Resource. Authoring Course. Participant Guide

Spelling-Punctuation-Grammar Subject How will you promote high standards within this module? Term Duration (approx.)

bbc Overview Adobe Acrobat SDK November 2006 Version 8.0

PREPARING MICROSOFT WORD FOR MAC 2011 DOCUMENTS FOR CONVERSION TO ACCESSIBLE PDF FILES

Instructions On How To Use Microsoft Word 2010 Pdf Filetype

Kepware Technologies KEPServerEX, DDE, and Excel

The Item_Master_addin.xlam is an Excel add-in file used to provide additional features to assist during plan development.

Using PDF Files in CONTENTdm

OpenOffice.org Writer

ABSTRACT MORE THAN SYNTAX ORGANIZE YOUR WORK THE SAS ENTERPRISE GUIDE PROJECT. Paper 50-30

HTMLnotesS15.notebook. January 25, 2015

Overview. Finding information and help Adobe Acrobat. Where to find it and why to use it. When converting from Word to Acrobat

Partners. Brief Description:

G FAQs. Introduction... 1 Task 1 WEBSITE... 2 Task 2 SPREADSHEET... 4 Task 3 DATABASE... 8

CSLDSSSL - An Annotatable DSSSL Stylesheet

Base and Advance SAS

A Comprehensive Look at Foxtrot s Action Library

Quick Guide for Accessible PDF Training:

DOWNLOAD PDF VBA MACRO TO PRINT MULTIPLE EXCEL SHEETS TO ONE

Transcription:

AD07 A Tool to Automate TFL Bundling Mark Crangle ICON Clinical Research

Introduction Typically, requirement for a TFL package is a bookmarked PDF file with a table of contents Often this means combining individual files into one document Can be difficult if individual files are in different formats to meet sponsor requirements Existing method at ICON used SAS macros to read in TFL metadata and output VB script which were used in MS Word to pull the TFLs together Worked well with smaller sets of TFLs but could be unreliable and slow to run with large numbers of TFLs Existing metadata system was being retired and opportunity to build a new system addressing some of the issues of the old method 2

Building a New Tool The new solution had several key requirements 1. Able to generate a PDF file with a Table of Contents and bookmarks that both linked through the document 2. Uses TFL metadata to ensure TOC and bookmarks match the content of TFLs 3. Increased automation to reduce the amount of user input needed 4. Quicker and more reliable than existing solution Quicker and more reliable than existing solution - Existing solution joined all files together in Word then converted that to PDF - With increasing size of TFL files, this was exponentially increasing the computation time for each step - Needed to find a way to split the conversion and bundling into smaller parts so that performance was the same regardless of the package size - This was the focus of the early development of the new tool 3

Creating a PDF file from a Web Page Adobe Acrobat contains a function to convert an entire web page to PDF Reads in the HTML file and creates output file matching the input HTML in appearance Links in the HTML file work in the body of the document and are created as PDF bookmarks There is an option to append the link contents into the document If we could develop a HTML page to represent the Table of Contents, with links to the individual files, then this could be converted into one document by Adobe Acrobat 4

Creating a PDF file from a Web Page HTML syntax Only relatively simple HTML syntax was needed to create our table of contents: <html> <head> <title>table of Contents</title> </head> <body> <table> <tr> <td><a href= file.pdf >Table 14.1.1</a></td> <td>title</td> <td>page #</td> </tr> Any The Inside Each Other HTML head row cells the in of section <body> file can the starts be table contains tags added with is we to <html> start defined the TOC <title> and and with for end tag. ends the the When TFL <td> <tr> with table title tags </ itself and html> converting with page <table> number tags to tags PDF, within this the forms Here, document we the also default give title the of link the document to the individual and also TFL the file with name the <a> of tag the bookmark that points to the first page The href option gives the location of the file which can beeither relative or absolute location This is displayed as the TFL number which is a clickable link </table> </body> </html> 5

Creating a PDF file from a Web Page Appending TFLs Appending TFLs of differing file-types didn t work as expected Adobe used default page sizing, margins and font that often wasn t as required Therefore, we had to ensure that we could supply individual PDF files in the hyperlinks Ideally, TFLs would be created in PDF format for this but we included a step to convert and non-pdf files to PDF Decided to limit conversion to file types that could be opened in MS Word Any figures would need to be provided in an RTF or already converted to PDF Raw image would not be accepted 6

Defining the Process Read in user options Read in list of TFLs to be combined Loop through each one and convert to PDF Create HTML file with links to each file Read HTML file into Adobe Acrobat Formatting changes to PDF file For Create each The Supply Save the file, user HTML it the To loops specifies allow PDF HTML file through by file some a file looping and list to to flexibility, of apply the check TFLs again Create formatting the to within through be file PDF included, type a standard changes the from list Web along converts of to format TFLs Page bookmark with and to the feature PDF adding location text if of possible. a row These for files each where are user TFL saved they with is are allowed in a saved a link temporary to the specify and Adobe the location file TFL options properties Acrobat title of in the to the control corresponding be user s included appearance home on directory. PDF the TOC version Any files that do not require of the conversion Table of and Contents are in of the copied each bookmarks and one to conversion the temporary to PDF location as PDFs 7

Building the Tool After considering SAS macros, we decided to use an Excel spreadsheet and macros for the tool Existing metadata could be easily read into Excel Control of MS Word for TFL conversions directly rather than going through DDE Make use of Adobe s Inter Application Communication (IAC) library directly from VBA macros TFL information would be taken from metadata and imported to Input sheet along with input from the user Options for certain aspects of the packaging and conversion entered into Options sheet and saved as macro variables by VBA code 8

Challenges Sending Keypress Events Some parts of the process can only be done from menus in MS Word or Adobe Acrobat Setting initial print settings required for PDF conversion Reading in the HTML file in Adobe To avoid user input, solution was to use KeyPress method in VBA code to send key press events directly to active application Using keyboard shortcut keys, the menus could be navigated this way Sequence of key presses would be dependent on program versions User was trained on when these commands would be run so as not to activate any other applications 9

Challenges Waiting for File Conversions Conversion to PDF was done by printing from Word to PostScript (PS) files and then using PDF Distiller to convert that to PDF Commands for PS file sent from VBA macro to Word Commands to PDF conversion sent using PDF Distiller library available in VBA For both steps, after sending the command to start creating the file, macro tries to move to next step but fails if file creation has not finished To prevent this, created a loop that would not exit until file size had stopped increasing lngfsize = FileLen(tempPSFileName) flag = 0 i = 1 Do While (flag = 0) newsize = FileLen(tempPSFileName) If newsize = lngfsize Then flag = 1 Else lngfsize = newsize Application.Wait (Now() + TimeValue("00:00:02")) i = i + 1 End If Loop Get Initialise Inside If file initial size the flag is file loop, different as size check the indicator then to current reset stop the the file comparison size loop and if i to size it count equals variable iterations the to the previous current size size, then increment set flag the to loop exit and the loop wait on 2 seconds its next iteration for the next iteration 10

Challenges Updating PDF Formatting Default bookmark text in final file just uses the filename so this needed to be updated Can also update document properties and default view so that document always opens with Use Inter-Application Communication libraries created by Adobe and available in VBA Library of OLE objects that can be referenced directly in VBA code to control document properties and appearance Nothing exists in IAC to create a PDF file from web page so this part is still done with SendKeys as above To open an instance of Adobe Acrobat use the code Set Acroapp = CreateObject("AcroExch.App", "") Acroapp.Show

Challenges Updating PDF Formatting After opening application we can define objects in the Application (AV) and Portable Document (PD) layers to access document information AV Layer controls the user interface for Adobe PD Layer provides access to the information within the document and can perform basic manipulations Set PDYourDoc = CreateObject("AcroExch.PDDoc", "") Set AVYourDoc = CreateObject("AcroExch.AVDoc", "") bfileopen4 = AVYourDoc.Open("C:\pdf.pdf", "Package") Set PDYourDoc = AVYourDoc.GetPDDoc Create Open Load the objects PD combined layer the PDF AV and PD document information layers that of the has document already been that is saved open in the AV layer Further methods then exist in the PDDoc object to set bookmark text, document properties and default view when the document is opened

Conclusion The challenge was to come up with a robust replacement for our existing packaging tool with greater levels of automation By using Excel as the input method and running VBA macros we ve been able to simplify the input and link to metadata Using SendKeys method, removes the need for user interaction in the more complicated parts of the process, reducing the opportunity for error Inter-Application Communication is used to directly control document properties so that the final PDF file does not need any further user manipulation 13

ANY QUESTIONS? 14