Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: continuous page scroll #11

Open
chukkan opened this issue Sep 14, 2020 · 6 comments
Open

Feature request: continuous page scroll #11

chukkan opened this issue Sep 14, 2020 · 6 comments

Comments

@chukkan
Copy link

chukkan commented Sep 14, 2020

Many thanks indeed for such a great useful product. May I suggest a feature? How to Implement/achieve a continuous scrolling of pages using mouse and keyboard as in acrocat as well as other pdf readers? A screen shot has added below:

image

Once again many thanks

@Ayuus
Copy link

Ayuus commented Nov 9, 2020

For this to work, I think a design change is necessary. Currently, for every page (TPdfControl), a new PDFDocument (TPdfDocument) is created. For your suggestion (which I tried to implement, too) to work, for each pdf document 1 TPdfDocument must be created, which then must be connected to 1 TPdfControl per page. All connected TPdfControls can then be displayed on 1 TScrollBox.
I think this should not be tried without cooperation of the original author. If you do not want to wait for that, have a look at www.winsoft.sk.

@yhgroup
Copy link

yhgroup commented Mar 19, 2021

I want this feature, too

@VasyutkinVeniamin
Copy link

I couldn't push into this repo
You can rewrite this code in PdfiumCtrl.pas:

function TPdfControl.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer;
MousePos: TPoint): Boolean;
var
PagePt: TPdfPoint;
begin
Result := inherited DoMouseWheel(Shift, WheelDelta, MousePos);

if not Result then
begin
if IsPageValid and AllowFormEvents then
begin
PagePt := DeviceToPage(MousePos.X, MousePos.Y);
if CurrentPage.FormEventMouseWheel(Shift, WheelDelta, PagePt.X, PagePt.Y) then
Exit;
end;

if ssCtrl in Shift then
begin
  if ScaleMode = smZoom then
  begin
    ZoomPercentage := ZoomPercentage + (WheelDelta div WHEEL_DELTA) * 5;
    Result := True;
  end;
end
else
begin
  if ssShift in Shift then
    Result := ScrollContent(-WheelDelta, 0, SmoothScroll)
  else
    Result := ScrollContent(0, -WheelDelta, SmoothScroll);

  if not Result then
  begin
    if WheelDelta < 0 then
      Self.GotoNextPage()
    else
      Self.GotoPrevPage();
  end;
  Result := True;
end;

end;
end;

@TextEditorPro
Copy link

@landrix
Copy link
Contributor

landrix commented May 12, 2023

@TextEditorPro Are you interested in integrating your control into this repository?

@TextEditorPro
Copy link

I don't mind, the code is completely free to use for any purpose. However, this repo already has its own code for the control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants