Link to home
Start Free TrialLog in
Avatar of A G
A GFlag for United States of America

asked on

How to automate Adobe Acrobat Reader Snapshot tool using vba?

Let say I have 8 pdf documents (8 pages each). Each one has the same graphs in the same places but the data in them is different. So, i want to write something on vba (it does not have to be vba), so I can automate the snapshot tool to take a snapshot (this will be just a part of the page) of the graphs on each page and paste it in a power point slide. So It will take the 4 graphs on the first 4 pages and paste them in a power point slide evenly (the graphs has to be reduced in size in order to fit 4 of them in one slide). It will do the same for each of the 8 pdf documents.
Avatar of Chris Raisin
Chris Raisin
Flag of Australia image

Can you post the PDF documents, or is the information confidential?
This could be quite involved, but I may have a =n answer for you.
 
Avatar of A G

ASKER

Hmm, let me see about that. Can I send you via email so it wont stay on this thread forever.
Post it here. You cannot send via email since that ius outside the authorised actions allowed on this site.
We can then ask the moderator to remove the files.
Avatar of A G

ASKER

Ok lets do that.
I am posting it now  First 4 pages are relevant. So tables and pictures on the first 4 pages.
Thanks
Avatar of A G

ASKER

craisin:
any luck?
Sorry,
Today was the first time I received notification of a message for me in EE (I have been away for 5 days playing Bridge....it's a hard life!)
Will look into it today.
I now have the file. I have asked the moderator to remove the file so it no longer is available to others. Once we have resolved this issue I will delete my copy.
I have worked out a way, but it will take me a while to code it.
Basically what we will be doing, is naming the documents which contain the graphs(remembering that the graphs are on the same pages in each document)., stating the page numbers on which they occur (one per page), using the snapshot tool to copy the graphs
(one page at a time) from each the PDF over to the Powerpoint presentation, with the slides from each PDF being resized and placed on the saame slide in the Powerpoint show.
Whew,,,,tricky,   but stand by.

Avatar of A G

ASKER

ok, thanks a lot
Just to let you know I have finally had some success.
First dlide produced with four graphs in place.
Do you want them to run in a 2X2 format, as follows:
                  1. First graph top left
                  2. Second graph top right
                  3. THird Graph bottom left
                  4. Fourth Graph bottom right.

It was not easy because unfortunately the clipboard does not save save in a recognised format by Powerpoint when copied from Acrobat (probably compression involved)  but after copying the image into a PictureBox and then saving to a file, I succeeded in importing into Powerpoint.
Let me know the format you desire, then stand by... :-)
       
Avatar of A G

ASKER

Yes I want it in that format.

            1. First graph top left
                 2. Second graph top right
                 3. THird Graph bottom left
                 4. Fourth Graph bottom right.

this is correct.

thanks a lot
OK...almost there
I have had to copy the one file four times to test it (working with 4 files) and so the graphs appear the same on every slide.
I notice the moderator has not yet removed the first file yet. Is it possible to add three more PDF files so I can give it a full test?
Also, I have written the code in VB6. Do you have that compiler?
I also ran using Acrobat 9 as the reader. It is important that you have that reader otherwise the code needs to be changed to allow for different keystrokes. I have had to go the way of mimicking keystrokes with the Acrobat Reader because the Acrobat DLL object does not appear to have a "Snapshot" method inbuilt (probably an old version).
It seems to be working well at this end. After these last minor things are cleared up I should be ready to post the final answer.
Avatar of A G

ASKER

Files are almost exactly the same. so each file will have the same exact structure. graph will be located at the same position. so , i believe testing one file should be allright. So, I guess under acrobat reader the the snapshot tool icon should be in the same place or are you using a shortcut?
also for vb6 compiler, can I use .net compiler (this might be a stupid question :))

thank you very much for your help
You cannot use the .Net compiler.
I have .Net compiler, but it might take me quite a while to convert to .Net (I am not used to it).
I could try if you like.
I will stay with the one file I have then.
The Acrobat 9 reader may NOT have the snapshot tool in the same spot (I don't know).
The keys to get to it are:   "Alt+T....Z....N"
Please advise how you want it delivered in due course. I can attempt conversion to .Net if you like, but my time is restricted because I am leaving for Queensland (a state in Australia) either this afternoon or tomorrow morning. It is a 23 hour drive (and I need to stop occasionally!). Going there for 3 days to visit my Mum for Easter then I have to drive back.
(2000 km trip one way).
 
     
Avatar of A G

ASKER

oh dont worry. you dont have to convert it to .net. i ll figure it out. i ll really appreciate if you can post either the file here or put down the code for the vb.
thanks a lot
have a great easter.
ASKER CERTIFIED SOLUTION
Avatar of Chris Raisin
Chris Raisin
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I am back!
So how is everything going?
Avatar of A G

ASKER

Many thanks