embedded PDF in browser

soozh
soozh used Ask the Experts™
on
Hello,

I want to embed a PDF document in a web page that has other controls etc.

Then as the user changes page in the PDF document i want to update other parts of the web page.

Is there some event i can hook onto in the pdf?  Does adoble reader expose any event handling?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Michel PlungjanIT Expert
Top Expert 2009

Commented:
Hmm

What we did was to create a document with fake pages. Only the page you are looking on is real, the rest are place holders. Each place holder is a URL. The server sets a cookie that the script in the page you are embedding it in can read if the parent page and pdf is from the same domain.

Then the script can monitor the changes in cookies (or poll the server for a session change) and do whatever
Brook BraswellApplication Development Manager
Commented:
no not really...the PDF runs a little independent of the browser.  There are no "events" that I am aware of you could trap for.
Expert Spotlight: Joe Anderson (DatabaseMX)

We’ve posted a new Expert Spotlight!  Joe Anderson (DatabaseMX) has been on Experts Exchange since 2006. Learn more about this database architect, guitar aficionado, and Microsoft MVP.

soozhCEO

Author

Commented:
Thanks for the response.

Now that i have looked at it in more detail i realise that i only need to know if the user scrolls to a new page...  i dont need to know the contents of any of the pdf document.

I am just tring to display data that is associated with each page.  Hence the need to know what page is "current".
Michel PlungjanIT Expert
Top Expert 2009

Commented:
I explained how we do it. We gave a print button in our HTML that needs to know the page the PDF is on so the PDF loads a new URL when it changes the page inside the PDF
soozhCEO

Author

Commented:
Hello mplungjan...

I am not sure i understand your solution.  Are you saying that if you had a three page document you would create a new document with on the first pages contents, and page 2 and 3 would only have an url.

However i dont understand really the rest... (not so smart here)...

Can you expand on it as you seem to have a very promising solution.
Michel PlungjanIT Expert
Top Expert 2009
Commented:
Have a look here

http://goo.gl/op9Xm

Every page you are looking at is a complete document with 9 pages.
However only the page you are looking at holds data. The ones before and after are simply URL placeholders. So when the user goes to the next page, the browser loads a new pdf with placeholders for the pages before and after. That means that the print link outside the plugin can get at the current page number from the (session) cookie set when the server generates a new page.
What we also did was to disable the printing and download of the document since if the user tried to print it, they would get one page of real data and 8 pages of nothing.
soozhCEO

Author

Commented:
hello,

OK now i am begining to understand.  What is the embeded component you are using to display the pdf?
Michel PlungjanIT Expert
Top Expert 2009

Commented:
We use iframe for IE and object for the rest
soozhCEO

Author

Commented:
i mean what is the PDF rendered in?  It does not look like Adobe's reader...
Michel PlungjanIT Expert
Top Expert 2009

Commented:
In Chrome it is likely the built-in reader in the rest it is Acrobat

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial