Recently in Acrobat Category

Share

Adobe Presenter 7 is one of the great new applications that is included in Adobe Acrobat 9 Pro Extended. With just a few clicks in PowerPoint, you can transform drab presentations into engaging Adobe® Flash® multimedia experiences. You can easily add narration, animations, interactivity, quizzes and software simulations to your presentations and then export that to a PDF file. If you haven’t seen it in action, I’ve got a great example here.

More Fun with JavaScript and the "Redact" Annotation

| 2 Comments
Share

A few months back I posted an article introducing
Joel’s Redaction Utilities
.
For those of you still unfamiliar with what redaction is I’ll quote from that article…

 

One of the ways that Adobe Acrobat 9 can help you control your work is to make it easier to remove sensitive information before distributing it outside your organization. For those of you not in the legal profession, this is called redaction. Redaction is designed to permanently remove from the document all content that is being redacted and to put an indicator that this happened in it’s place.

 

The way that redaction works in Acrobat 9 is that you first create redaction marks which doesn’t remove any content and then after you have worked your way through the document completely, you apply those redactions and the information is remove and replaced with, usually black, boxes and optionally codes that indicate the reason the information was removed.

 

If you’ve spent any time in Acrobat SDK land, it shouldn’t come as a surprise that the redaction markup is just special type of annotation.

 

Well – Rick Borstein, the guy behind the Acrobat for Legal Professionals blog asked me to create another example to show how you can use Acrobat JavaScript to streamline repetitive tasks like applying redaction codes to a set of reaction annotations. Typically, you’d need to open up each redaction annotation’s properties dialog to change or set the redaction code one at a time. With just a few lines of JavaScript, you can dramatically reduce the number of steps.

Share

The Acrobat 9.1 SDK documentation is here!

The Acrobat 9.1 SDK documentation is available in the Acrobat 9.1 SDK download. For offline use, you can download the SDK documentation to your local drive.

ZIP files in PDF Portfolios

| 8 Comments
Share

Why can’t I add ZIP files to a PDF Portfolio?

Ok – so this isn’t exactly a developer topic but the question has popped up in my inbox with enough regularity that I thought I’d write an article about it.

You can try to add a ZIP file to a PDF Portfolio but then you see the warning dialog to the right. If you choose to click "OK", the ZIP file will be added to the PDF Portfolio. Great!

Actually – not so great. No one will be able to open or extract the ZIP from the Portfolio unless they hack their registry (Windows) or plist (Mac). So even though you were able to add the .ZIP file, it’s of very little use if you plan on sharing that PDF Portfolio with a broader audience.

The list of embargoed file types is a lot longer than just ZIP. You see the same warning if you attach EXE, VBS, BAT, DLL, or JS because they are associated with malicious programs, macros, and viruses that can damage your computer; the list goes on and on.

PDF Portfolios use ZIP Compression:

So here’s the good news, when you add a folder full of files to a PDF Portfolio guess what happens. That’s right – Acrobat uses ZIP compression to bundle them up. You don’t actually need to go through the process of zipping a folder full of files and then add the ZIP to the Portfolio. Just skip the zipping step add the folder directly to the Portfolio. The file size of the PDF Portfolio and a ZIP with the same set of files in it is virtually identical plus you get a great Flash UI to help people find what they need inside the Portfolio.

Share

This is it! The last in my seven part series on developing custom PDF Portfolio
layouts has been posted. This one discusses adding files and resources.
Jump on over to Part 7 and take a look.

What now?

You didn’t really think there would be only seven did you?
I’m just getting started. Now that you have a chance to understand the basics with simple (and frankly…. ugly) examples, it’s time to make something functional and pretty.

I’m thinking about writing a few “utility” navigators and have a few ideas of my own but am interested in hearing from my dear readers as well so please comment with your ideas. Here’s a short list of what I’ve been thinking about.

Drag-n-Drop Ordering Wouldn’t it be great if you could just drag your files around into the order that you want them to appear? I’ve got some ideas on how to do that and actually have the order stick in other navigators that respect the sort order.
Advanced Folder Navigation By default, folders appear as items but I want to be able to build a tree just like some of the Adobe ones do and then be able to drag-n-drop files between.
A Vertical Navigator “Bar” I’m thinking something slim and sleek that sits on the side and uses the splitter to give you a nice big preview window but easily navigate the PDF Portfolio.
User Defined Thumbnails Add your own thumbnails to the files that don’t auto-generate them.

In addition to the utility navigators, I’m going to try putting together a few more visually stunning examples with some cooler navigation and animations so stay tuned.

Redact to Highlight and Back

| 16 Comments
Share

One of the ways that Adobe Acrobat 9 and X can help you control your work is to make it easier to remove sensitive information before distributing it outside your organization. For those of you not in the legal profession, this is called redaction. Redaction is designed to permanently remove from the document all content that is being redacted and to put an indicator that this happened in it’s place.

The way that redaction works in Acrobat 9 is that you first create redaction marks which doesn’t remove any content and then after you have worked your way through the document completely, you apply those redactions and the information is remove and replaced with, usually black, boxes and optionally codes that indicate the reason the information was removed.

More Fun with the JavaScript API:

If you’ve spent any time in Acrobat SDK land, it shouldn’t come as a surprise that the redaction markup is
just special type of annotation. To demonstrate how easy it is to extend the redaction functionality through JavaScript, I wrote “Joel’s Redaction Utilities”; a simple JavaScript that can be used to toggle redaction markup and highlight annotations. The bulk of the script is actually stolen from my earlier post which iterated through every annotation in the PDF file and…. well…. rather than repeat myself, you can read all about it here.

The beauty of working with the different annotation types in Acrobat JavaScript is that the annotation objects share many of the same common properties. Redaction markup is an annotation of the type “Redact” and highlights are annotations of the type…. you guessed it…. “Highlight”. The one thing you need to know about toggling annotation types is that you actually can’t. The “type” property of an annotation object is read-only. What you need to do (and what’s demonstrated in the example JavaScript) is to collect from the original annotation all of the properties that you are necessary to create a new one of a different type in it’s place. Then you add the new annotation and destroy the original. In the case of this example I get the “quads“, an array of coordinates representing the corner points of a rectangle, and the page number of the original annotation then use those settings as properties for the new one. The new annotation shows up at the exact same coordinates as the original but behaves differently because it’s of a different type. It’s kind of like those transporter accident episodes of Star Trek TOS; all of the properties of the original are basically the same but now Spock has a goatee.

This example demonstrates:

This JavaScript code will add a menu item “Joel’s Redaction Utilities” at the bottom of the “Edit” menu.

Under that menu, you will find two additional menu items.

  • Convert Redaction Marks to HighlightsThis menu item will convert all Redaction Marks to Highlights. The Highlight color will be the same color as your default (usually Yellow).
  • Convert Highlights to Redaction MarksThis menu item will convert all Highlights to Redaction Marks – The Redactions will not be applied by this script though it can be easily modified to do so.

Installing Joel’s Redaction Utilities

1. Quit Acrobat if it is already running

2. Download “Joel’s Redaction Utilities” and then copy the ADBE_JFG_RemoveMatchingAnnots.js file into the following file location:

a. WIN XP

C:\Documents and Settings\Administrator\Application Data\Adobe\Acrobat \9.0\JavaScripts

b. WIN 7 and VISTA

C:\Users\USERNAME\AppData\Roaming\Adobe\Acrobat\9.0\JavaScripts

c. MAC OSX

/Users/YOURUSER/Library/Application Support/Adobe/Acrobat/9.0_x86/ JavaScripts

3. Restart Acrobat

Share

I got an interesting request from Rick Borstein who is one of our Acrobat Product Specialists. It seems that one of his customers is using the new Compare Documents feature in Acrobat 9 for long legal documents. This is actually a perfect use case for this feature but the customer is hampered by the fact that Compare Documents can sometimes find too much. As a text heavy legal document, they don’t have much need for the per pixel differences in graphics and certainly don’t need to see “Matching graphic not found” beside every change bar.

The customer was either looking for a way to “tune” what Acrobat was looking for, which will need to wait for the next release, or simply have an easy way to remove the change indicators that they don’t need. The one tricky part was that they wanted a user interface (UI) to delete all of the change indicators that matched a different set of criteria. I’m not much of a UI designer and even with Windjack’s Acrodialogs plug-in, creating a UI in Acrobat JavaScript would have turned this fun experiment into…. well…. work!

Background:
When Acrobat 9 compares documents, the change indicators that it creates are actually annotations. The Acrobat JavaScript API has been able to manipulate annotations since version 5.0 and that part of the API has evolved quite a bit since then. Because you can ask Acrobat JavaScript to collect the annotations into an array and filter them based on a variety of criteria, it doesn’t require a lot of code to grab all of the annotations in a document and process them; “for” loops can be a lazy programmers best friend.

The Script:
By installing the JavaScript in a folder at the application level, I was able to add a menu item that makes this simple script behave like an Acrobat feature available to any document.

To solve the UI problem, I decided write the script so that it could detect which annotation was selected, determine it’s properties and then look for more just like it. That way the user just needs to select an annotation, choose my menu item "Delete Annotations of the Same Type and with the Same Content as the one Selected" and all that’s it. No UI required.

The links in the bullet list will take you to the appropriate section of the Acrobat JavaScript Reference.

The example demonstrates

This JavaScript will add a menu item “Joel’s Comment Utilities” under “Comments” menu.
Under that menu, you will find three additional menu items.

  • Delete “Matching graphic not found” Annotations
    This menu item will delete all “Highligh” annotations with content “Matching graphic not found”

  • Delete Annotations of the Same Type and with the Same Content as the one Selected
    To use this menu item, select one of the type of comment that occurs frequently that you want to remove all of then select the menu item.
    All comments of the same type and same content will be deleted.

  • Count Annotations of the Same Type and with the Same Content as the one Selected
    Same as above except that comments are not deleted, they are simply counted.

Installing Joel’s Comment Utilities
1. Quit Acrobat if it is already running
2. Download “Joel’s Comment Utilities” and then copy the ADBE_JFG_RemoveMatchingAnnots.js file into the following file location:

a. WIN XP
C:\Documents and Settings\Administrator\Application Data\Adobe\Acrobat \9.0\JavaScripts

b. WIN VISTA
C:\Users\USERNAME\AppData\Roaming\Adobe\Acrobat\9.0\JavaScripts

c. MAC OSX
/Users/YOURUSER/Library/Application Support/Adobe/Acrobat/9.0_x86/ JavaScripts

3. Restart Acrobat

Using the Reduce Comments Script
1. Open a PDF containing comparison comments
2. Choose one of the following commands:

a. Comments | “Joel’s Comment Utilities” | Delete Matching Graphic Not Found Comments
    – or -
b. With another type of comment selected, choose:
Comments | Joel’s Comment Utilities | Delete Annotations with same content as one selected

Share

The sixth in my seven part series on developing custom PDF Portfolio
layouts has been posted. This one discusses sorting.

Jump on over to Part 6.

Share

The fifth in my seven part series on developing custom PDF Portfolio layouts has been posted. This one discusses working with document metadata.

Jump on over to Part 5.

Share

The fourth in my seven part series on developing custom PDF Portfolio layouts has been posted. This one discusses working with thumbnails.

Jump on over to Part 4.

As a reminder, here are the topics with links to the what I have posted so far

The “Customizing PDF Portfolio Layouts” Series

Coming soon I’ll have…

  • Part 5: Working with Metadata
  • Part 6: Sorting
  • Part 7: Adding Resources and Files