Click here to Skip to main content
Licence 
First Posted 9 Nov 2004
Views 121,008
Bookmarked 40 times

A simple wrapper to control Acrobat Reader from your application

By | 9 Nov 2004 | Article
This class wraps some useful DDE messages to control Acrobat from your application

Introduction

Acrobat Reader can't be driven using Automation. Only few restrictive DDE messages has been defined by adobe to control reader from outside.

This class maps some usefull DDE messages that will allow you open, seek, print and close a file in acrobat.

Background

The DDE message description can be downloaded from the Adobe web site (IACReference.pdf)

Using the code

Using the class is simple :

//Sure, you need at least to include that file !
#include "ReaderWrapper.h"

    // This will instanciate a new object
    CReaderWrapper ReaderDemo</CODE>("d:\\test.pdf");
    
    // Open your document inside acrobat
    ReaderDemo.DocOpen();

    //Seek display to page 4
    ReaderDemo.GoToPage(4);

    //Print the file without displaying any modal dialog box
    ReaderDemo.FilePrintSilent();

    //Close the document
    ReaderDemo.DocClose();

    //Exit reader
    ReaderDemo.ExitAcrobat();
//

History

  • 1.1 (2004/11/09) First release.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

seasidetech

Instructor/Trainer

France France

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralIs there any way to search and locate inside acrobat reader control PinmemberMember 4850690:37 29 May '10  
GeneralFailed to build this code with VS 2003 C++ PinmemberMonkeyhorse7:08 12 Jan '10  
QuestionHow to do the same in C# PinmemberPooranPrasad20:18 4 Oct '09  
GeneralFilePrintSilent - Synchronous/Serialize Pinmembertopperpbb3:27 22 May '06  
Generalcan't find file sstpdf2.h PinmemberFirstDinosaur17:51 1 May '06  
GeneralRe: can't find file sstpdf2.h PinmemberGarth J Lancaster18:04 1 May '06  
GeneralRe: can't find file sstpdf2.h Pinmembersnacker25:04 14 Apr '09  
GeneralRe: can't find file sstpdf2.h PinmemberGarth J Lancaster11:38 14 Apr '09  
GeneralRe: can't find file sstpdf2.h PinmemberGarth J Lancaster11:41 14 Apr '09  
GeneralRe: can't find file sstpdf2.h Pinmembersnacker211:54 14 Apr '09  
QuestionMerge 2 pdf files ? Pinmemberdragomir2:07 27 Oct '05  
GeneralWon't SaveAs, Close, Exit Pinmemberahurwitz11:04 26 Sep '05  
GeneralRe: Won't SaveAs, Close, Exit Pinmemberahurwitz11:20 26 Sep '05  
GeneralExit command fails Pinmemberdragomir4:04 15 Sep '05  
GeneralHiding the Acrobat Application while printing PinmemberPC-Alex23:48 14 May '05  
GeneralRe: Hiding the Acrobat Application while printing Pinmemberiver3:12 18 Aug '05  
GeneralRe: Hiding the Acrobat Application while printing Pinmemberjly7716:19 5 Sep '05  
QuestionPrinting problem, is it caused by version 7 ? PinmemberPC-Alex4:26 28 Apr '05  
AnswerRe: Printing problem, is it caused by version 7 ? Pinmemberiver22:02 10 May '05  
GeneralRe: Printing problem, is it caused by version 7 ? PinmemberPC-Alex23:38 14 May '05  
GeneralVB.Net HowTo Pinmembersteel12344:38 25 Mar '05  
GeneralRe: VB.Net HowTo Pinmemberyltsa4:31 30 Apr '05  
Generalhelp Pinmemberrobig0:23 22 Mar '05  
GeneralRe: help Pinsussbjw07:01 4 Aug '05  
GeneralRe: help Pinsussbjw07:13 4 Aug '05  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120517.1 | Last Updated 9 Nov 2004
Article Copyright 2004 by seasidetech
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid