« Older Entries Newer Entries » Subscribe to Latest Posts

25 Sep 2011

Worldwide Photo Walk 2011

Posted by khk. No Comments

It’s Worldwide Photo Walk time again – this time it’s not just one day, it’s a weekend of photo walks.


Just in case it’s not clear what I’m talking about, here is a short explanation. For the forth time Scott Kelby has organized a worldwide event: Groups of photographers will gather on the weekend of October 1st and 2nd and take pictures for about two hours. It is very interesting to experience how (up to) 50 people basically looking at the same “things” interpret what they see completely differently.


I’m leading the Rochester, NY walk at High Falls this year (after leading a downtown walk in Rochester two years ago, and a walk in Memmingen, Germany last year).


If you are interested in photography, are in Rochester, NY and have some time, join us for this years Worldwide Photo Walk.


You can find pictures from previous walks on Flickr: Rochester and Memmingen.

Rusty Leaf

Photographer's Breakfast

18 Oct 2010

The X Files: Acrobat Edition

Posted by khk. Comments Off on The X Files: Acrobat Edition

[This blog post appeared first on my professional site at KHKonsulting.com – Please head over there if you want to comment or see any potential comments to this article]

A New Version of Acrobat

Have you noticed that it’s been more than two years since the release of Adobe Acrobat 9? Usually, Adobe releases a new version every 18 to 24 months, so a new version has been overdue. Today they let the cat out of the bag, and announced Acrobat X. There is already a lot of information available about what it is, and to some extend also how it is different from previous releases.

Take a look at the press release to get a quick overview of what’s new, or browse over two Adobe TV and watch the Acrobat X Tips & Tricks episodes. There is a lot of information available to give you a pretty good idea about what’s new and different.

User Interface

If you’ve attended one of my training seminars about Acrobat, you know that one of my pet peeves has always been that Adobe added to the UI clutter with every new release of Acrobat. Yes, every now and then they tried to clean it up, but at the end, it just caused more and more confusion among both novice, but also experienced users.

This time around, they took a completely new approach and ripped out the old menu and toolbar system and replaced it with something completely new. I am still trying to wrap my head around where things are now located, but in general, the new layout is a good idea. It will be much easier for the novice user to explore the UI and find new features that they might want to use, but for users who’ve worked with Acrobat since the early days of the product (in my case since Acrobat 3), it will take a while until we find all the tools that we’ve known by heart. But in the long run, I think it’s a good move, and I am more than willing to go through the learning process to get to know the new UI.


Every time Acrobat changed it’s UI in the past, there were major ripple effects through the plug-in community – things just did not work anymore, or not quite right, and we plug-in developers had some work to do to modify our plug-ins so that users could rely on these 3rd party components again.

If you have not yet tested your own plug-ins on an Acrobat X pre-release, don’t waste any time. Chances are that your code needs to be modified to work seamlessly with Acrobat X. If you need help with that, get in touch with me, I am a seasoned plug-in developer and I can certainly assist you with those efforts.

Favorite Feature

I don’t have a favorite new feature, but I have two favorite updated features:

Number one is what Adobe has done with Portfolios. In my opinion, Portfolios were one of the most underused features in Acrobat 9, and I hope that the updates to the Portfolio system will help to give that feature the necessary exposure so that we see more and more of these compound documents.

My number two updated feature is the much improved export function to other file formats. Whenever I had to create a MS Word document out of a PDF file in the past, it was always a hit-or-miss job – some documents worked reasonably well, others didn’t work at all. But regardless of how well it worked, there was always some editing necessary after the export to make the Word file look like the original PDF document. With the new export in Acrobat X, I get Word documents that look exactly like the PDF file. Great job, Adobe!

23 Sep 2010

Reading PDF Form Fields with VBA

Posted by khk. 26 Comments


Please visit the same post on my business site. The comments are closed here, so if you want to comment, you have to head over to http://khkonsulting.com/2010/09/reading-pdf-form-fields-with-vba/

I’ve written about VBA and Acrobat JavaScript before, and I’ve also mentioned that you can combine VBA and JavaScript to access PDF form fields, but I still owe a sample for that. I had to answer another question today about how to exactly do that, so I whipped up a quick sample program that demonstrates the use of the JavaScript Object (JSO) to read and write AcroForm fields.

We start the same way as in my old VBA sample to create a VBA program that references the Acrobat TLB and to add a button to a document. When we now use the following script as the button handler, we can work with form fields:

Private Sub CommandButton1_Click()
    Dim AcroApp As Acrobat.CAcroApp
    Dim theForm As Acrobat.CAcroPDDoc
    Dim jso As Object
    Dim text1, text2 As String

    Set AcroApp = CreateObject("AcroExch.App")
    Set theForm = CreateObject("AcroExch.PDDoc")
    theForm.Open ("C:\temp\sampleForm.pdf")
    Set jso = theForm.GetJSObject

    ' get the information from the form fields Text1 and Text2
    text1 = jso.getField("Text1").Value
    text2 = jso.getField("Text2").Value

    MsgBox "Values read from PDF: " & text1 & " " & text2

    ' set a text field
    Dim field2 As Object
    Set field2 = jso.getField("Text2")

    field2.Value = 13   ' assign the number 13 to the fields value

    ' get the information from the form fields Text1 and Text2
    text1 = jso.getField("Text1").Value
    text2 = jso.getField("Text2").Value

    MsgBox "Values read from PDF: " & text1 & " " & text2


    Set AcroApp = Nothing
    Set theForm = Nothing

    MsgBox "Done"
End Sub

This program requires a PDF file with text fields called “Text1” and “Text2” to be stored as C:\temp\sampleForm.pdf. With the explanation in the previous two blog posts, it should not be hard to understand what’s going on here. The only new command introduced is the getField() function, which returns a form field. The form field object has a property “value” which contains the actual value that’s assigned to the field. Give it a try and let me know how it works for you. The updated form field is not saved (because the document does not get saved) – I’ll leave that up to the reader to figure out.

Also, this program will not work with XFA forms (the ones you create in Designer). For those, you need to use the XFA DOM to access the form data. For anybody interested in XFA forms, the LifeCycle Designer ES Scripting Reference is a must read.

18 Aug 2010

Multiple Flickr Publishing Services in Lightroom 3

Posted by khk. No Comments

One day you need your Flickr uploads resized to 1000×1000 pixels, the next day you need to allow only friends and family access to your uploads – is there a way to make the Flickr upload more streamlined from within Lightroom?

Since the release of Lightroom 3 there is a convenient Flickr publishing service built right into the application, and with a few mouse-clicks users can upload any selection of images stored in the Lightroom catalog.

Thanks to the foresight of the designers of the application (or the beta testers), it is possible to set up multiple Flickr publishing services with different settings. In the following tutorial I will demonstrate how that is done. At first we’ll look at the long and complicated (no, not really) method – which you need to create your initial Flickr publishing service, but can also be used for the second, third and so on service. Then we’ll use a shortcut to create the “other” publishing services.

It does not matter if you’ve already set up one Flickr publishing service, or if you are starting from scratch, the process is the same. When you look at the left panel in Lightroom, you will see the “Publish Services” category with a little “+” sign to the right of the category title – plus a small triangle that indicates that there is a menu hidden behind the plug sign.


Once you click on that plus sign, the menu will be displayed. Select the “Go to Publishing Manager…” menu item, which will display the …


… “Lightroom Publishing Manager” dialog.


Right below the list of “Publish Services” on the left side is the “Add” button to add new services to the list. Click on that and specify the details for the new service.


That’s it. Now just drag&drop your images on one of the Flickr publishing services, and once you are done, select to actually publish the images by right-clicking on the Photostream (or your custom photo set) and select to “Publish Now”:


So, now that we know the long way, here is a shortcut: Once you have your first Flickr publishing service installed, just right-click on that publishing service and select “Create Another Publish Service via ‘Flickr'”:


After that, just follow the instructions above to setup the service.

18 Aug 2010

Best Way to Learn Acrobat Scripting

Posted by khk. Comments Off on Best Way to Learn Acrobat Scripting


Please visit the same post on my business site. The comments are closed here, so if you want to comment, you have to head over to http://khkonsulting.com/2010/08/best-way-to-learn-acrobat-scripting/

Every now and then I come across the question “What is the best way to learn scripting for Adobe Acrobat? Are there any books or other resources averrable?”. After doing some research, I think I finally found the best resource for beginners and for seasoned Acrobat JavaScript programmers that need a quick tip or a recipe to copy&paste into a project:


The site offers content for both paying members and the general public. If you are new to scripting, and you don’t want to spend the money for a membership (yet), take a look at the free content at http://www.pdfscripting.com/public/department40.cfm – it walks you through creating your first AcroForm script, but also offers a number of videos that explain more complicated concepts. For the really good stuff however, you have to pay.

Ever wondered how to hook up a PDF form with an Excel spread sheet? Wonder no more! The article series “Acrobat, PDF and Excel Spreadsheets” teaches you more than you ever wanted to know about that subject.

You may remember my post about dynamic stamps in Acrobat. The PDFScripting.com site has a lot more information about dynamic forms and provides a number of very interesting samples (video link).

There is a ton more information available for both AcroForm and LiveCycle Designer scripting. This information comes in form of articles, videos, a copy&paste script library and downloadable sample files that illustrate a subject.

To get familiar with the web site, Thom Parker has recorded a video tour that helps to navigate the site, but also gives a pretty good overview about what’s available both for free and for paying members at “Take a tour of the PDFScripting.com website!” (video link).

So, no need to ask me for a good Acrobat scripting resource anymore, just go to PDFScripting.com and sign up for a year – it’s well worth the membership fee (and as Thom says in his tour video, no surprise at the end of the year, the membership does not automatically renew).

7 Jun 2010


Posted by khk. 1 Comment


17 May 2010

The Small Show Is Back!

Posted by khk. Comments Off on The Small Show Is Back!

It’s this time of the year again: The Small show at the High Falls Art Gallery in Rochester, NY Is about to open. Join the artists for the public reception on Sunday, May 23rd from 3 to 6pm.


Here is a link to the PDF version of the invitation.

If you don’t want to download the PDF invitation, here is the important information from the document:

High Falls Art Gallery

Small Works of art no larger than twelve inches

Public Reception Sunday May 23, 2010 3-6pm

Music by Reilly Taylor-Cook and Hershel Mikel Jazz Duo 

7 May 2010

LinkedIn Pet Peeve

Posted by khk. Comments Off on LinkedIn Pet Peeve

Do you let LinkedIn post your tweets automatically as your LinkedIn updates? Here is a reason why that might be a bad idea: If you tweet too much, I may just hide your status updates in LinkedIn completely – not just your tweets, all your status updates!


In my opinion, when LinkedIn tried to get on the Twitter band wagon, they made a big mistake: When you connect a Twitter account to a LinkedIn account, you have a choice of either automatically posting every tweet to your LinkedIn status, or just the ones that are tagged with the #in or #li hash tag:


For the latter case, a Twitter user who tweets something that might be appropriate for LinkedIn can tag the tweet with #in and have it show up on LinkedIn automatically. That’s not a bad idea, and I’m fine with that. It gives the user control over what gets shared, and what not. Twitter and LinkedIn (or in general, all the social media platforms one uses) serve a different purpose, and in general it’s not a good idea to post the same message to all these platforms -but sometimes, there is something that should be shared across all services. The hash tag approach gives the user that control.

The “annoy all my LinkedIn connections with my most trivial Twitter drivel” option however really annoys me. One of the most attractive features of Twitter is that tweets have a limited life time. When they don’t show up in the small window of the Twitter timeline that I’m looking at, they don’t exist – unless I’m using search. I don’t have to read them, I don’t have to deal with them, I can safely ignore them. And I do! When they show up in my LinkedIn status updates however, I can no longer ignore them, and even more annoyingly, they push real status updates off the end of that page.

I wish LinkedIn would give me an option to hide all Tweets (or at least those that don’t have #in or #li in them). Because I don’t have that control, I do the next best thing: If your tweets on LinkedIn annoy me, I will hide your status updates.

23 Apr 2010

Is Your Acrobat Plug-in Still Using ADM?

Posted by khk. Comments Off on Is Your Acrobat Plug-in Still Using ADM?


Please visit the same post on my business site. The comments are closed here, so if you want to comment, you have to head over to http://khkonsulting.com/2010/04/is-your-acrobat-plug-in-still-using-adm/

For a few years now Adobe has been telling 3rd party developers that the ADM (Adobe Dialog Manager) will be discontinued, and that existing plug-ins may have to be ported to something else. If I remember correctly, this started with Acrobat 7 or 8, but back then it was a soft threat – everything still worked, and there wasn’t much incentive to start porting plug-ins. However, with the release of the Acrobat 9 SDK the ADM related header files were gone, but ADM based plug-ins were still working (at least some of them).

The removal of the header files does send a strong signal, but what was an even stronger signal for me was that one of the ADM based plug-in I was working on was no longer working correctly on some versions of Windows.

As far as Adobe is concerned, ADM is no longer supported – that means there won’t be any bug fixes for it, but the plug-in has to work with Acrobat 9 on any Windows system that’s supported by Acrobat 9. So, what is a developer to do in such a situation?

Adobe does not give us much guidance in what to chose as a replacement for ADM. The most obvious choice is to stick with the native UI framework that comes with the operating system, but the advantage of ADM was that one could write UI code that would run in both Windows and Mac plug-ins. One of the sample plug-ins – wxPlugin – that comes with the Acrobat SDK is based on wxWidgets. To me that was a pretty strong hint that wxWidgets would be a good choice…

However, even though the Mac version of the SDK does come with the wxPlugin code and even contains a XCode project file, it does not compile. After some work, trying to come up with a combination of wxWidget configuration options and wxPlugin project settings, I was able to create an Acrobat plug-in that worked.

In order to “fix” the Mac’s version of the wxPlugin I first had to compile wxWidgets. Use the following configure command line to create the static wxWidget libraries that can be linked with the project:

configure CC=gcc-4.0 CXX=g++-4.0 LD=g++-4.0 --enable-universal_binary \
--disable-shared --with-macosx-sdk=/Developer/SDKs/MacOSX10.4u.sdk \
--with-mmacosx-version-min=10.4 --enable-debug

Just install the libraries and include files according to the instructions provided by Adobe.

A closer inspection of the plug-in code then revealed that the part that actually did anything was commented out for the Mac with #ifndef MAC_PLATFORM statements, so I removed those and the last thing to do was to remove the reference to the libexpat library – it is provided by the operating system and does not have to be provided by wxWidgets.

With a working environment on the Mac, wxWidgets is a viable alternative for ADM for either new Acrobat plug-ins, or existing plug-ins that need to be modified to make them compatible with the current version of Acrobat.

If your Acrobat plug-ins are still using ADM, now would be a good time to think about what to do about that… If you need any help, let me know.

23 Mar 2010

Developing Acrobat JavaScript on a MacBook

Posted by khk. 8 Comments


Please visit the same post on my business site. The comments are closed here, so if you want to comment, you have to head over to http://khkonsulting.com/2010/03/javascript-console/

Acrobat’s JavaScript is a great tool to extend the application, or to automate reoccurring tasks. There are several ways a JavaScript can be added to the application or a document (e.g. folder level scripts, validation scripts, event handling scripts, …), but regardless of how a script is written, chances are that the developer wants to test parts of the script in Acrobat’s Javascript console. This console window can be shown by either using the “Advanced>Document Processing>JavaScript Debugger…” menu item or Ctrl-J on Windows or Cmd-J on a Mac:


After the console or debugger window comes up, the user can then enter Javascript and execute it…


… that is, as long as a full keyboard with a numeric keypad is used. In Adobe’s documentation, we find the following instructions to execute Javascript typed into the console window:

The JavaScript console allows you to evaluate single or multiple lines of code. There are three ways to evaluate JavaScript code while using the interactive console:

  • To evaluate a portion of a line of code, highlight the portion and press either the Enter key on the numeric keypad or press Ctrl + Enter.
  • To evaluate a single line of code, make sure the cursor is positioned on that line and press either the Enter key on the numeric keypad or press Ctrl + Enter.
  • To evaluate multiple lines of code, highlight those lines and press either the Enter key on the numeric keypad or press Ctrl + Enter.

That works fine as long as you have access to the numeric keypad, but on a MacBook or a MacBook Pro without that keypad. No key combination involving fn, ctrl, cmd or option with the Return or Enter key will result in the Javascript getting executed.

The virtual keyboard to the rescue: Mac OS comes with a handy keyboard viewer that allows us to send the correct key code to the application. To bring up the keyboard viewer, bring up the Mac OS System Preferences first and select the “Keyboard” category:


Make sure that the option “Show Keyboard & Character Viewer in menu bar” is selected. Once this is done, you can access the keyboard viewer from the menu bar:


Now comes the tricky part: Write some Javascript in the console window and place the cursor on the line you want to execute or select the snippet of the Javascript that should be executed. In the following example I’m using code from Adobe’s Javascript API documentation:

  var menuItems = app.listMenuItems()
  for( var i in menuItems)
    console.println(menuItems[i] + "\n")

With the console prepped, bring up the keyboard viewer and start pushing keys – real keys that is: Hold down the “fn” and the “control” key, then move the mouse pointer to the “Enter” key on the keyboard viewer and click it…


… and voila, the script gets executed:


This is not the most straight forward method, but at least it’s possible to use the Javascript console to execute code when using a MacBook.