473,385 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Div scroll like Acrobat reader

Hi,
I want to do scrolling like done in google books (acrobat reader
style)

http://books.google.com/books?vid=IS...vO7VKdoRrLLsJQ

it could be done by scrollTop & scrollLeft ... but how to get exact
effect like in acrobat reader.

Thanks.

Apr 17 '07 #1
2 2072
I've built a reader in recent times and there is a fair amount of
work involved.

Firstly you'll need to build a scrollbar. The scrollbar needs to keep
track of some simple state information, such as the current page.
You'll also have to determine whether the user is dragging the
scrollbar, clicking on an arrow button or clicking on the bar and then
render the pages accordingly.

You'll then need a div. The div will contain your page images (i used
an iframe - a div should suffice). At any time you'll need at least 2
pages images loaded in the div. At normal resolutions 2 images will
fill the div. Google loads about 6-7 images the last time I checked.
Work out the optimum number of images to load at one time. If the user
is moving down the page (by tapping on the scrollbar arrow) then
you'll need to adjust the div's position, which is simple enough. If
the user is moving between pages then you'll need to load in new
images and move the div accordingly. This is the trickiest part,
building a rendering engine that acts like an application. I've only
scratched the surface here to get you pointed in the right direction.
Pete

On Apr 17, 11:59 am, "AzGhanv/." <azgha...@gmail.comwrote:
Hi,
I want to do scrolling like done in google books (acrobat reader
style)

http://books.google.com/books?vid=IS...LAAAAIAAJ&pg=P...

it could be done by scrollTop & scrollLeft ... but how to get exact
effect like in acrobat reader.

Thanks.

Apr 17 '07 #2
I managed to dig it out, it was really simple, please consult if
anyone need help
thanks for your idea.

On Apr 17, 1:19 pm, Pete <peter.gal...@gmail.comwrote:
I've built a reader in recent times and there is a fair amount of
work involved.

Firstly you'll need to build a scrollbar. The scrollbar needs to keep
track of some simple state information, such as the current page.
You'll also have to determine whether the user is dragging the
scrollbar, clicking on an arrow button or clicking on the bar and then
render the pages accordingly.

You'll then need a div. The div will contain your page images (i used
an iframe - a div should suffice). At any time you'll need at least 2
pages images loaded in the div. At normal resolutions 2 images will
fill the div. Google loads about 6-7 images the last time I checked.
Work out the optimum number of images to load at one time. If the user
is moving down the page (by tapping on the scrollbar arrow) then
you'll need to adjust the div's position, which is simple enough. If
the user is moving between pages then you'll need to load in new
images and move the div accordingly. This is the trickiest part,
building a rendering engine that acts like an application. I've only
scratched the surface here to get you pointed in the right direction.

Pete

On Apr 17, 11:59 am, "AzGhanv/." <azgha...@gmail.comwrote:
Hi,
I want to do scrolling like done in google books (acrobatreader
style)
http://books.google.com/books?vid=IS...LAAAAIAAJ&pg=P...
it could be done by scrollTop & scrollLeft ... but how to get exact
effect like inacrobatreader.
Thanks.

Apr 20 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Chris | last post by:
Hello all, I wish to automate printing of PDF documents in a C# application. Is there an Adobe .net object? I tried to create a reference to the COM Object Adobe Type Library, but I get error...
2
by: jimfortune | last post by:
I have modified my GetAcroPath function to: Function GetAcroDir() As String Const LatestVer = 7 Dim strAcroDir(LatestVer - 2) As String Dim I As Integer strAcroDir(1) = "C:\Program...
6
by: Chris | last post by:
Hello all, I wish to automate printing of PDF documents in a C# application. Is there an Adobe .net object? I tried to create a reference to the COM Object Adobe Type Library, but I get error...
0
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= | last post by:
Hi all people, everybody, We have multiple versions of Acrobat Reader from 5.x to 8.x, I want to create a method in C# or VB.NET to check to see if the registry key for the versions...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.