Monday, November 2, 2009

Link to a Page in Google's Document Viewer

Google's Document Viewer lets you preview PDF files, PowerPoint presentations and TIFF files without installing additional software. It's great for linking to documents available online and for embedding them in a site.

If you want to link to a certain page from your document, adjust the URL. This is the link generated by Google for a PDF file:

http://docs.google.com/viewer?url=http%3A%2F%2Finfolab.stanford.edu%2Fpub%2Fpapers%2Fgoogle.pdf

To load a specific page in the document, you need to add a hash to the end of the URL. Page IDs are numbered sequentially like this: :0.page.0, :0.page.1, :0.page.2...

So to load page #15 of the document, use this link:

http://docs.google.com/viewer?url=http%3A%2F%2Finfolab.stanford.edu%2Fpub%2Fpapers%2Fgoogle.pdf#:0.page.14

The same trick works for the embedded viewer:

http://docs.google.com/viewer?url=http%3A%2F%2Finfolab.stanford.edu%2Fpub%2Fpapers%2Fgoogle.pdf&embedded=true#:0.page.14

{ Thanks, Andy. }

No comments:

Post a Comment