Skip to content

Display a page range possibly not working correctly #13

Description

@arjen375

I am trying to get the PdfRangeDocument.FromDocument method to work on a Windows Form but whatever I try, it will always show me a page range [1..n] rather than [m..m+n]. If Ι am using the following:

    private void pdfViewer1_Load(object sender, EventArgs e)
    {
        string path = @"D:\tmp\0543_y20_sp_4.pdf";
        IPdfDocument _document = PdfDocument.Load(path);
        pdfViewer1.Document = PdfRangeDocument.FromDocument(_document, 2, 2);
    }

I expect this to show page 2 of the pdf but is just shows page 1. If I change the last line to

   pdfViewer1.Document = PdfRangeDocument.FromDocument(_document, 2, 3);

I get pages 1 and 2 displayed.

Am I missing something here?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions