Utilities - PDFzone
PDFZone Ziff-Davis Enterprise
Authoring | Utilities | Content Management | Document Management | Mobile | DRM | Other Formats | Tips
Home arrow Utilities arrow How to open a PDF with highlighted words
How to open a PDF with highlighted words
By PDFZone

Rate This Article:
Add This Article To:
ADVERTISEMENT
The goal: to launch Acrobat Reader from an external application, automatically highlighting some words.

-Courtesy of www.PDFzone.com

Question: How can I launch Acrobat Reader from an external application, automatically highlighting some words?--Filippo Mariani


Answers:

For adding the highlights, there are two good possibilities:
1. Add highlighting to the document before you send it to the user. This is not easy, but Reader would draw the content stream happily without the user needing to install a plug-in. This avoids the user having to re-install your application to get the plug-in back if they reinstall Acrobat Reader.

2. Write a Reader plug-in that registers for the AVPageViewDidDraw notification and draws highlighting on the just-drawn page using platform-specific drawing calls or AVPageViewInvertRect or AVPageViewInvertQuad.

For navigating to the desired page, there are two possibilities:
1. Before you send the PDF to the user, set the page-open action to go to the proper page. Like choice 1 above, this would require some server software for manipulating the PDF.

2. I think Acrobat supports some kind of IAC for legally (and without a plug-in) navigating to the proper page. I'm a plug-in person, not an IAC person, so this is as specific as I can get.

Be careful, certain things may be allowed by the license but the calls you use in a plug-in may not be implemented in Reader. I stick mostly to full-Acrobat plug-ins and have not done a Reader plug-in for a while, so you will have to check to see if the calls I named above are available in Reader.
--Dan-Ari Feinberg



The FDFToolkit supports adding JavaScript to a document that will be executed when the document is first opened, though it isn't mentioned in the FDF spec (which is within the PDF spec: 7.6.6.). Inside JavaScript you can change the current page and create annotations like little boxes around the appropriate words.

You might even be able to do something a bit fancier than little boxes. If you're willing to stick to Acrobat 5, you can use transparency. Form fields and annotations don't support it directly, but form fields to support having their appearance set to some file (button icon). This file can be any PDF. . . including one that's just a X% opaque box of whatever color you choose.
Unless you can make the "highlight" PDF available to your readers through a path (I don't know if URLs are supported or not), you'd have to embed the icon appearance in a hidden field. In JavaScript, you can then use field.buttonGetIcon and field.buttonSetIcon. That way might actually be easier. You set the icon scaling using buttonScaleWhen property (to always). --Mark Storer

 




Discuss How to open a PDF with highlighted words
 
>>> Be the FIRST to comment on this article!
 

 
 
>>> More Utilities Articles          >>> More By PDFZone
 



FREE ZIFF DAVIS ENTERPRISE ESEMINARS AT ESEMINARSLIVE.COM
  • Dec 5, 2 p.m. ET
    Case Studies in MSP Profitability: 10 Processes to Automate to Achieve 2008 Goals
    with Michael Krieger. Sponsored by Autotask
  • Dec 6, 12:30 p.m. ET
    The State of the Great Windows Vista Migration
    with Aaron Goldberg. Sponsored by Dell & Microsoft
  • Dec 6, 2 p.m. ET
    Three Best Practices for Securing Microsoft Exchange
    with Michael Krieger. Sponsored by Entrust
  • Dec 6, 3 p.m. ET
    Simplify Your World, part 2: A Virtual Desktops Case Study
    with Joel Shore. Sponsored by EqualLogic
  • 12-19 VTS LOGO for BotMod
    Join us on Dec. 19 for Discovering Value in Stored Data & Reducing Business Risk. Join this interactive day-long event to learn how your enterprise can cost-effectively manage stored data while keeping it secure, compliant and accessible. Disorganized storage can prevent your enterprise from extracting the maximum value from information assets. Learn how to organize enterprise data so vital information assets can help your business thrive. Explore policies, strategies and tactics from creation through deletion. Attend live or on-demand with complimentary registration!
    FEATURED CONTENT

    Sponsored by Ziff Davis Enterprise Group


    DOWNLOADABLE ROI CALCULATORS & TOOLS FROM BASELINE
      Calculate Cost and ROI of Spam, VOIP, RFID, Sarbanes-Oxley and more...


    Featured Calculators:

     



    See More Tools!
    By Category| Planners |Calculators | Quizzes

     

    Special Report


    PDFzone Special Report: Making the Perfect PDF
    The Perfect PDF
    PDFzone shows you how to shine and polish your PDF by adding the reader-friendly touches your audience desires.

    Special Report


    PDFzone Special Report: Microsoft's PDF Play
    Microsoft's PDF Play
    Microsoft planned to offer a "Save to PDF" function in Office 2007, but the threat of legal action from Adobe may have them reconsidering.

    Special Report


    PDF conversion
    PDF Conversion Central
    Convert anything and everything to PDf and back again. Word docs, RSS, AutoCAD and more.
    ADVERTISEMENT