Hello Nigel,
to get a "page flip"-feeling on reading PDF-files I "mixed" your PDFViewer-Demo with code from
your Transition-demo only for the "next"-button to test it.
I set Transsitioneffect and its duration already in the object-inspector. It didn't work
with ImageEnView1.IO.Seek(ieioSeekNext).
In the help I found that seek is only setting ImageIndex and after them LoadFromFile. So I
replaced seek with it and I can see the transition BUT only with two white pages - the next
page will be shown only after the transition. Where is my error or does a transition do not work with
PDF-files?
Here is my mixed code for the "next"-button (only 2 rows at the end):
procedure TframPDF.btnNavNextClick(Sender: TObject);
begin
//==>> Original from PDFViewer-demo: ievPDF.IO.Seek(ieioSeekNext);
//The following is from Transition-demo adapted:
//note: ievPDF is a TImageEnView
// Set Transition options
//this would be nonsense:
// ievPDF.TransitionEffect := ievPDF.TransitionEffect;
// ievPDF.TransitionDuration := ievPDF.TransitionDuration;
// ievPDF.TransitionParams.AlternativeStyle := chkDrawAlternative.checked;
// Load the next image
// ImageEnView1.IO.LoadFromFile( ExtractFilePath(ParamStr(0)) + IntToStr(fCurrentImage) + '.jpg');
//has no effect: ievPDF.IO.Seek(ieioSeekNext);
ievPDF.IO.Params.ImageIndex := ievPDF.IO.Params.ImageIndex + 1;
//lblPathComplete.Caption is the complete path to the loaded PDF-file:
ievPDF.IO.LoadFromFile(lblPathComplete.Caption);
end;
Kind regards
Jens