user3033043
user3033043

Reputation:

PDFium - Only one page shown, but I want to scroll through them all

Once again, I am having trouble with the PDFium control for .NET.

// From the Load of the Win-Form
PdfCommon.Initialize();

pdfView1 = new Controls.PdfView();
pdfView1.LoadDocument(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\Special.pdf");

pdfView1.Name = "pdfView1";

pdfView1.Location = new Point(0, 0);

pdfView1.Height = this.Height;
pdfView1.Width = this.Width;

pdfView1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;

pdfView1.SizeMode = Patagames.Pdf.Net.Controls.SizeModes.FitToSize;

this.Controls.Add(pdfView1);

The PDF called "Special.pdf" is getting loaded into pdfView1, but it only shows 1 (!) page. This document consists of 3 pages though.

There is no scrollbar visible to scroll through all the other pages. It is only showing the first page.

I have no clue which method I have to use to activate the scrollbar yet if there's any available.

Upvotes: 0

Views: 2340

Answers (1)

Andrew
Andrew

Reputation: 41

Just change the current page

pdfView1.CurrentPage = 2; //3, 4 and so on.

This control does not contain toolbar or somthing like this. but u can call many functions from ur code.

But I recommend to use PdfViewer control instead PdfView. It's more powerful.

Upvotes: 1

Related Questions